Ensure Battle of the Kings commoner capture ends game#34
Ensure Battle of the Kings commoner capture ends game#34Belzedar94 wants to merge 41 commits intomasterfrom
Conversation
There was a problem hiding this comment.
Codex Review: Here are some suggestions.
Fairy-Stockfish/src/position.cpp
Lines 1978 to 1983 in 863ed89
[P1] Skip NNUE hand updates when gating piece is not taken from hand
When a gating move is executed, the code always records the gated piece in dirtyPiece.handPiece and its count in dirtyPiece.handCount. In Battle of the Kings gatingFromHand is false and no piece is removed from a hand, so pieceCountInHand[us][gating_type(m)] is zero. The NNUE feature update later subtracts one from this count, producing a -1 index and out-of-bounds access as soon as a gating move occurs with NNUE enabled. This new variant will crash or corrupt the NNUE accumulator the first time a pawn advances. The NNUE hand bookkeeping needs to be skipped or use NO_PIECE when gating_from_hand() is false.
Reply with @codex fix comments to fix any unresolved comments.
About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".
|
@codex fix comments |
|
Summary
Testing
|
|
@codex there is a bug, after en passant happens during the game, the gating stops working. Investigate and fix |
|
Summary
Testing
|
|
@codex we still have the 2 issues that were supposed to be fixed, in one hand the en-passant bug (when en-passant happens, gating stops working), in the other hand the promotion bug (notation was fixed, but promotion is not working). Here are two examples: en-passant-issue: promotion-issue: Make sure to review thoroughly, fix the issue and then add this cases to test.py |
|
Codex Review: Didn't find any major issues. Keep them coming! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting |
…-half_ka_v2_variants.cpp Silence unused parameter warnings in NNUE variant feature
dc16af1 to
c6c3296
Compare
…tlekings-variant Disable repetition-based draws in Battlekings variant
Remove branch filters for pull requests in workflow.
…-for-battlekings Fix Battlekings gating legality on captures
…lekings-engine Fix battlekings gating when capturing commoners
…o codex/fix-illegal-move-in-battlekings-engine-304qlc
…lekings-engine-304qlc Fix battlekings promotion move encoding
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_68d14c54c3348322acceac0979446f6d