cutechess-cli 0.7.0

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

Moderators: hgm, Rebel, chrisw

Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: cutechess-cli 0.7.0

Post by Ferdy »

ilari wrote:Let me know if you still get that warning in some of your tests.
On a very fast tc of 1s + 50ms inc, I get this,
Started game 306 of 600 (Andscacs 0.72p vs D2015.1.35.247)
Started game 305 of 600 (D2015.1.35.247 vs Andscacs 0.72p)
Started game 307 of 600 (D2015.1.35.247 vs Andscacs 0.72p)
Warning: Can't write to PGN file .\games\g-D2015.1.35.247-t2-tc1s50ms-pgn.pgn
Warning: Can't write to PGN file .\games\g-D2015.1.35.247-t2-tc1s50ms-pgn.pgn
Warning: Can't write to PGN file .\games\g-D2015.1.35.247-t2-tc1s50ms-pgn.pgn
Finished game 301 (D2015.1.35.247 vs DiscoCheck 5.2.1): 0-1 {Black wins by adjud
ication}
Warning: Can't write to PGN file .\games\g-D2015.1.35.247-t2-tc1s50ms-pgn.pgn
Finished game 304 (DiscoCheck 5.2.1 vs D2015.1.35.247): 1-0 {White wins by adjud
ication}
Finished game 307 (D2015.1.35.247 vs Andscacs 0.72p): 0-1 {Black wins by adjudic
ation}
I don't use this kind of tc normally, just tried it in this new version of cutechess.
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: cutechess-cli 0.7.0

Post by Ferdy »

This is regarding warnings, from observation of the console output, the message,

Code: Select all

Warning: Can't write to PGN file ....
will show when one engine stalls, or something when engine loses on time.
Setup gauntlet, using epd file at random, tc 5s+100ms inc, concurrency is 4 on 8 physical cores cpu. Before those loses on time termination, there is no warning messages on "Can't write ...".

Code: Select all

