-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify remove_piece #2460
Simplify remove_piece #2460
Conversation
Updated test. LLR: 2.94 (-2.94,2.94) [-3.00,1.00] http://tests.stockfishchess.org/tests/view/5e000f52c13ac2425c4a9a0f |
Anyone know how to fix the build? |
Push a dummy space fixing comment. It will restart all tests. |
Are you sure that this PR is correct in case of Chess960 castling? |
Nope, but the bench doesn't change. Not sure how to verify that.
|
Andrew Grant has calculated perft numbers for a set of chess960 positions there: https://www.chessprogramming.org/Chess960_Perft_Results |
Awesome. I will test a bunch of those and see if there are any differences.
|
This pr is modifying only do_castling is a special function and does not call I'm quite sure everything is fine. |
I've verified that the perft numbers for the top 10 positions in Andrew Grant's perft numbers (up to depth 6) all match exactly. |
This is a non-functional simplification. Instead of passing the piece type for remove_piece, we can rely on the board. The only exception is en-passant which must be explicitly set because the destination square for the capture is not the same as the piece to remove. Verified also in the Chess960 castling case by running a couple of perft, see the pull request discussion: #2460 STC LLR: 2.94 (-2.94,2.94) [-3.00,1.00] Total: 18624 W: 4147 L: 4070 D: 10407 Ptnml(0-2): 223, 1933, 4945, 1938, 260 http://tests.stockfishchess.org/tests/view/5dfeaa93e70446e17e451163 No functional change
Merged via 7a7bcd6, thanks! |
This is a non-functional simplification (speedup?). Instead of passing the piece type for remove_piece, we can rely on the board. The only exception is en-passant which must be explicitly set because the destination square for the capture is not the same as the piece to remove.
STC
LLR: 2.94 (-2.94,2.94) [-3.00,1.00]
Total: 18624 W: 4147 L: 4070 D: 10407
Ptnml(0-2): 223, 1933, 4945, 1938, 260
http://tests.stockfishchess.org/tests/view/5dfeaa93e70446e17e451163
bench 5371271