Basic Questions About CuteChess

Discussion of chess software programming and technical issues.

Moderator: Ras

JoAnnP38
Posts: 253
Joined: Mon Aug 26, 2019 4:34 pm
Location: Clearwater, Florida USA
Full name: JoAnn Peeler

Basic Questions About CuteChess

Post by JoAnnP38 »

I just downloaded the Cute Chess app/tools and I'm starting to familiarize myself with it. Originally, I was going to build my own tournament tool that would closely integrate with Pedantic's GA/database. However, now that I'm looking at Cute Chess, I'm thinking there is no reason to reinvent the wheel if I can effectively use this tool. However, I have a couple of questions for you guys that use this tool. I am going to setup a series of single elimination tournaments with 64 participants and each bracket or match will consist of two games so that each side can play each color. My questions are this:
  1. Are the results of the tournament stored somewhere that I have access to? In the GUI it gives me the results from the Tournament menu, but I haven't been able to find where it stores this. Or do I need to parse through the output PGN to reconstruct the results?
  2. What happens if after two games (each encounter) they are tied? How does Cute Chess determine who advances?
  3. Under the Tools>Settings menu each engine can be configured with "Init Strings". What are these? Are they passed to the engine during the UCI comm or something else?
User avatar
Roland Chastain
Posts: 680
Joined: Sat Jun 08, 2013 10:07 am
Location: France
Full name: Roland Chastain

Re: Basic Questions About CuteChess

Post by Roland Chastain »

Hello!

I don't have the answer to all your questions, but since I see that you didn't yet receive an answer, I will try to give my two cents.

For me I didn' t use the GUI, but the command-line tool, cutechess-cli. Maybe you could consider that option.

Here is an example of a script that I use on Linux:

Code: Select all

cc=/home/roland/Documents/echecs/sources/cutechess/130/beta4/build/cutechess-cli
$cc \
-rounds 100 \
-variant caparandom \
-repeat \
-engine name="Durandal 0.1.3" cmd=durandal64 dir=. proto=uci \
-engine conf="Durandal 0.1.0" \
-engine conf="Durandal 0.1.1" \
-engine conf="Durandal 0.1.2" \
-engine name="Durandal 0.1.1 [random]" cmd=random64 dir=. proto=uci \
-pgnout tournoi-capablanca.pgn \
-each tc=40/20 \
-wait 2000 2>> tournoi-capablanca.err | tee tournoi-capablanca.log
And an example for Windows:

Code: Select all

set cutechess=%~d0\applications\echecs\cutechess-cli\cutechess-cli_x86.exe
set tee=%~d0\applications\coreutils\bin\tee.exe

%cutechess% -rounds 80 ^
-variant caparandom ^
-engine name="Durandal 0.1.3" cmd=durandal32.exe dir=. proto=uci ^
-engine name="Durandal 0.1.0" cmd=durandal32.exe dir=.\engines\durandal\010 proto=uci ^
-engine name="Durandal 0.1.1" cmd=durandal32.exe dir=.\engines\durandal\011 proto=uci ^
-engine name="Durandal 0.1.2" cmd=durandal32.exe dir=.\engines\durandal\012 proto=uci ^
-engine name="Durandal 0.1.1 [random]" cmd=random32.exe dir=. proto=uci ^
-pgnout %~dpn0.pgn ^
-each tc=40/20 ^
-wait 500 2>> %~dpn0.err | %tee% %~dpn0.log
So, as you can see, I have the results of the tournaments in a text file (in that case tournoi-capablanca.log). It's simply the output of cutechess-cli. I have the games in another file (tournoi-capablanca.pgn). I have also a file with error messages from Cutechess.

I don't know how to get the same file with Cutechess GUI.

For your question about "Init Strings", it is indeed a uci command that Cutechess sends to the engine. For example, in my engines.json, I have this for Rodent II:

Code: Select all

  {
    "command" : "rodentII",
    "name" : "Rodent II 0.9.68",
    "protocol" : "uci",
    "initStrings" : [
			"setoption name PersonalityFile value personalities/famous/anand.txt"
		],
    "workingDirectory" : "/home/roland/Documents/echecs/sources/rodent-ii"
  },
Rodent II will be started with that option, and will play with the desired personnality.

Hope that it helps.

Regards.

Roland
Qui trop embrasse mal étreint.
JoAnnP38
Posts: 253
Joined: Mon Aug 26, 2019 4:34 pm
Location: Clearwater, Florida USA
Full name: JoAnn Peeler

Re: Basic Questions About CuteChess

Post by JoAnnP38 »

Roland Chastain wrote: Thu Feb 02, 2023 2:32 pm Hello!

I don't have the answer to all your questions, but since I see that you didn't yet receive an answer, I will try to give my two cents.

For me I didn' t use the GUI, but the command-line tool, cutechess-cli. Maybe you could consider that option.
Thank you! I did end up using cutechess-cli and it turns out the results are written to the output. In my situation I exceeded window's maximum 8K command-line so I also had to create an engines.json file. So that solves my first question. However, since I am setting up a tournament in using the knockout format I am having trouble interpreting those results. I was expecting a typical bracket format where the first round had 32 matches, the second 16, and so forth culminating in the final match that determines the winner. However, it does something I am unfamiliar with. Here is the output of one of my most recent tests.

Code: Select all

63da147260961e01d917f025
		63da147260961e01d917f025 (2.5-1.5)
63da147260961e01d917effc
				63da147260961e01d917f025 (1.5-0.5)
63da147260961e01d917f019
		63da147260961e01d917f019 (1.5-0.5)
63da147260961e01d917f00d
						63da147260961e01d917f025 (1.5-0.5)
63da147260961e01d917efeb
		63da147260961e01d917efeb (2-0)
63da147260961e01d917f01b
				63da147260961e01d917f01f (0-2)
63da147260961e01d917f01f
		63da147260961e01d917f01f (2-0)
63da147260961e01d917f018
								63da147260961e01d917f025 (1.5-0.5)
63da147260961e01d917effb
		63da147260961e01d917f024 (0.5-1.5)
63da147260961e01d917f024
				63da147260961e01d917f022 (0-2)
63da147260961e01d917f022
		63da147260961e01d917f022 (1.5-0.5)
63da147260961e01d917f01c
						63da147260961e01d917f022 (2-0)
63da147260961e01d917f00b
		63da147260961e01d917f001 (1-3)
63da147260961e01d917f001
				63da147260961e01d917f013 (0-2)
63da147260961e01d917f00c
		63da147260961e01d917f013 (2.5-3.5)
63da147260961e01d917f013
										63da147260961e01d917f025 (1.5-0.5)
63da147260961e01d917efff
		63da147260961e01d917eff2 (0.5-1.5)
63da147260961e01d917eff2
				63da147260961e01d917f003 (1.5-2.5)
63da147260961e01d917eff3
		63da147260961e01d917f003 (0-2)
63da147260961e01d917f003
						63da147260961e01d917f003 (2-0)
63da147260961e01d917efef
		63da147260961e01d917efef (2-0)
63da147260961e01d917eff4
				63da147260961e01d917efef (1.5-0.5)
63da147260961e01d917f009
		63da147260961e01d917f009 (2-0)
63da147260961e01d917f021
								63da147260961e01d917f017 (1.5-2.5)
63da147260961e01d917f016
		63da147260961e01d917f016 (4-2)
63da147260961e01d917f000
				63da147260961e01d917f016 (2-0)
63da147260961e01d917f014
		63da147260961e01d917f014 (2-0)
63da147260961e01d917f004
						63da147260961e01d917f017 (0.5-1.5)
63da147260961e01d917f028
		63da147260961e01d917f017 (0-2)
63da147260961e01d917f017
				63da147260961e01d917f017 (2-0)
63da147260961e01d917effe
		63da147260961e01d917f006 (2-4)
63da147260961e01d917f006
												63da147260961e01d917efe9 (0-2)
63da147260961e01d917f012
		63da147260961e01d917f007 (0.5-1.5)
63da147260961e01d917f007
				63da147260961e01d917f007 (1.5-0.5)
63da147260961e01d917eff5
		63da147260961e01d917f020 (0.5-1.5)
63da147260961e01d917f020
						63da147260961e01d917f00e (0-2)
63da147260961e01d917eff9
		63da147260961e01d917f00e (1.5-2.5)
63da147260961e01d917f00e
				63da147260961e01d917f00e (1.5-0.5)
63da147260961e01d917f011
		63da147260961e01d917effd (1.5-2.5)
63da147260961e01d917effd
								63da147260961e01d917efec (0-2)
63da147260961e01d917f023
		63da147260961e01d917efee (0-2)
63da147260961e01d917efee
				63da147260961e01d917efea (0.5-1.5)
63da147260961e01d917efea
		63da147260961e01d917efea (2-0)
63da147260961e01d917eff7
						63da147260961e01d917efec (0-2)
63da147260961e01d917efec
		63da147260961e01d917efec (2-0)
63da147260961e01d917f01d
				63da147260961e01d917efec (1.5-0.5)
63da147260961e01d917eff1
		63da147260961e01d917f005 (0.5-1.5)
63da147260961e01d917f005
										63da147260961e01d917efe9 (0-2)
63da147260961e01d917efed
		63da147260961e01d917f010 (2.5-3.5)
63da147260961e01d917f010
				63da147260961e01d917f010 (1.5-0.5)
63da147260961e01d917f002
		63da147260961e01d917f008 (0.5-1.5)
63da147260961e01d917f008
						63da147260961e01d917efe9 (0-2)
63da147260961e01d917efe9
		63da147260961e01d917efe9 (2-0)
63da147260961e01d917f015
				63da147260961e01d917efe9 (2-0)
63da147260961e01d917eff8
		63da147260961e01d917eff0 (0-2)
63da147260961e01d917eff0
								63da147260961e01d917efe9 (2-0)
63da147260961e01d917f026
		63da147260961e01d917f026 (2-0)
63da147260961e01d917effa
				63da147260961e01d917eff6 (1.5-2.5)
63da147260961e01d917eff6
		63da147260961e01d917eff6 (1.5-0.5)
63da147260961e01d917f00a
						63da147260961e01d917f027 (3.5-4.5)
63da147260961e01d917f027
		63da147260961e01d917f027 (1.5-0.5)
63da147260961e01d917f01a
				63da147260961e01d917f027 (2-0)
63da147260961e01d917f00f
		63da147260961e01d917f00f (3-1)
63da147260961e01d917f01e

It looks like cute chess is trying to represent the results of the brackets with the spacing of the results. But if that is so it looks like the winner won by losing two games in the final?!?!

I also figured out how ties are resolved -- extra games are played until the tie is resolved. That's another question answered. However, I may be easier to reconstruct the tournament by parsing PGN file instead of the results. That's my next task.
JoAnnP38
Posts: 253
Joined: Mon Aug 26, 2019 4:34 pm
Location: Clearwater, Florida USA
Full name: JoAnn Peeler

Re: Basic Questions About CuteChess

Post by JoAnnP38 »

JoAnnP38 wrote: Thu Feb 02, 2023 8:24 pm ... since I am setting up a tournament in using the knockout format I am having trouble interpreting those results. I was expecting a typical bracket format where the first round had 32 matches, the second 16, and so forth culminating in the final match that determines the winner. However, it does something I am unfamiliar with.
I was wrong. It is a standard bracket format. However, because extra games are played to resolve ties in order to advance more games were being played than expected. Cool beans.
jkominek
Posts: 69
Joined: Tue Sep 04, 2018 5:33 am
Full name: John Kominek

Re: Basic Questions About CuteChess

Post by jkominek »

I have my own basic question about cutechess. I hope it is not too out-of-form to use this thread.

What is the string format for multi-phase time controls?

To give a particular example, this is the time control string from TCEC Season 1, taken from the archived pgn file is 40/6000:20/3000:1200+10.

cutechess-cli interprets this as game/40s + 10s increment. (I'm using version 1.2.0.) The intention is for colon to be the major field separator, but to cutechess that signals that the time control is specified in mm:ss format.

As far as I can tell cutechess does not support multi-phase time controls, such as the venerable WC classical format of 40/2h, 20/1h, game/1h+30s. As a feature request, a comma would work nicely to separate game phase time controls, i.e. "40/7200,20/3600,3600+30" or "40/120:0,20/60:0,60:0+30".

Perhaps I'm misunderstanding something about how cutechess works.
User avatar
Roland Chastain
Posts: 680
Joined: Sat Jun 08, 2013 10:07 am
Location: France
Full name: Roland Chastain

Re: Basic Questions About CuteChess

Post by Roland Chastain »

jkominek wrote: Sat Feb 04, 2023 10:31 am What is the string format for multi-phase time controls?
I wouldn't call that a basic question. For me, I didn't even know that multi-phase time controls existed. You learned me something.

I doubt that CuteChess supports it. CuteChess uses UCI and CECP protocol, and I have never heard of such an option, neither in UCI nor in CECP. But maybe I am wrong, and somebody will correct me.
Qui trop embrasse mal étreint.
Modern Times
Posts: 3703
Joined: Thu Jun 07, 2012 11:02 pm

Re: Basic Questions About CuteChess

Post by Modern Times »

This sort of time control is supported in Shredder GUI, so it will be part of the UCI protocol then.

http://ccrl.chessdom.com/public/time.png
jkominek
Posts: 69
Joined: Tue Sep 04, 2018 5:33 am
Full name: John Kominek

Re: Basic Questions About CuteChess

Post by jkominek »

Modern Times wrote: Sat Feb 04, 2023 8:16 pm This sort of time control is supported in Shredder GUI, so it will be part of the UCI protocol then.

http://ccrl.chessdom.com/public/time.png
That capability is probably courtesy of the Shredder UI. SMK's UCI protocol is more low level. It allows the controlling program to tell the engine how much time is available, and optionally how many moves to the end of the current time control. I believe it is up to the controlling program to manage the time information of each game phase, if there are more than one.

From the UCI specification.
* wtime
white has x msec left on the clock
* btime
black has x msec left on the clock
* winc
white increment per move in mseconds if x > 0
* binc
black increment per move in mseconds if x > 0
* movestogo
there are x moves to the next time control,
this will only be sent if x > 0,
if you don't get this and get the wtime and btime it's sudden death
After a quick look at timecontrol.cpp of cutechess, indeed it will parse my example string into game/40s + 10s increment, ignoring the "junk" in between. Support for multi-phase game controls would have to happen higher up in the controller (building multiple TimeControl objects during a game), but I don't see it. Anyway, I suppose it's best if I head over to the cutechess 1.3.0 beta thread and ask there, and stop with the hijacking of JoAnn's thread.

P.S. The obvious did not occur to me until a moment ago: in the early seasons of TCEC Martin T. did not use cutechess. He probably used the Chessbase Fritz interface.
Modern Times
Posts: 3703
Joined: Thu Jun 07, 2012 11:02 pm

Re: Basic Questions About CuteChess

Post by Modern Times »

jkominek wrote: Sat Feb 04, 2023 9:29 pm P.S. The obvious did not occur to me until a moment ago: in the early seasons of TCEC Martin T. did not use cutechess. He probably used the Chessbase Fritz interface.
He used ChessGUI for a very long period of time. I don't think he ever used Chessbase but I could be wrong.
JoAnnP38
Posts: 253
Joined: Mon Aug 26, 2019 4:34 pm
Location: Clearwater, Florida USA
Full name: JoAnn Peeler

Re: Basic Questions About CuteChess

Post by JoAnnP38 »

jkominek wrote: Sat Feb 04, 2023 10:31 am I have my own basic question about cutechess. I hope it is not too out-of-form to use this thread.
By all means!