Skip to content

Use combined pyffish results for ordinary live moves - #2472

Draft
gbtami wants to merge 4 commits into
masterfrom
feature/pyffish-apply-move
Draft

gbtami wants to merge 4 commits into
masterfrom
feature/pyffish-apply-move

Conversation

@gbtami

@gbtami gbtami commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Use pyffish.apply_move() for ordinary live moves. One native history replay validates the move and returns SAN, FEN, check, material, game-end information, and the full list of legal replies.
  • Populate master's existing position-bound legal-move cache from those replies in both human-vs-human and bot games.
  • Reject illegal human moves from a matching cached list before native replay. On a cache miss, the combined call validates the move directly.
  • Counting variants also use their incremental FEN call to preserve manually adjusted counters. The pinned pyffish release and variants with separate move handling use the existing path.

The combined path activates when the installed pyffish exposes the new binding. This draft tracks the integration while the binding is under review. Fairy-Stockfish PR #1055

Verification

  • Ruff formatting and lint, plus Pyrefly, passed.
  • A temporary Fairy-Stockfish build with the binding passed 134 targeted unittest cases and all 40 Simul tests. Regression tests cover rejection from a warm cache without an engine call and direct combined validation after a takeback makes the cache stale.
  • The pinned pyffish release passed 120 targeted unittest cases and all 40 Simul tests. The 14 binding-specific tests were skipped.

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