Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add optional identifier to Limit instances #1003

Merged
merged 2 commits into from
Jul 8, 2023

Conversation

MarkZH
Copy link
Contributor

@MarkZH MarkZH commented Apr 30, 2023

This new field in the Limit class is used to signal when the time control for a game has changed. XBoard engines expect to receive a level or st command to indicate the time control at the start of the game, and then only time and otim commands before each subsequent move to update the engine's internal clocks. The level and st commands should only be resent when the time control changes--like in FIDE tournament time controls. During a single time control, the same clock_id should be used for every Limit instance. This field has a similar function to the game parameter of the play() method.

Issue with previous discussion: #742

This new field in the Limit class is used to signal when the time
control for a game has changed. XBoard engines expect to
receive a `level` or `st` command to indicate the time control
at the start of the game, and then only `time` and `otim`
commands before each subsequent move to update the engine's
internal clocks. The `level` and `st` commands should only be
resent when the time control changes--like in FIDE tournament
time controls. During a single time control, the same `clock_id`
should be used for every Limit instance. This field has a similar
function to the `game` parameter of the `play()` method.
@niklasf niklasf merged commit 714f672 into niklasf:master Jul 8, 2023
18 checks passed
@niklasf
Copy link
Owner

niklasf commented Jul 8, 2023

Thanks. I like this solution.

@MarkZH MarkZH deleted the xboard-clock-update branch July 8, 2023 16:51
@niklasf niklasf added this to the v1.10.0 milestone Jul 10, 2023
@niklasf niklasf added enhancement engine Chess engine integration labels Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engine Chess engine integration enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants