Skip to content

feat(eval): tunable 4PC Teams rook evaluation - #56

Open
KnightStackSys wants to merge 2 commits into
mainfrom
feature/rook-evaluation-4pc-20261024
Open

KnightStackSys wants to merge 2 commits into
mainfrom
feature/rook-evaluation-4pc-20261024

Conversation

@KnightStackSys

Copy link
Copy Markdown
Owner

Summary

Adds a dedicated rook_eval.cpp module and 11 UCI-tunable rook feature weights, wired into the existing hand-crafted evaluation with the established Red+Yellow vs Blue+Green score convention.

Features

  • Pawnless/endgame rook activity: up to EvalRookPawnlessBonus per rook as the original 32 4PC pawns disappear.
  • Open / semi-open owner-oriented files: distinct tunables, accounting for friendly and enemy pawns on the rook owner's actual vertical/horizontal advance file.
  • Seventh / eighth ranks: interpreted as the enemy army's second/home line, rotated for each of the four players, not hardcoded orthodox ranks.
  • Tarrasch rule: distinct rook-behind-friendly and rook-behind-enemy passer bonuses, using a conservative two-enemy, four-direction pawn corridor check; unobstructed direct rook-to-pawn line required.
  • Uncastled king blocking a rook: narrow penalty for an immobile rook still on its configured castle origin, with the corresponding king home, active castling right, and a friendly pawn/piece immediately in front.
  • Enemy queen sharing rook's advance file: small bonus even on a closed or screened file.
  • Connected/team rooks: direct rook-to-rook line-of-sight, counting own/partner rook pairs exactly once.
  • Supported rook on an enemy second rank: extra separately tunable term.

New UCI spin options (0–100)

EvalRookPawnlessBonus=12
EvalRookOpenFileBonus=18
EvalRookSemiOpenFileBonus=9
EvalRookSeventhRankBonus=16
EvalRookEighthRankBonus=10
EvalRookBehindFriendlyPasserBonus=12
EvalRookBehindEnemyPasserBonus=8
EvalRookUncastledKingBlockPenalty=12
EvalRookQueenFileBonus=6
EvalRookConnectedBonus=12
EvalRookSupportedSeventhBonus=8

All options accept setoption name ... value ..., appear in uci and tuneparams, and reset through ResetTuning. Values are starting hypotheses, not empirically tuned.

Verification

  • Adds ironphoenix_rook_features to CTest, covering tuning limits/reset/options, file and phase conditions, rotated opponent home lines, both passed-pawn categories, sliding blockers, castle-right-dependent king blockage, queen-file pressure despite screens, teammate rook connections, and side-to-move team sign.
  • No changes to move rules or search.
  • Applies to HCE only; when NNUE is loaded, the existing NNUE evaluator continues to take precedence.

Testing recommended before merge

Run CMake/CTest in CI, then A/B STC and LTC matches (single feature weights toggled to zero and combined feature set). Profile NPS in tactical/open and closed positions. Do not treat these initial constants as proven Elo gains.

@KnightStackSys KnightStackSys added area: evaluation Handcrafted evaluation, positional scoring, and piece activity. area: tuning Runtime parameters, SPSA, TuneX, and parameter optimization. status: needs-elo-testing Requires STC, LTC, or SPRT testing before acceptance. type: feature Introduces new engine functionality or capabilities. labels Oct 25, 2026 — with ChatGPT Codex Connector
@KnightStackSys KnightStackSys self-assigned this Oct 25, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: evaluation Handcrafted evaluation, positional scoring, and piece activity. area: tuning Runtime parameters, SPSA, TuneX, and parameter optimization. status: needs-elo-testing Requires STC, LTC, or SPRT testing before acceptance. type: feature Introduces new engine functionality or capabilities.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant