Generate only captures in quiescence #8

Merged
claude merged 1 commits from qs-captures-gen into main 2026-11-15 15:00:51 +01:00
Collaborator

Out of check the quiescence search only searches captures and queen promotions, but every node generated all legal moves and threw the quiet ones away. It now generates just those (generate_noisy: the same legal generator with captures-only targets, no quiet pawn pushes, no castling), in the same order as the full generation, so search is unchanged. A node without any noisy move still has to tell stalemate from a quiet position; has_legal_move answers that and stops at the first legal move it finds.

Playouts per second at 100k playouts, main → this (two runs each):

Position main this
startpos 631k 725k +15%
QGD middlegame 390k 446k +14%
Kiwipete 106k 142k +34%
Sicilian middlegame 334k 423k +27%
rook endgame 851k 982k +15%

SPRT (non-regression)

https://bench.rektdie.com/test/5289/

Elo   | 66.75 +- 16.38 (95%)
SPRT  | 8.0+0.08s Threads=1 Hash=64MB
LLR   | 3.07 (-2.94, 2.94) [-5.00, 0.00]
Games | N: 764 W: 311 L: 166 D: 287
Penta | [6, 46, 172, 113, 45]

Correctness

  • perftsuite 7 passes.
  • On 252,893 positions from random games (captures preferred, so they reach endgames, promotions and 400 positions without legal moves) generate_noisy equals generate_legal filtered to captures and queen promotions, in the same order, and has_legal_move equals a non-empty generate_legal.
  • The bench is identical to main.

Bench: 546966

🤖 Generated with Claude Code

Out of check the quiescence search only searches captures and queen promotions, but every node generated all legal moves and threw the quiet ones away. It now generates just those (`generate_noisy`: the same legal generator with captures-only targets, no quiet pawn pushes, no castling), in the same order as the full generation, so search is unchanged. A node without any noisy move still has to tell stalemate from a quiet position; `has_legal_move` answers that and stops at the first legal move it finds. Playouts per second at 100k playouts, `main` → this (two runs each): | Position | main | this | | | --- | --- | --- | --- | | startpos | 631k | 725k | +15% | | QGD middlegame | 390k | 446k | +14% | | Kiwipete | 106k | 142k | +34% | | Sicilian middlegame | 334k | 423k | +27% | | rook endgame | 851k | 982k | +15% | ## SPRT (non-regression) https://bench.rektdie.com/test/5289/ ``` Elo | 66.75 +- 16.38 (95%) SPRT | 8.0+0.08s Threads=1 Hash=64MB LLR | 3.07 (-2.94, 2.94) [-5.00, 0.00] Games | N: 764 W: 311 L: 166 D: 287 Penta | [6, 46, 172, 113, 45] ``` ## Correctness - `perftsuite 7` passes. - On 252,893 positions from random games (captures preferred, so they reach endgames, promotions and 400 positions without legal moves) `generate_noisy` equals `generate_legal` filtered to captures and queen promotions, in the same order, and `has_legal_move` equals a non-empty `generate_legal`. - The bench is identical to `main`. Bench: 546966 🤖 Generated with [Claude Code](https://claude.com/claude-code)
claude added 1 commit 2026-11-15 15:00:41 +01:00
Out of check the quiescence search only searches captures and queen
promotions, but every node generated all legal moves and threw the
quiet ones away. It now generates just those (generate_noisy: the same
legal generator with captures-only targets, no quiet pawn pushes, no
castling), in the same order as the full generation, so search is
unchanged. A node without any noisy move still has to tell stalemate
from a quiet position; has_legal_move answers that and stops at the
first legal move it finds.

Playouts per second at 100k playouts, main -> this (two runs each):

  startpos           631k -> 725k   +15%
  QGD middlegame     390k -> 446k   +14%
  Kiwipete           106k -> 142k   +34%
  Sicilian middle    334k -> 423k   +27%
  rook endgame       851k -> 982k   +15%

Checked: perftsuite 7 passes. On 252,893 positions from random games
(captures preferred, so they reach endgames, promotions and 400
positions without legal moves) generate_noisy equals generate_legal
filtered to captures and queen promotions, in the same order, and
has_legal_move equals a non-empty generate_legal. The bench is
identical to main.

Bench: 546966

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude merged commit 807ddd90c1 into main 2026-11-15 15:00:51 +01:00
claude deleted branch qs-captures-gen 2026-11-15 15:00:52 +01:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rektdie/Rigby#8