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

Switch from cutechess-cli to fast-chess (II) #2121

Closed
wants to merge 3 commits into from

Conversation

vondele
Copy link
Member

@vondele vondele commented Jul 18, 2024

Alternative to (or continuation on top of) #2119

This takes the transition a step further and uses the capability of fast-chess to output the pentanomials. As a result some of the worker code can be simplified.

fixes official-stockfish#2106

This PR switches from cutechess-cli to fast-chess.

cutechess-cli has been serving us well in the past years, however, some issues
have accumulated, namely the difficulty of compiling cutechess-cli, the
observed timeouts at high concurrency and short TC, and e.g. slowness when
indexing larger books.  fast-chess https://github.com/Disservin/fast-chess has
addressed these issues, and has now probably become mature enough to serve as
the game manager for fishtest.

As an example of its ability to deal with short TC and high concurrency:
https://dfts-0.pigazzini.it/tests/view/669249cdbee8253775cede32
with concurrency 25, and TC 1+0.01s no timeouts are observed.

fast-chess is built from sources, with the zip download as well as the binary
cached as needed.  There is fine-grained control over which version of
fast-chess is used, so we can easily upgrade for new features.

In this PR, fast-chess is built in cutechess compatibility to facilitate
integration, and to benefit from the existing fishtest checks. Once validated,
we should be able to switch easily to its native mode, which can output
trinomial and pentanomial results, and we should be able significantly simplify
the worker's book-keeping.

Co-Authored-By: Disservin <disservin.social@gmail.com>
Co-Authored-By: Gahtan Nahdi <155860115+gahtan-syarif@users.noreply.github.com>
@vondele
Copy link
Member Author

vondele commented Jul 18, 2024

@vdbergh you might want to have a careful look at this.

Fully switch to 'native' fast-chess output, its pentanomial and wld output for
every game pair simplies the worker code a lot.
@vdbergh
Copy link
Contributor

vdbergh commented Jul 21, 2024

I had a look and everything seems fine. It is more robust that the previous code which - IIRC - relied on the fact that cutechess schedules games in a game pair consecutively to obtain the pentanomial frequencies.

The server will reject results with incompatible WLD and pentanomial frequencies (this amounts to checking some equalities and some inequalities). So that is also a good check.

@vondele
Copy link
Member Author

vondele commented Jul 21, 2024

OK, good to know that the server does that check.

Yes, in that case, it almost certainly is fine, and I would tend to prefer this PR directly over #2119 ... no need to go in 2 steps.

@vondele
Copy link
Member Author

vondele commented Jul 21, 2024

closing this PR, integrating it directly in #2119

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.

3 participants