Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into perf/IsSquareAttacked…
Browse files Browse the repository at this point in the history
…ByPawns
  • Loading branch information
eduherminio committed Feb 1, 2024
2 parents 45896cf + 0b10bb5 commit 23f94d0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ Here are the ones 'properly' rated over at least a few hundred of games:

| Lynx version | Release date | Estimated elo | [CCRL Blitz](https://www.computerchess.org.uk/ccrl/404/) | [CCRL](https://www.computerchess.org.uk/ccrl/4040/) | [MCERL](https://www.chessengeria.eu/mcerl) | [CEDR](https://chessengines.blogspot.com/p/rating-jcer.html) |
|---|---|---|---|---|---|---|
| [1.2.0](https://github.com/lynx-chess/Lynx/releases/tag/v1.2.0) | 2024-01-11 | [2611](https://github.com/lynx-chess/Lynx/commit/38f0d147fe049c89e56e6ea66ce28f9fa29907c2) / [2551](https://github.com/lynx-chess/Lynx/commit/38f0d147fe049c89e56e6ea66ce28f9fa29907c2#commitcomment-137001006)<sup>1</sup> | | [2585](https://www.computerchess.org.uk/ccrl/4040/cgi/engine_details.cgi?print=Details&each_game=1&eng=Lynx%201.2.0%2064-bit#Lynx_1_2_0_64-bit) | | | |
| [1.1.0](https://github.com/lynx-chess/Lynx/releases/tag/v1.1.0) | 2023-12-14 | [2533](https://github.com/lynx-chess/Lynx/commit/b7d0131909977fe7c398f70e29daf3dc02f9fdcb#commitcomment-134947966) | [2428](https://www.computerchess.org.uk/ccrl/404/cgi/engine_details.cgi?print=Details&each_game=1&eng=Lynx%201.1.0%2064-bit#Lynx_1_1_0_64-bit) | [2506](https://www.computerchess.org.uk/ccrl/4040/cgi/engine_details.cgi?print=Details&each_game=0&eng=Lynx%201.1.0%2064-bit#Lynx_1_1_0_64-bit) | 2621 | |
| [1.2.0](https://github.com/lynx-chess/Lynx/releases/tag/v1.2.0) | 2024-01-11 | [2611](https://github.com/lynx-chess/Lynx/commit/38f0d147fe049c89e56e6ea66ce28f9fa29907c2) / [2551](https://github.com/lynx-chess/Lynx/commit/38f0d147fe049c89e56e6ea66ce28f9fa29907c2#commitcomment-137001006)<sup>1</sup> | | [2584](https://www.computerchess.org.uk/ccrl/4040/cgi/engine_details.cgi?print=Details&each_game=1&eng=Lynx%201.2.0%2064-bit#Lynx_1_2_0_64-bit) | 2864 | 2738 |
| [1.1.0](https://github.com/lynx-chess/Lynx/releases/tag/v1.1.0) | 2023-12-14 | [2533](https://github.com/lynx-chess/Lynx/commit/b7d0131909977fe7c398f70e29daf3dc02f9fdcb#commitcomment-134947966) | [2429](https://www.computerchess.org.uk/ccrl/404/cgi/engine_details.cgi?print=Details&each_game=1&eng=Lynx%201.1.0%2064-bit#Lynx_1_1_0_64-bit) | [2506](https://www.computerchess.org.uk/ccrl/4040/cgi/engine_details.cgi?print=Details&each_game=0&eng=Lynx%201.1.0%2064-bit#Lynx_1_1_0_64-bit) | 2621 | |
| [1.0.1](https://github.com/lynx-chess/Lynx/releases/tag/v1.0.1) | 2023-11-20 | [2511](https://github.com/lynx-chess/Lynx/commit/66d340232298768bba57d6876f59831645a6dffb#commitcomment-132727293) | [2431](https://www.computerchess.org.uk/ccrl/404/cgi/engine_details.cgi?print=Details&each_game=1&eng=Lynx%201.0.1%2064-bit#Lynx_1_0_1_64-bit) | [2435](https://www.computerchess.org.uk/ccrl/4040/cgi/engine_details.cgi?print=Details&each_game=0&eng=Lynx%201.0.1%2064-bit#Lynx_1_0_1_64-bit) | 2567 | 2648 |
| [0.19.0](https://github.com/lynx-chess/Lynx/releases/tag/v0.19.0) | 2023-10-27 | [2434](https://github.com/lynx-chess/Lynx/commit/b42d235a2815ddb989c5d83218750167c43be7bb#commitcomment-131057706) | [2347](https://www.computerchess.org.uk/ccrl/404/cgi/engine_details.cgi?print=Details&each_game=1&eng=Lynx%200.19.0%2064-bit#Lynx_0_19_0_64-bit) | | 2518 | 2469 |
| [0.18.0](https://github.com/lynx-chess/Lynx/releases/tag/v0.18.0) | 2023-10-21 | [2283](https://github.com/lynx-chess/Lynx/commit/3397c86c27bccb521f08306564325ff3cd64335d#commitcomment-130585961) | | | 2381 | |
Expand Down
3 changes: 1 addition & 2 deletions src/Lynx/Model/Position.cs
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,9 @@ public Position(Position position, Move move) : this(position)
var oppositeSideOffset = Utils.PieceOffset(oppositeSide);
var oppositePawnIndex = (int)Piece.P + oppositeSideOffset;

var capturedSquare = targetSquare;
var capturedPiece = oppositePawnIndex;

capturedSquare = Constants.EnPassantCaptureSquares[targetSquare];
var capturedSquare = Constants.EnPassantCaptureSquares[targetSquare];
Utils.Assert(PieceBitBoards[oppositePawnIndex].GetBit(capturedSquare), $"Expected {(Side)oppositeSide} pawn in {capturedSquare}");

PieceBitBoards[capturedPiece].PopBit(capturedSquare);
Expand Down
6 changes: 5 additions & 1 deletion src/Lynx/OpenBench.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ public static class OpenBench
"1n2kb1r/p1P4p/2qb4/5pP1/4n2Q/8/PP1PPP1P/RNB1KBNR w KQk - 0 1", // SEE test suite - promotion with capture
"6Q1/8/1kp4P/2q1p3/2PpP3/2nP2P1/p7/5BK1 b - - 1 35", // Fischer vs Petrosian - double promotion
"5R2/2k3PK/8/5N2/7P/5q2/8/q7 w - - 0 69", // McShane - Aronian 2012 - knight promotion
"rnbqk1nr/ppp2ppp/8/4P3/1BP5/8/PP2KpPP/RN1Q1BNR b kq - 1 7" // Albin Countergambit, Lasker Trap - knight promotion
"rnbqk1nr/ppp2ppp/8/4P3/1BP5/8/PP2KpPP/RN1Q1BNR b kq - 1 7", // Albin Countergambit, Lasker Trap - knight promotion

"8/8/4k3/3n1n2/5P2/8/3K4/8 b - - 0 12", // NN vs P endgame
"8/5R2/1n2RK2/8/8/7k/4r3/8 b - - 0 1", // RR vs RN endgame, where if black takes, they actually loses
"8/q5rk/8/8/8/8/Q5RK/7N w - - 0 1" // Endgame that can lead to QN vs Q or RN vs R positions
];

/// <summary>
Expand Down

0 comments on commit 23f94d0

Please sign in to comment.