summaryrefslogtreecommitdiff
path: root/src/autoplayer
diff options
context:
space:
mode:
authorScott Gasch <[email protected]>2026-09-05 11:11:58 -0700
committerScott Gasch <[email protected]>2026-09-05 11:11:58 -0700
commit53694883d63674a97a3960514dd4e0a4e1b67f01 (patch)
treedaac5cb340a1395bd2b91182b2cbe691dbf9bded /src/autoplayer
parent5405191f8c519333006417a5a3c31bc3e186e42e (diff)
Fix _EvaluateCandidatePasser's helper-pawn safety gate (real no-op since 57502d6)
Flagged during the ATTACK_BITV/bvAttacks cleanup (5405191) but left unfixed there deliberately, per direct instruction, since a real fix changes eval scoring and deserves its own before/after check rather than being buried in a mechanical rename commit. The gate ("is this square safe to advance a helper pawn into, i.e. not enemy-attacked or already friend-defended") used to read the old combined bvAttacks word for both colors at the target square. This function runs from _EvalPawns, the first piece type Eval() evaluates each call -- no non-pawn piece (and, since commit 57502d6, not even pawns themselves) has written any attack data yet at this point. That word has therefore been unconditionally zero, and the gate unconditionally true (silently disabled), since 57502d6 landed. Fixed using pos->bbPawnAttacks -- the one piece-type bitboard that actually is valid this early in Eval()'s sequence (populated at the top of _EvalPawns, before this function runs). Narrower than whatever the original gate covered (pawns only, not every piece type), but a real, correct check instead of a fake one, and pawns are the dominant real-world case for contesting a helper-pawn's advance square anyway. Applied to both the right- and left-side helper searches (the initial target-square check and the backward walk-and-search loop each need their own copy, since the loop's own square changes every iteration). Verified via precommit_check.sh, then all three curated suites at sd10 (not just ringers, since this is a real eval-scoring change, not a mechanical one): net +2/191 (113->115), concentrated in ecm_hard_quick (18->22) with a small ecm_confident_quick give-back (85->83) and ringers unchanged (10/11) -- the same "gains lopsided toward hard_quick" shape this session's other real eval changes have shown, consistent with a genuine (if modest) positional improvement rather than suite-specific noise. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01XxmVi2sTMwpPp4i6WYFjan
Diffstat (limited to 'src/autoplayer')
0 files changed, 0 insertions, 0 deletions