cutechess-cli 0.6.0 released

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

User avatar
ilari
Posts: 750
Joined: Mon Mar 27, 2006 7:45 pm
Location: Finland

cutechess-cli 0.6.0 released

Post by ilari »

For those of you who are not on our mailing list:

It's been a really long time since the last release, so we decided to delight our users with a new release of cutechess-cli 0.6.0. As usual, both source code and binary packages for supported platforms can be downloaded at https://github.com/cutechess/cutechess

Anyone using cutechess-cli 0.5.1 or earlier is encouraged to update. If you're using the version that was made for the Stockfish testing framework, there's probably no reason to update - unless you use the SPRT feature which was improved lately.

New features or changes:

* CLOP glue script is compatible with Python 3
* Opening positions can be picked from EPD files
* ECO codes and opening names as included in PGN output
* Custom XBoard engine options are supported. This should make Gaviota users happy.
* Added "trust" engine option that makes cutechess-cli trust any result claim from the engine.
* The correct PGN move number format is used in games where black moves first
* The precision of the relative score for engine A is increased
* Initialization timeout period is longer so that some slowly starting engines are detected properly.
* A Sequential Probability Ratio Test (SPRT) can be used as a termination criterion for the match.
* The format for setting some options has changed to a less error-prone format
* The "-draw" option now has a "movecount" parameter for setting the number of consecutive scores that have to be within the chosen treshold.
* The "-pgnin" and "-pgndepth" options have been replaced be the "-openings" option that supports both EPD and PGN formats, and two ways to pick openings - sequentially or randomly. In "random" mode the openings file is first indexed, so it can take a few seconds with large files (> 100 MB), but it's only done once. It's also possible to set the number of the first opening to be picked (only in sequential mode).
* Gaviota tablebases can be used to adjudicate games

Bugs fixed:

* Missing command or invalid protocol in engines.json results in a crash
* UCI combo options couldn't be set properly on some systems
* Memory leak when the "-pgnout" option is not used
* On some systems the random number generator produced the same sequence of numbers in each thread, which would result in the same opening used all the time in tournaments with more than two players.
* Threading problems. The multi-threading code is now simpler and more effective and some possible race conditions have been eliminated. If you previously saw warning messages about QThread objects being destroyed while the thread is running, cross-thread killTimer() warnings or random crashes at the start of a match, then this fix should make you very happy.
* Cutechess-cli used to stall if it received an error message but didn't receive a move after sending the "move now" command to an engine. Some Deuterium versions made this bug show up.
Adam Hair
Posts: 3226
Joined: Wed May 06, 2009 10:31 pm
Location: Fuquay-Varina, North Carolina

Re: cutechess-cli 0.6.0 released

Post by Adam Hair »

Thanks very much, Ilari and Arto!
gladius
Posts: 568
Joined: Tue Dec 12, 2006 10:10 am
Full name: Gary Linscott

Re: cutechess-cli 0.6.0 released

Post by gladius »

Thanks Ilari!! Cutechess is awesome :).
User avatar
lucasart
Posts: 3232
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

Re: cutechess-cli 0.6.0 released

Post by lucasart »

ilari wrote:In "random" mode the openings file is first indexed, so it can take a few seconds with large files (> 100 MB)
Very neat! As always you do things the right way, which is not necessarly the easy way.

Using it in practice with a large PGN, I was surprised to see how fast it was. I was also surprised to see that the operation seemed to be an O(1) in memory, instead of the O(n) I expected: I was worried that it would keep a huge parse tree of the PGN in memory.
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: cutechess-cli 0.6.0 released

Post by mcostalba »

Thanks Ilari ! A very useful tool for us and, as usual, you set the benchmark of how quality code should be written.
User avatar
ilari
Posts: 750
Joined: Mon Mar 27, 2006 7:45 pm
Location: Finland

Re: cutechess-cli 0.6.0 released

Post by ilari »

Thanks for the compliments, all of you guys!
lucasart wrote:
ilari wrote:In "random" mode the openings file is first indexed, so it can take a few seconds with large files (> 100 MB)
Very neat! As always you do things the right way, which is not necessarly the easy way.

Using it in practice with a large PGN, I was surprised to see how fast it was. I was also surprised to see that the operation seemed to be an O(1) in memory, instead of the O(n) I expected: I was worried that it would keep a huge parse tree of the PGN in memory.
The space complexity of indexing the file is actually O(n), but n is only 8 bytes, ie. the file position where a game or opening begins.
User avatar
Laskos
Posts: 10948
Joined: Wed Jul 26, 2006 10:21 pm
Full name: Kai Laskos

Re: cutechess-cli 0.6.0 released

Post by Laskos »

Thank you very much for this tool, which I use almost exclusively for testing.

It's just my system, or something is happening? Windows 7, 4 physical cores, 8 logical. With a standard Engines.json specifying Hash and Threads and round-robin command line

cutechess-cli -engine conf="Hou" tc=2.5+0.05 -engine conf="Ryb" tc=5+0.1 -engine conf="Ko" tc=5+0.1 -engine conf="SF" tc=7.5+0.15 -concurrency 7 -draw movenumber=50 movecount=50 score=20 -resign movecount=5 score=900 -games 1 -rounds 1000 -repeat -openings file=endgame.epd format=epd order=random -pgnout End4.pgn -ratinginterval 1

the match stalls after 100-1000 games, leaving hanging engines. I used EPD and PGN files, random and sequential. Never happened with 0.5.1 version, I rolled back and a RR with 6,000 games went flawlessly. Do you have idea what happens?
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: cutechess-cli 0.6.0 released

Post by Ferdy »

Thanks for the update.

I have an issue here where cutechess has terminated the match prematurely with warning.
I have a series of CLI to run individual matches, it stopped after a
match with gaviota. So my other CLI were not executed. I have not used the debug option so this what I have only. Hardware has 4 cores with
8 threads (HT=on), run on Win 7 OS.

From console display:

Code: Select all

...
Finished game 100 (Gaviota_v0.86_64BIT vs Deuterium_v13.1.31.84_64BIT): 1-0 {Whi
te wins by adjudication}
Score of Deuterium_v13.1.31.84_64BIT vs Gaviota_v0.86_64BIT: 23 - 54 - 20  [0.34
0] 97
Finished game 97 (Deuterium_v13.1.31.84_64BIT vs Gaviota_v0.86_64BIT): 1/2-1/2 {
Draw by insufficient mating material}
Score of Deuterium_v13.1.31.84_64BIT vs Gaviota_v0.86_64BIT: 23 - 54 - 21  [0.34
2] 98
Finished game 99 (Deuterium_v13.1.31.84_64BIT vs Gaviota_v0.86_64BIT): 0-1 {Blac
k wins by adjudication}
Score of Deuterium_v13.1.31.84_64BIT vs Gaviota_v0.86_64BIT: 23 - 55 - 21  [0.33
8] 99
Finished game 98 (Gaviota_v0.86_64BIT vs Deuterium_v13.1.31.84_64BIT): 0-1 {Blac
k wins by adjudication}
Score of Deuterium_v13.1.31.84_64BIT vs Gaviota_v0.86_64BIT: 24 - 55 - 21  [0.34
5] 100
ELO Warning: EngineProcess: pipe reader was terminated
difference: -111
Finished match
My CLI from a batch file:

Code: Select all

set outpgn=.\games\g1-set1-3000pos-tc40in15s.pgn
set mygames=100
set myconcur=7
set mydraw=movenumber=80 movecount=5 score=10
set myresign=movecount=5 score=900
set inpgn1=file=.\opn\set1-3000pos-opening.pgn format=pgn order=sequential plies=60 start=1
set inpgn51=file=.\opn\set1-3000pos-opening.pgn format=pgn order=sequential plies=60 start=51
set inpgn101=file=.\opn\set1-3000pos-opening.pgn format=pgn order=sequential plies=60 start=101
set inpgn151=file=.\opn\set1-3000pos-opening.pgn format=pgn order=sequential plies=60 start=151
set inpgn201=file=.\opn\set1-3000pos-opening.pgn format=pgn order=sequential plies=60 start=201
set inpgn251=file=.\opn\set1-3000pos-opening.pgn format=pgn order=sequential plies=60 start=251
set inpgn301=file=.\opn\set1-3000pos-opening.pgn format=pgn order=sequential plies=60 start=301
set inpgn351=file=.\opn\set1-3000pos-opening.pgn format=pgn order=sequential plies=60 start=351
set inpgn401=file=.\opn\set1-3000pos-opening.pgn format=pgn order=sequential plies=60 start=401
set inpgn451=file=.\opn\set1-3000pos-opening.pgn format=pgn order=sequential plies=60 start=451
set inpgn501=file=.\opn\set1-3000pos-opening.pgn format=pgn order=sequential plies=60 start=501
set test_engine1=Deuterium_v12.01.30.1070_64BIT
set test_engine2=Deuterium_v13.1.31.84_64BIT


