Skip to content

Add UCI-tunable forward futility pruning in negamax move loop - #54

Open
KnightStackSys wants to merge 2 commits into
mainfrom
feature/move-loop-futility
Open

KnightStackSys wants to merge 2 commits into
mainfrom
feature/move-loop-futility

Conversation

@KnightStackSys

Copy link
Copy Markdown
Owner

Summary

  • Implement forward futility pruning in the negamax move loop (separate from existing node-level reverse futility pruning)
  • Use optimistic bound staticEval + futilityBaseMargin + depth * futilityMarginPerDepth <= alpha
  • Prune only late quiet, non-checking moves after at least one legal move, outside PV, root, checks (including teammate check), mate windows and null subtrees
  • Reuse search stack's cached evaluation and check only genuinely plausible pruning candidates
  • Add SearchFutilityMaxDepth (default 2; 0 disables), SearchFutilityBaseMargin (100), and SearchFutilityMarginPerDepth (150) as UCI-tunable options
  • Add dedicated ironphoenix_futility regression test (UCI, node-count effect, exclusions), documentation

Notes

  • Includes current Lazy SMP and existing tuned Search/Eval defaults. Does not merge IIR.
  • CI compile/tests then paired SPRT vs SearchFutilityMaxDepth=0 recommended before merging.

Add shallow-depth optimistic static evaluation margins, restrict to late legal quiet nonchecking moves at safe non-PV nodes, reuse search-stack evaluations, and retain existing RFP/LMR/HMP/LMP/SEE policies. Expose UCI tuning options and regression suite.
Assert depth-three parent does not compute a futility estimate while permitting depth-two children to prune. Check partner king with a flank rook that does not also check the mover.

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant