Cutechess-cli: A command line tool for engine-engine matches

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

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
User avatar
ilari
Posts: 750
Joined: Mon Mar 27, 2006 5:45 pm
Location: Finland
Contact:

Re: Cutechess-cli: A command line tool for engine-engine mat

Post by ilari » Fri Mar 27, 2009 1:08 pm

Edsel Apostol wrote:Is it possible to support milliseconds or centiseconds for the time control? It would be great if we can set the time increment to a fraction of a second for very fast games.
I'll look into it. For the time increment it should be no problem for UCI engines, but Xboard only supports seconds. As for whole games being played in less than a second, I expect problems. See this post by me: http://www.talkchess.com/forum/viewtopi ... 345#256345

User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 6:43 pm

Re: Cutechess-cli: A command line tool for engine-engine mat

Post by sje » Fri Mar 27, 2009 1:27 pm

ilari wrote:
Edsel Apostol wrote:Is it possible to support milliseconds or centiseconds for the time control? It would be great if we can set the time increment to a fraction of a second for very fast games.
I'll look into it. For the time increment it should be no problem for UCI engines, but Xboard only supports seconds. As for whole games being played in less than a second, I expect problems. See this post by me: http://www.talkchess.com/forum/viewtopi ... 345#256345
For my first chess programming efforts on slow 8 bit machines from the early 1970s, I used one second for the smallest time unit. By the mid 1980s, I was using centiseconds. Since 2000, it's been microseconds.

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

Re: Cutechess-cli: A command line tool for engine-engine mat

Post by ilari » Fri Mar 27, 2009 6:26 pm

sje wrote:For my first chess programming efforts on slow 8 bit machines from the early 1970s, I used one second for the smallest time unit. By the mid 1980s, I was using centiseconds. Since 2000, it's been microseconds.
Whoa! I use the Qt cross-platform framework. Its QTime and QTimer classes don't support anything smaller than milliseconds for obvious reasons, so that's what I'm using. And with QTimer even centisecond-precision isn't guaranteed on all platforms.

Marc Lacrosse
Posts: 511
Joined: Wed Mar 08, 2006 9:05 pm
Contact:

Re: Cutechess-cli: need some help

Post by Marc Lacrosse » Sun Mar 29, 2009 10:33 am

I just tried a match between Glaurung and Delfi with the following command :

Code: Select all

cccli.exe  -fcp name=Glaurung-2.2 dir=.\Glaurung-2.2 cmd=glaurung-w64.exe proto=uci uci/Threads 2 uci/Hash 256 -scp name=Delfi-5.4 dir=.\Delfi-5.4 cmd=delfi.exe proto=uci uci/Hash 128 -both tc=150/5+0 cpus=2 uci/ponder off uci/OwnBook false -variant Standard -draw 150 50 -resign 3 600 -event Test001 -pgnin sedat100.pgn -pgnout Test001.pgn -repeat -site ChessBazaar
I get the following error message :

Code: Select all

Warning: Invalid engine option: "2"
I cannot figure out where the problem is and how I could solve it.
"2" is present :
in "uci/Threads 2 " which is a valid uci option for Glaurung
in "-both (...) cpus=2" which is a valid Cutechess option.

Could you help me ?

Thanks

Marc

Edsel Apostol
Posts: 765
Joined: Mon Jul 17, 2006 3:53 am
Full name: Edsel Apostol
Contact:

Re: Cutechess-cli: need some help

Post by Edsel Apostol » Sun Mar 29, 2009 10:42 am

Marc Lacrosse wrote:I just tried a match between Glaurung and Delfi with the following command :

Code: Select all

cccli.exe  -fcp name=Glaurung-2.2 dir=.\Glaurung-2.2 cmd=glaurung-w64.exe proto=uci uci/Threads 2 uci/Hash 256 -scp name=Delfi-5.4 dir=.\Delfi-5.4 cmd=delfi.exe proto=uci uci/Hash 128 -both tc=150/5+0 cpus=2 uci/ponder off uci/OwnBook false -variant Standard -draw 150 50 -resign 3 600 -event Test001 -pgnin sedat100.pgn -pgnout Test001.pgn -repeat -site ChessBazaar
I get the following error message :

Code: Select all

Warning: Invalid engine option: "2"
I cannot figure out where the problem is and how I could solve it.
"2" is present :
in "uci/Threads 2 " which is a valid uci option for Glaurung
in "-both (...) cpus=2" which is a valid Cutechess option.