set Opp=RedQueen_v1.1.3_64BIT
cutechess-cli -engine conf=%test_engine1% tc=40/15 trust -engine conf=%Opp% tc=40/15 trust -games %mygames% -openings %inpgn1% -repeat -recover -concurrency %myconcur% -pgnout %outpgn% -draw %mydraw% -resign %myresign% -wait 5
cutechess-cli -engine conf=%test_engine2% tc=40/15 trust -engine conf=%Opp% tc=40/15 trust -games %mygames% -openings %inpgn1% -repeat -recover -concurrency %myconcur% -pgnout %outpgn% -draw %mydraw% -resign %myresign% -wait 5


set Opp=OctoChess_vr5132_64BIT_SSE4
cutechess-cli -engine conf=%test_engine1% tc=40/15 trust -engine conf=%Opp% tc=40/10 trust -games %mygames% -openings %inpgn1% -repeat -recover -concurrency %myconcur% -pgnout %outpgn% -draw %mydraw% -resign %myresign% -wait 5
cutechess-cli -engine conf=%test_engine2% tc=40/15 trust -engine conf=%Opp% tc=40/10 trust -games %mygames% -openings %inpgn1% -repeat -recover -concurrency %myconcur% -pgnout %outpgn% -draw %mydraw% -resign %myresign% -wait 5


set Opp=EXchess_v7.11b_64BIT
cutechess-cli -engine conf=%test_engine1% tc=40/15 trust -engine conf=%Opp% tc=40/15 trust -games %mygames% -openings %inpgn51% -repeat -recover -concurrency %myconcur% -pgnout %outpgn% -draw %mydraw% -resign %myresign% -wait 5
cutechess-cli -engine conf=%test_engine2% tc=40/15 trust -engine conf=%Opp% tc=40/15 trust -games %mygames% -openings %inpgn51% -repeat -recover -concurrency %myconcur% -pgnout %outpgn% -draw %mydraw% -resign %myresign% -wait 5


set Opp=Arasan_v15.6_64BIT
cutechess-cli -engine conf=%test_engine1% tc=40/15 trust -engine conf=%Opp% tc=40/10 trust -games %mygames% -openings %inpgn51% -repeat -recover -concurrency %myconcur% -pgnout %outpgn% -draw %mydraw% -resign %myresign% -wait 5
cutechess-cli -engine conf=%test_engine2% tc=40/15 trust -engine conf=%Opp% tc=40/10 trust -games %mygames% -openings %inpgn51% -repeat -recover -concurrency %myconcur% -pgnout %outpgn% -draw %mydraw% -resign %myresign% -wait 5


set Opp=Stockfish_v3_64BIT_POP_JA
cutechess-cli -engine conf=%test_engine1% tc=40/15 trust -engine conf=%Opp% tc=40/2 trust -games %mygames% -openings %inpgn101% -repeat -recover -concurrency %myconcur% -pgnout %outpgn% -draw %mydraw% -resign %myresign% -wait 5
cutechess-cli -engine conf=%test_engine2% tc=40/15 trust -engine conf=%Opp% tc=40/2 trust -games %mygames% -openings %inpgn101% -repeat -recover -concurrency %myconcur% -pgnout %outpgn% -draw %mydraw% -resign %myresign% -wait 5


set Opp=Gaviota_v0.86_64BIT
cutechess-cli -engine conf=%test_engine1% tc=40/15 trust -engine conf=%Opp% tc=40/10 trust -games %mygames% -openings %inpgn101% -repeat -recover -concurrency %myconcur% -pgnout %outpgn% -draw %mydraw% -resign %myresign% -wait 5
cutechess-cli -engine conf=%test_engine2% tc=40/15 trust -engine conf=%Opp% tc=40/10 trust -games %mygames% -openings %inpgn101% -repeat -recover -concurrency %myconcur% -pgnout %outpgn% -draw %mydraw% -resign %myresign% -wait 5


set Opp=Dirty_v20Apr2013_64BIT
cutechess-cli -engine conf=%test_engine1% tc=40/15 trust -engine conf=%Opp% tc=40/10 trust -games %mygames% -openings %inpgn151% -repeat -recover -concurrency %myconcur% -pgnout %outpgn% -draw %mydraw% -resign %myresign% -wait 5
cutechess-cli -engine conf=%test_engine2% tc=40/15 trust -engine conf=%Opp% tc=40/10 trust -games %mygames% -openings %inpgn151% -repeat -recover -concurrency %myconcur% -pgnout %outpgn% -draw %mydraw% -resign %myresign% -wait 5


set Opp=DiscoCheck_v4.2_64BIT_SSE4.2
cutechess-cli -engine conf=%test_engine1% tc=40/15 trust -engine conf=%Opp% tc=40/8 trust -games %mygames% -openings %inpgn151% -repeat -recover -concurrency %myconcur% -pgnout %outpgn% -draw %mydraw% -resign %myresign% -wait 5
cutechess-cli -engine conf=%test_engine2% tc=40/15 trust -engine conf=%Opp% tc=40/8 trust -games %mygames% -openings %inpgn151% -repeat -recover -concurrency %myconcur% -pgnout %outpgn% -draw %mydraw% -resign %myresign% -wait 5


set Opp=Hannibal_v1.2_64BIT
cutechess-cli -engine conf=%test_engine1% tc=40/15 trust -engine conf=%Opp% tc=40/3 trust -games %mygames% -openings %inpgn201% -repeat -recover -concurrency %myconcur% -pgnout %outpgn% -draw %mydraw% -resign %myresign% -wait 5
cutechess-cli -engine conf=%test_engine2% tc=40/15 trust -engine conf=%Opp% tc=40/3 trust -games %mygames% -openings %inpgn201% -repeat -recover -concurrency %myconcur% -pgnout %outpgn% -draw %mydraw% -resign %myresign% -wait 5


set Opp=Critter_v1.6a_64BIT
cutechess-cli -engine conf=%test_engine1% tc=40/25 trust -engine conf=%Opp% tc=40/2 trust -games %mygames% -openings %inpgn201% -repeat -recover -concurrency %myconcur% -pgnout %outpgn% -draw %mydraw% -resign %myresign% -wait 5
cutechess-cli -engine conf=%test_engine2% tc=40/25 trust -engine conf=%Opp% tc=40/2 trust -games %mygames% -openings %inpgn201% -repeat -recover -concurrency %myconcur% -pgnout %outpgn% -draw %mydraw% -resign %myresign% -wait 5


set Opp=iCE_1.0_v1619_64BIT_POP
cutechess-cli -engine conf=%test_engine1% tc=40/15 trust -engine conf=%Opp% tc=40/15 trust -games %mygames% -openings %inpgn251% -repeat -recover -concurrency %myconcur% -pgnout %outpgn% -draw %mydraw% -resign %myresign% -wait 5
cutechess-cli -engine conf=%test_engine2% tc=40/15 trust -engine conf=%Opp% tc=40/15 trust -games %mygames% -openings %inpgn251% -repeat -recover -concurrency %myconcur% -pgnout %outpgn% -draw %mydraw% -resign %myresign% -wait 5


set Opp=Frenzee_v3.5.19_64BIT
cutechess-cli -engine conf=%test_engine1% tc=40/15 trust -engine conf=%Opp% tc=40/8 trust -games %mygames% -openings %inpgn251% -repeat -recover -concurrency %myconcur% -pgnout %outpgn% -draw %mydraw% -resign %myresign% -wait 5
cutechess-cli -engine conf=%test_engine2% tc=40/15 trust -engine conf=%Opp% tc=40/8 trust -games %mygames% -openings %inpgn251% -repeat -recover -concurrency %myconcur% -pgnout %outpgn% -draw %mydraw% -resign %myresign% -wait 5


set Opp=Scorpio_v2.76_64BIT_POP_JA
cutechess-cli -engine conf=%test_engine1% tc=40/15 trust -engine conf=%Opp% tc=40/10 trust -games %mygames% -openings %inpgn301% -repeat -recover -concurrency %myconcur% -pgnout %outpgn% -draw %mydraw% -resign %myresign% -wait 5
cutechess-cli -engine conf=%test_engine2% tc=40/15 trust -engine conf=%Opp% tc=40/10 trust -games %mygames% -openings %inpgn301% -repeat -recover -concurrency %myconcur% -pgnout %outpgn% -draw %mydraw% -resign %myresign% -wait 5


set Opp=Crafty_v23.5_64BIT
cutechess-cli -engine conf=%test_engine1% tc=40/15 trust -engine conf=%Opp% tc=40/8 trust -games %mygames% -openings %inpgn301% -repeat -recover -concurrency %myconcur% -pgnout %outpgn% -draw %mydraw% -resign %myresign% -wait 5
cutechess-cli -engine conf=%test_engine2% tc=40/15 trust -engine conf=%Opp% tc=40/8 trust -games %mygames% -openings %inpgn301% -repeat -recover -concurrency %myconcur% -pgnout %outpgn% -draw %mydraw% -resign %myresign% -wait 5


set Opp=Godel_v2.3.7_64BIT
cutechess-cli -engine conf=%test_engine1% tc=40/15 trust -engine conf=%Opp% tc=40/25 trust -games %mygames% -openings %inpgn351% -repeat -recover -concurrency %myconcur% -pgnout %outpgn% -draw %mydraw% -resign %myresign% -wait 5
cutechess-cli -engine conf=%test_engine2% tc=40/15 trust -engine conf=%Opp% tc=40/25 trust -games %mygames% -openings %inpgn351% -repeat -recover -concurrency %myconcur% -pgnout %outpgn% -draw %mydraw% -resign %myresign% -wait 5


set Opp=Texel_v1.02_JA_64BIT
cutechess-cli -engine conf=%test_engine1% tc=40/15 trust -engine conf=%Opp% tc=40/5 trust -games %mygames% -openings %inpgn351% -repeat -recover -concurrency %myconcur% -pgnout %outpgn% -draw %mydraw% -resign %myresign% -wait 5
cutechess-cli -engine conf=%test_engine2% tc=40/15 trust -engine conf=%Opp% tc=40/5 trust -games %mygames% -openings %inpgn351% -repeat -recover -concurrency %myconcur% -pgnout %outpgn% -draw %mydraw% -resign %myresign% -wait 5


set Opp=Cheng3_v1.07_64BIT_JA
cutechess-cli -engine conf=%test_engine1% tc=40/15 trust -engine conf=%Opp% tc=40/15 trust -games %mygames% -openings %inpgn401% -repeat -recover -concurrency %myconcur% -pgnout %outpgn% -draw %mydraw% -resign %myresign% -wait 5
cutechess-cli -engine conf=%test_engine2% tc=40/15 trust -engine conf=%Opp% tc=40/15 trust -games %mygames% -openings %inpgn401% -repeat -recover -concurrency %myconcur% -pgnout %outpgn% -draw %mydraw% -resign %myresign% -wait 5


set Opp=Rodent_v1.0_64BIT_POP_JA
cutechess-cli -engine conf=%test_engine1% tc=40/15 trust -engine conf=%Opp% tc=40/15 trust -games %mygames% -openings %inpgn401% -repeat -recover -concurrency %myconcur% -pgnout %outpgn% -draw %mydraw% -resign %myresign% -wait 5
cutechess-cli -engine conf=%test_engine2% tc=40/15 trust -engine conf=%Opp% tc=40/15 trust -games %mygames% -openings %inpgn401% -repeat -recover -concurrency %myconcur% -pgnout %outpgn% -draw %mydraw% -resign %myresign% -wait 5
Other issue was after I run the result with bayeselo, found out 2 missing games with Arasan. One match was successfully completed with 100 games, the other was not.