[...]
Started game 150 of 900 (Arasan_18_x64_popcnt vs D2015.1.35.247)
Finished game 148 (SmarThink v1.7 vs D2015.1.35.247): 1-0 {White wins by adjudication}
Started game 151 of 900 (D2015.1.35.247 vs DiscoCheck 5.2.1)
Finished game 145 (D2015.1.35.247 vs Gaviota v1.0 64bit): 1-0 {Black's connection stalls}
Finished game 149 (D2015.1.35.247 vs Arasan_18_x64_popcnt): 1-0 {Black loses on time}
Finished game 150 (Arasan_18_x64_popcnt vs D2015.1.35.247): 0-1 {White loses on time}
Started game 152 of 900 (DiscoCheck 5.2.1 vs D2015.1.35.247)
Started game 154 of 900 (Hakkapeliitta 3.0 x64 vs D2015.1.35.247)
Started game 153 of 900 (D2015.1.35.247 vs Hakkapeliitta 3.0 x64)
Started game 156 of 900 (DiscoCheck 5.2.1 vs D2015.1.35.247)
Started game 155 of 900 (D2015.1.35.247 vs DiscoCheck 5.2.1)
Warning: Can't write to PGN file .\games\g-D2015.1.35.247-t1-tc-5splus100ms-epd.pgn
Finished game 151 (D2015.1.35.247 vs DiscoCheck 5.2.1): 0-1 {Black wins by adjudication}
Warning: Can't write to PGN file .\games\g-D2015.1.35.247-t1-tc-5splus100ms-epd.pgn
Finished game 152 (DiscoCheck 5.2.1 vs D2015.1.35.247): 1-0 {White wins by adjudication}
[...]
Even when there is "Can't write..." warning and after the gauntlet, cutechess will report complete game stats, in a summarized table, but in the final pgn output, there are missing games.

BTW indexing on 3.5 million epd lines is fast, less than 1 sec only on i7-2600k cpu, win 7.
User avatar
ilari
Posts: 750
Joined: Mon Mar 27, 2006 7:45 pm
Location: Finland

Re: cutechess-cli 0.7.0

Post by ilari »

Ferdy wrote:During compilation, I also got the gui. I tried the tournament, does this support concurrency? I tried to find it but could not.
The GUI is still at a pre-alpha stage and there's no option for changing the concurrency setting. In the source code you can change the default from 1 to whatever value you wish (gamemanager.cpp, line #334).
User avatar
ilari
Posts: 750
Joined: Mon Mar 27, 2006 7:45 pm
Location: Finland

Re: cutechess-cli 0.7.0

Post by ilari »

Ferdy wrote:This is regarding warnings, from observation of the console output, the message,

Code: Select all

Warning: Can't write to PGN file ....
will show when one engine stalls, or something when engine loses on time.
The "Can't write to PGN file" warning can be caused by two things:

1. The game doesn't have any tags set
2. The file cannot be opened

I'll see if I can reproduce the problem but in case I can't, could you change the PgnGame::write function so that it would output the reason why the writing won't happen? The function is at pgngame.cpp on line #312. The new function should look like this:

Code: Select all

bool PgnGame::write(const QString& filename, PgnMode mode) const
{
	if (m_tags.isEmpty())
	{
		qWarning("Tags are missing from the game");
		return false;
	}

	QFile file(filename);
	if (!file.open(QIODevice::WriteOnly | QIODevice::Append))
	{
		qWarning("PGN file cannot be opened");
		return false;
	}

	QTextStream out(&file);
	write(out, mode);
	return true;
}
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: cutechess-cli 0.7.0

Post by Ferdy »

ilari wrote:Long time no see, TalkChess! Yes, we had a little hackathon with Arto, which mostly consisted of debugging the Windows version.
Suggestions:
1. In the pgn output, add hmvc and fmvn in the FEN tag. Sample,
[Event "?"]
[Site "?"]
[Date "2015.08.30"]
[Round "2"]
[White "Cheng_4.39_x64"]
[Black "D2015.1.35.247"]
[Result "1/2-1/2"]
[FEN "1qr2k2/1r4pp/3RRp2/1p2pP2/p3Q3/P1P3P1/1P4KP/8 w - -"]
[PlyCount "41"]
[SetUp "1"]
[TimeControl "5+0.1"]
to
[FEN "1qr2k2/1r4pp/3RRp2/1p2pP2/p3Q3/P1P3P1/1P4KP/8 w - - 0 1"]
This happens when the supplied epd line to cutechess does not include the opcode hmvc and fmvn. Since this is a FEN tag I think it is reasonable to just add 0 for hmvc and 1 for fmvn.

2. Add termination tag to every pgn headers.
Sample,
[Event "?"]
[Site "?"]
[Date "2015.08.30"]
[Round "2"]
[White "Cheng_4.39_x64"]
[Black "D2015.1.35.247"]
[Result "1/2-1/2"]
[FEN "1qr2k2/1r4pp/3RRp2/1p2pP2/p3Q3/P1P3P1/1P4KP/8 w - -"]
[PlyCount "41"]
[SetUp "1"]
[TimeControl "5+0.1"]

1. h3 {+0.94/11 0.29s} Kg8 {-0.45/12 0.10s} 2. Qd5 {+0.96/13 0.28s}
Kh8 {-0.53/14 0.24s} 3. g4 {+1.04/13 0.28s} Rf8 {-0.49/12 0.22s}
4. h4 {+1.00/13 0.25s} Qc7 {-0.58/12 0.23s} 5. h5 {+0.67/11 0.24s}
h6 {-0.36/11 0.10s} 6. Rc6 {+0.54/14 0.27s} Qb8 {-0.55/12 0.18s}
7. Red6 {+0.43/14 0.26s} Kh7 {-0.45/12 0.12s} 8. Kf3 {+0.27/13 0.24s}
Re8 {-0.36/12 0.22s} 9. Ke4 {+0.26/14 0.22s} Qa7 {-0.24/11 0.21s}
10. Qc5 {+0.26/14 0.24s} Qa8 {-0.21/11 0.21s} 11. Kd3 {+0.13/12 0.21s}
Rd8 {-0.40/10 0.21s} 12. Ke3 {+0.16/15 0.21s} Qb8 {-0.18/11 0.13s}
13. Ra6 {+0.15/14 0.23s} Rc7 {0.00/14 0.24s} 14. Rac6 {0.00/15 0.20s}
Rxd6 {+1.10/17 0.35s} 15. Rxc7 {0.00/18 0.22s} Qd8 {0.00/16 0.071s}
16. Rc8 {0.00/17 0.17s} Rd3+ {0.00/19 0.072s} 17. Ke4 {0.00/19 0.18s}
Qd7 {0.00/21 0.11s} 18. Rc7 {0.00/19 0.20s} Qd8 {0.00/19 0.081s}
19. Rc8 {0.00/18 0.16s} Qd7 {0.00/28 0.070s} 20. Rc7 {0.00/20 0.20s}
Qd8 {0.00/22 0.12s} 21. Rc8 {0.00/19 0.16s, Draw by 3-fold repetition} 1/2-1/2
Change to,
[Event "?"]
[Site "?"]
[Date "2015.08.30"]
[Round "2"]
[White "Cheng_4.39_x64"]
[Black "D2015.1.35.247"]
[Result "1/2-1/2"]
[FEN "1qr2k2/1r4pp/3RRp2/1p2pP2/p3Q3/P1P3P1/1P4KP/8 w - -"]
[PlyCount "41"]
[SetUp "1"]
[Termination "Draw by 3-fold repetition"]
[TimeControl "5+0.1"]
[...]
This way it is easy to see what had happened by just looking at the headers, this is also convenient when parsing termination stats of every players from a given game files,
useful in engine development, especially those on time forfeits and illegal move loses, and those 3-fold repeats.
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: cutechess-cli 0.7.0

Post by Ferdy »

ilari wrote:
Ferdy wrote:This is regarding warnings, from observation of the console output, the message,

Code: Select all

Warning: Can't write to PGN file ....
will show when one engine stalls, or something when engine loses on time.
The "Can't write to PGN file" warning can be caused by two things:

1. The game doesn't have any tags set
2. The file cannot be opened

I'll see if I can reproduce the problem but in case I can't, could you change the PgnGame::write function so that it would output the reason why the writing won't happen? The function is at pgngame.cpp on line #312. The new function should look like this:

Code: Select all

bool PgnGame::write(const QString& filename, PgnMode mode) const
{
	if (m_tags.isEmpty())
	{
		qWarning("Tags are missing from the game");
		return false;
	}

	QFile file(filename);
	if (!file.open(QIODevice::WriteOnly | QIODevice::Append))
	{
		qWarning("PGN file cannot be opened");
		return false;
	}

	QTextStream out(&file);
	write(out, mode);
	return true;
}
Here is the output from updated code. It is all about PGN file cannot be opened.

Code: Select all

Started game 257 of 900 (D2015.1.35.247 vs Arasan_18_x64_popcnt)
Finished game 254 (Gaviota v1.0 64bit vs D2015.1.35.247): 0-1 {Black wins by adjudication}
Started game 258 of 900 (Arasan_18_x64_popcnt vs D2015.1.35.247)
Finished game 256 (SmarThink v1.7 vs D2015.1.35.247): 0-1 {White loses on time}
Finished game 255 (D2015.1.35.247 vs SmarThink v1.7): 1-0 {Black loses on time}
Started game 260 of 900 (DiscoCheck 5.2.1 vs D2015.1.35.247)
Started game 259 of 900 (D2015.1.35.247 vs DiscoCheck 5.2.1)
Started game 261 of 900 (D2015.1.35.247 vs Hakkapeliitta 3.0 x64)
Finished game 258 (Arasan_18_x64_popcnt vs D2015.1.35.247): 1/2-1/2 {Draw by 3-fold repetition}
Warning: PGN file cannot be opened
Warning: Can't write to PGN file .\games\g1.pgn
Warning: PGN file cannot be opened
Warning: Can't write to PGN file .\games\g1.pgn
Warning: PGN file cannot be opened
Warning: Can't write to PGN file .\games\g1.pgn
Finished game 250 (D2015.1.35.247 vs HIARCS 14 WCSC): 0-1 {Black wins by adjudication}
Patrice Duhamel
Posts: 193
Joined: Sat May 25, 2013 11:17 am
Location: France
Full name: Patrice Duhamel

Re: cutechess-cli 0.7.0

Post by Patrice Duhamel »

Thanks for the new version.

I noticed that the new version (in Windows) doesn't like extra spaces between command line parameters, but it's not a big problem.
User avatar
ilari
Posts: 750
Joined: Mon Mar 27, 2006 7:45 pm
Location: Finland

Re: cutechess-cli 0.7.0

Post by ilari »

Ferdy wrote: Suggestions:
1. In the pgn output, add hmvc and fmvn in the FEN tag. Sample,
[Event "?"]
[Site "?"]
[Date "2015.08.30"]
[Round "2"]
[White "Cheng_4.39_x64"]
[Black "D2015.1.35.247"]
[Result "1/2-1/2"]
[FEN "1qr2k2/1r4pp/3RRp2/1p2pP2/p3Q3/P1P3P1/1P4KP/8 w - -"]
[PlyCount "41"]
[SetUp "1"]
[TimeControl "5+0.1"]
to
[FEN "1qr2k2/1r4pp/3RRp2/1p2pP2/p3Q3/P1P3P1/1P4KP/8 w - - 0 1"]
This happens when the supplied epd line to cutechess does not include the opcode hmvc and fmvn. Since this is a FEN tag I think it is reasonable to just add 0 for hmvc and 1 for fmvn.
Sounds very reasonable and easy to implement. I've created an issue about this: https://github.com/cutechess/cutechess/issues/17
BWT, anyone with a GitHub account can open new issues on our page. That's the best way to report bugs or request new features. Also, we really appreciate pull requests.

Ferdy wrote:2. Add termination tag to every pgn headers.
Sample,
[Event "?"]
[Site "?"]
[Date "2015.08.30"]
[Round "2"]
[White "Cheng_4.39_x64"]
[Black "D2015.1.35.247"]
[Result "1/2-1/2"]
[FEN "1qr2k2/1r4pp/3RRp2/1p2pP2/p3Q3/P1P3P1/1P4KP/8 w - -"]
[PlyCount "41"]
[SetUp "1"]
[TimeControl "5+0.1"]

1. h3 {+0.94/11 0.29s} Kg8 {-0.45/12 0.10s} 2. Qd5 {+0.96/13 0.28s}
Kh8 {-0.53/14 0.24s} 3. g4 {+1.04/13 0.28s} Rf8 {-0.49/12 0.22s}
4. h4 {+1.00/13 0.25s} Qc7 {-0.58/12 0.23s} 5. h5 {+0.67/11 0.24s}
h6 {-0.36/11 0.10s} 6. Rc6 {+0.54/14 0.27s} Qb8 {-0.55/12 0.18s}
7. Red6 {+0.43/14 0.26s} Kh7 {-0.45/12 0.12s} 8. Kf3 {+0.27/13 0.24s}
Re8 {-0.36/12 0.22s} 9. Ke4 {+0.26/14 0.22s} Qa7 {-0.24/11 0.21s}
10. Qc5 {+0.26/14 0.24s} Qa8 {-0.21/11 0.21s} 11. Kd3 {+0.13/12 0.21s}
Rd8 {-0.40/10 0.21s} 12. Ke3 {+0.16/15 0.21s} Qb8 {-0.18/11 0.13s}
13. Ra6 {+0.15/14 0.23s} Rc7 {0.00/14 0.24s} 14. Rac6 {0.00/15 0.20s}
Rxd6 {+1.10/17 0.35s} 15. Rxc7 {0.00/18 0.22s} Qd8 {0.00/16 0.071s}
16. Rc8 {0.00/17 0.17s} Rd3+ {0.00/19 0.072s} 17. Ke4 {0.00/19 0.18s}
Qd7 {0.00/21 0.11s} 18. Rc7 {0.00/19 0.20s} Qd8 {0.00/19 0.081s}
19. Rc8 {0.00/18 0.16s} Qd7 {0.00/28 0.070s} 20. Rc7 {0.00/20 0.20s}
Qd8 {0.00/22 0.12s} 21. Rc8 {0.00/19 0.16s, Draw by 3-fold repetition} 1/2-1/2
Change to,
[Event "?"]
[Site "?"]
[Date "2015.08.30"]
[Round "2"]
[White "Cheng_4.39_x64"]
[Black "D2015.1.35.247"]
[Result "1/2-1/2"]
[FEN "1qr2k2/1r4pp/3RRp2/1p2pP2/p3Q3/P1P3P1/1P4KP/8 w - -"]
[PlyCount "41"]
[SetUp "1"]
[Termination "Draw by 3-fold repetition"]
[TimeControl "5+0.1"]
[...]
This way it is easy to see what had happened by just looking at the headers, this is also convenient when parsing termination stats of every players from a given game files,
useful in engine development, especially those on time forfeits and illegal move loses, and those 3-fold repeats.
This also sounds good, but we try to conform very strictly to the PGN standard, and the standard says that the "Termination" tag can have one of the following values:

* "abandoned"
* "adjudication"
* "death"
* "emergency"
* "normal"
* "rules infraction"
* "time forfeit"
* "unterminated"

It looks like "Draw by 3-fold repetition" for example would fall under "normal". Maybe we could use some other tag for this?
melajara
Posts: 213
Joined: Thu Dec 16, 2010 4:39 pm

Re: cutechess-cli 0.7.0

Post by melajara »

Ferdinand, could you make available your Windows compile with the GUI somewhere for downloading it?

The 32bits official compile doesn't include the GUI and AFAIK there is not much choice for a lightweight chess engine GUI manager, I'm currrently using Tarrasch but it's buggy.
Per ardua ad astra
User avatar
Bloodbane
Posts: 154
Joined: Thu Oct 03, 2013 4:17 pm

Re: cutechess-cli 0.7.0

Post by Bloodbane »

Kiitos paljon uudesta versiosta erittäin hyödyllisestä ohjelmasta. Do you have any idea when pondering will be supported? If I remember correctly it was not supported in earlier versions, and that is a pretty important feature to have.
Functional programming combines the flexibility and power of abstract mathematics with the intuitive clarity of abstract mathematics.
https://github.com/mAarnos