Could you help me ?

Thanks

Marc
Hi Marc,

Please try "uci/Threads=2 ".

Marc Lacrosse
Posts: 511
Joined: Wed Mar 08, 2006 9:05 pm
Contact:

Re: Cutechess-cli: need some help

Post by Marc Lacrosse » Sun Mar 29, 2009 10:48 am

OK, got it :
in the help that prints after you call cutechess with "--help" one reads :

Code: Select all

uci/<name> <arg>      Set UCI option <name> to value <arg>
This is erroneous.
It should be :

Code: Select all

uci/<name>=<arg>      Set UCI option <name> to value <arg>
(note the "=" sign instead of a space between <name> and <arg>

Marc

Marc Lacrosse
Posts: 511
Joined: Wed Mar 08, 2006 9:05 pm
Contact:

Re: Cutechess-cli: need some help

Post by Marc Lacrosse » Sun Mar 29, 2009 10:59 am

Edsel Apostol wrote: Hi Marc,
Please try "uci/Threads=2 ".
Thanks I just found it myself.

But now still another problem.

I have cutechess (renamed cccli.exe) in a directory.
this directory has several sub-folders, one per engine.
The one for Glaurung is named "Glaurung-2.2" and within this folder I have "glaurung-w64.exe"

my command begins with :

Code: Select all

cccli.exe  -fcp name=Glaurung-2.2 dir=.\Glaurung-2.2 cmd=glaurung-w64.exe proto=uci uci/Threads=2 uci/Hash=256 
but it does not work, I get :

Code: Select all

Warning&#58; Cannot start engine "glaurung-w64.exe"
What should I do ?

thanks in advance

Marc

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

Re: Cutechess-cli: need some help

Post by ilari » Sun Mar 29, 2009 11:11 am

Marc Lacrosse wrote:OK, got it :
in the help that prints after you call cutechess with "--help" one reads :

Code: Select all

uci/<name> <arg>      Set UCI option <name> to value <arg>
This is erroneous.
It should be :

Code: Select all

uci/<name>=<arg>      Set UCI option <name> to value <arg>
(note the "=" sign instead of a space between <name> and <arg>

Marc
You're right, I'll have to fix that in the next version. The command line parser could also be better at reporting errors.


Btw, I just tested some very quick matches (eg. 3 seconds per whole game) on Windows, and pretty much all the games ended as a loss on time. It happens because on Windows the ping time (the time it takes to send a "ping" or "isready" command to an engine and get a response) is usually over 100 ms, often even 200 ms. On Linux and OSX it's 0 or 1 ms, and even 1 second per game is very doable.

The cause for the horrible Windows performance is that QProcess polls for input about every 100 ms. I'll have to make some big changes to solve this one, so it might take some time.

Marc Lacrosse
Posts: 511
Joined: Wed Mar 08, 2006 9:05 pm
Contact:

Re: Cutechess-cli: need some help

Post by Marc Lacrosse » Sun Mar 29, 2009 12:08 pm

Marc Lacrosse wrote: But now still another problem.

I have cutechess (renamed cccli.exe) in a directory.
this directory has several sub-folders, one per engine.
The one for Glaurung is named "Glaurung-2.2" and within this folder I have "glaurung-w64.exe"

my command begins with :

Code: Select all

cccli.exe  -fcp name=Glaurung-2.2 dir=.\Glaurung-2.2 cmd=glaurung-w64.exe proto=uci uci/Threads=2 uci/Hash=256 
but it does not work, I get :

Code: Select all

Warning&#58; Cannot start engine "glaurung-w64.exe"
What should I do ?
By the way it works well with absolute paths.

Marc Lacrosse
Posts: 511
Joined: Wed Mar 08, 2006 9:05 pm
Contact:

Re: Cutechess-cli: a little problem with Bright 0.4a

Post by Marc Lacrosse » Sun Mar 29, 2009 12:40 pm

I have the following problem with Bright -0.4a :

I get the following error message and the first game won't begin :

Code: Select all

Invalid UCI option from "Bright-0.4a" &#58; "name UCI_Opponent type string"
when I launch bright from the command line there is effectively a "UCI-Opponent" uci option. This is the only option without a default value : is this the origin of the problem ?
It reads :
option name UCI_Opponent type string

I suppose your parser could well be hanging trying to get a default value ...

Marc

Post Reply