Skip to content

fix(engine): apply preferences during active analysis - #131

Merged
0xferit merged 1 commit into
masterfrom
feature/engine-preference-updates
Sep 22, 2026
Merged

0xferit merged 1 commit into
masterfrom
feature/engine-preference-updates

Conversation

@0xferit

@0xferit 0xferit commented Sep 21, 2026 •

Copy link
Copy Markdown
Collaborator

Preferences can now be edited during analysis and take effect after a brief stop and restart. Refs #121.

The old search must acknowledge stop with bestmove before receiving new options or a position. Settings and position changes made during that wait coalesce to their latest values. Pressing Stop prevents the restart while still applying pending preferences; engine termination prevents further starts. The same transition handles existing MultiPV and WDL changes, whose separate callbacks could otherwise restart an obsolete position.

Tests hold the external UCI process at the stop acknowledgement to check command order and cancellation. They also open the real Preferences window during analysis. The full ASan/UBSan suite and Release build passed; a real Stockfish process was exercised through preference changes, restarts, terminal positions, and termination.

@0xferit
0xferit merged commit 2cdbd21 into master Sep 22, 2026
1 check passed
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