diff options
| author | Scott Gasch <[email protected]> | 2026-09-15 14:43:55 -0700 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2026-09-15 14:43:55 -0700 |
| commit | 83dbf1e3ac18bad09c2225ec846b5df2a8e04c69 (patch) | |
| tree | 975193826ae63db8a8ee2f1db33180764c4506f6 /src/docs/EFP_LMP_MERGE.md | |
| parent | 390e675849ff42c8b7e1806f75552de988741fff (diff) | |
Rework _EvalKing's own-passer support scan, _EvalPawns' per-pawn bookkeeping, and _EvaluateConnectedSupportedOutsidePassers/_EvaluateCandidatePasser to use bitboard aggregates and cheap short-circuits instead of per-pawn mailbox walks.
_EvalKing: replace the file-mask-plus-DISTANCE-filter loop with a direct g_KingAttacksBB intersection, and the color-branching coordinate-inequality "is the king leading the pawn" check with a g_KingRingBackBB test -- same scoring, no wasted far-rank bitscans.
_EvalPawns' first pass: uCountPerFile/uNumUnmovedPawns/bbStationaryPawns are all closed-form popcounts over pos->bbPawns now instead of a per-pawn mailbox loop; also drops the "counted rammed pawns twice, divide by 2" hack entirely, since the closed-form rammed count never double-counts in the first place. Only the per-square centrality bonus still needs a per-pawn walk.
_EvaluateConnectedSupportedOutsidePassers: leftmost/rightmost passer tracking no longer needs an outer per-file loop just to get file-ordered iteration -- a single flat walk over bbPasserLocations with explicit min/max comparison visits the same squares.
_EvaluateCandidatePasser: short-circuit the expensive helper-square walk when the pawn already qualifies as a candidate via the cheap "advanced rank + adjacent-file support" rule, since that disjunct makes the walk's result irrelevant to the final decision.
All four verified semantically identical to the pre-change code via matched-flag EVAL_DUMP term tracing plus targeted eval-score sweeps (~45 positions total covering unmoved/rammed/isolated/doubled/candidate/connected/supported/outside-passer cases for both colors and edge files).
Co-Authored-By: Claude Sonnet 5 <[email protected]>
Diffstat (limited to 'src/docs/EFP_LMP_MERGE.md')
0 files changed, 0 insertions, 0 deletions