Code: Select all

   1 Gaviota_v0.86_64BIT              118 200.0 (132.5 :  67.5) 
                                          100.0 ( 65.5 :  34.5) Deuterium_v13.1.31.84_64BIT       19
                                          100.0 ( 67.0 :  33.0) Deuterium_v12.01.30.1070_64BIT   -41
   2 EXchess_v7.11b_64BIT              48 200.0 (115.0 :  85.0) 
                                          100.0 ( 54.5 :  45.5) Deuterium_v13.1.31.84_64BIT       19
                                          100.0 ( 60.5 :  39.5) Deuterium_v12.01.30.1070_64BIT   -41
   3 OctoChess_vr5132_64BIT_SSE4       19 200.0 (107.5 :  92.5) 
                                          100.0 ( 46.0 :  54.0) Deuterium_v13.1.31.84_64BIT       19
                                          100.0 ( 61.5 :  38.5) Deuterium_v12.01.30.1070_64BIT   -41
   4 Deuterium_v13.1.31.84_64BIT       19 600.0 (312.0 : 288.0) 
                                          100.0 ( 34.5 :  65.5) Gaviota_v0.86_64BIT              118
                                          100.0 ( 45.5 :  54.5) EXchess_v7.11b_64BIT              48
                                          100.0 ( 54.0 :  46.0) OctoChess_vr5132_64BIT_SSE4       19
                                          100.0 ( 54.5 :  45.5) Arasan_v15.6_64BIT               -12
                                          100.0 ( 54.0 :  46.0) RedQueen_v1.1.3_64BIT            -12
                                          100.0 ( 69.5 :  30.5) Stockfish_v3_64BIT_POP_JA       -137
   5 Arasan_v15.6_64BIT               -12 198.0 ( 98.5 :  99.5) 
                                          100.0 ( 45.5 :  54.5) Deuterium_v13.1.31.84_64BIT       19
                                           98.0 ( 53.0 :  45.0) Deuterium_v12.01.30.1070_64BIT   -41
   6 RedQueen_v1.1.3_64BIT            -12 200.0 ( 99.5 : 100.5) 
                                          100.0 ( 46.0 :  54.0) Deuterium_v13.1.31.84_64BIT       19
                                          100.0 ( 53.5 :  46.5) Deuterium_v12.01.30.1070_64BIT   -41
   7 Deuterium_v12.01.30.1070_64BIT   -41 598.0 (265.5 : 332.5) 
                                          100.0 ( 33.0 :  67.0) Gaviota_v0.86_64BIT              118
                                          100.0 ( 39.5 :  60.5) EXchess_v7.11b_64BIT              48
                                          100.0 ( 38.5 :  61.5) OctoChess_vr5132_64BIT_SSE4       19
                                           98.0 ( 45.0 :  53.0) Arasan_v15.6_64BIT               -12
                                          100.0 ( 46.5 :  53.5) RedQueen_v1.1.3_64BIT            -12
                                          100.0 ( 63.0 :  37.0) Stockfish_v3_64BIT_POP_JA       -137
   8 Stockfish_v3_64BIT_POP_JA       -137 200.0 ( 67.5 : 132.5) 
                                          100.0 ( 30.5 :  69.5) Deuterium_v13.1.31.84_64BIT       19
                                          100.0 ( 37.0 :  63.0) Deuterium_v12.01.30.1070_64BIT   -41
I will try to run a match again with Arasan with debug and lets see if I can get some hints to the problem.
Last edited by Ferdy on Sat Jul 13, 2013 2:10 pm, edited 2 times in total.
Joerg Oster
Posts: 937
Joined: Fri Mar 10, 2006 4:29 pm
Location: Germany

Re: cutechess-cli 0.6.0 released

Post by Joerg Oster »

Thanks! Great tool! :D
Jörg Oster
User avatar
ilari
Posts: 750
Joined: Mon Mar 27, 2006 7:45 pm
Location: Finland

Re: cutechess-cli 0.6.0 released

Post by ilari »

Kai and Ferdinand,

Can you both try running your matches with the version I made for the Stockfish testing framework, and then report back with your results? The binary package is hosted at http://koti.mbnet.fi/~ilaripih/bin/cute ... -win32.zip
The version number may say "0.5.1-SF" but it has the same features as 0.6.0.

Thanks!