Skip to content

Implement Static Exchange Evaluation (SEE) for Quiescence Pruningย #23

@kylejrp

Description

@kylejrp

Quiescence Search (introduced by #22) currently searches all captures without a tactical pre-check. This can lead to search explosions and wasted time investigating obviously losing captures.

Static Exchange Evaluation (SEE) gives a fast material-only tactical check to determine whether a capture is likely profitable. It helps prune losing captures before exploring them.


๐Ÿ“Œ Goals

  • Add a SEE function for evaluating captures on a target square
  • Integrate SEE to reduce quiescence search branching factor
  • Prepare groundwork for future forwarding pruning optimizations

โœ”๏ธ Acceptance Criteria

  • Implement SEE(Board board, Move move):
    • Simulates attackers and defenders on target square
    • Orders attackers by least-valuable-attacker (LVA)
    • Tracks net material gain/loss as the exchange unfolds
    • Stops early when score is irrecoverable (negative beyond threshold)
  • Integrate SEE into quiescence:
    • Skip capture if SEE(move) < 0
    • Still allow winning and equal captures
  • Add debugging utility to log SEE values (optional build flag)
  • Write targeted tests:
    • Positive SEE where recapture doesnโ€™t happen (winning)
    • Negative SEE (losing capture)
    • Even SEE (trade is balanced)
  • Run regression to ensure SEE reduces nodes without major Elo drops

๐Ÿš€ Stretch Goals (optional)

  • Use SEE in main search for:
    • Futility pruning near leaves
    • Bad capture pruning in move ordering
  • Consider a margin (SEE < -50) instead of hard < 0
  • Add SEE scores to move ordering heuristic

๐Ÿ” References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions