Codex generated this pull request, but encountered an unexpected error after generation. This is a placeholder PR message.
------
[Codex Task](https://chatgpt.com/codex/tasks/task_e_699597ae1e9c8321b4888005c0cc8808)
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
### 💡 Codex Review
Here are some automated review suggestions for this pull request.
**Reviewed commit:** `a9f466b37b`
<details> <summary>ℹ️ About Codex in GitHub</summary>
<br/>
[Your team has set up Codex to review pull requests in this repo](http://chatgpt.com/codex/settings/general). Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- 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 address that feedback".
</details>
Update piece bitboards when validating capture legality
IsLegal only updates postMoveOccupancy for captures, but the final attack test calls IsSquareAttackedBy, which reads attackers from pieces[]/colors[] (pre-move state). That means a captured enemy attacker is still considered present, so legal capture responses are rejected; for example, in r3k2r/p1ppqpb1/bn2pnp1/2pP4/1p2P3/P1N2n2/1PQBBPPP/R3K2R w KQkq - 0 2, e2f3 is legal via MakeMove but IsLegal returns false. Since search/perft/datagen now filter with IsLegal, this drops legal moves and alters results.
Useful? React with 👍 / 👎.
**<sub><sub></sub></sub> Update piece bitboards when validating capture legality**
`IsLegal` only updates `postMoveOccupancy` for captures, but the final attack test calls `IsSquareAttackedBy`, which reads attackers from `pieces[]`/`colors[]` (pre-move state). That means a captured enemy attacker is still considered present, so legal capture responses are rejected; for example, in `r3k2r/p1ppqpb1/bn2pnp1/2pP4/1p2P3/P1N2n2/1PQBBPPP/R3K2R w KQkq - 0 2`, `e2f3` is legal via `MakeMove` but `IsLegal` returns false. Since search/perft/datagen now filter with `IsLegal`, this drops legal moves and alters results.
Useful? React with 👍 / 👎.
Pull request closed
This pull request cannot be reopened because the branch was deleted.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Codex generated this pull request, but encountered an unexpected error after generation. This is a placeholder PR message.
Codex Task
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:
a9f466b37bℹ️ About Codex in GitHub
Your 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 "@codex address that feedback".
IsLegalonly updatespostMoveOccupancyfor captures, but the final attack test callsIsSquareAttackedBy, which reads attackers frompieces[]/colors[](pre-move state). That means a captured enemy attacker is still considered present, so legal capture responses are rejected; for example, inr3k2r/p1ppqpb1/bn2pnp1/2pP4/1p2P3/P1N2n2/1PQBBPPP/R3K2R w KQkq - 0 2,e2f3is legal viaMakeMovebutIsLegalreturns false. Since search/perft/datagen now filter withIsLegal, this drops legal moves and alters results.Useful? React with 👍 / 👎.
Pull request closed