MATCH sanity

Discussion of chess software programming and technical issues.

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Ferdy
Posts: 4043
Joined: Sun Aug 10, 2008 1:15 pm
Location: Philippines

Re: MATCH sanity

Post by Ferdy » Thu May 04, 2017 10:21 am

Rebel wrote:
Ferdy wrote:
Rebel wrote:I have a tool that reports time-forfeits during a match by parsing the PGN. Are there other known irregularities in the PGN output of cutechess-cli and Arena? I want to add them.
In the pgn tag section from cutechess.

Code: Select all

void PgnGame::setResult(const Chess::Result& result)
{
	setTag("Result", result.toShortString());

	switch (result.type())
	{
	case Chess::Result::Adjudication:
		setTag("Termination", "adjudication");
		break;
	case Chess::Result::Timeout:
		setTag("Termination", "time forfeit");
		break;
	case Chess::Result::Disconnection:
		setTag("Termination", "abandoned");
		break;
	case Chess::Result::StalledConnection:
		setTag("Termination", "stalled connection");
		break;
	case Chess::Result::IllegalMove:
		setTag("Termination", "illegal move");
		break;
	case Chess::Result::NoResult:
		setTag("Termination", "unterminated");
		break;
	default:
		setTag("Termination", QString());
		break;
	}
}
That was helpful. I now have it all automatic during a match. Still (so now and then) I am having a problem with Cute. It happens in draw cases (draw repetitions, 50 move rules, stalemate and insufficient material). There are hundreds of them but occasionally Cute gives a [Termination=abandoned] and disconnects. No idea why that is, no such problems with other interfaces. I am using 0.8.2.
The code above is from Cutechess after 1883 commits (the latest so far). Version 0.8.2 is older. Not sure if there are changes to Termination tag code since 0.8.2.
https://github.com/cutechess/cutechess

There are basically 2 areas where comments related to termination can be found in a game.
1. Termination tag
2. Termination marker

Example 1, without termination tag under tag section but with termination marker under movetext section.
[Event "?"]
[Site "?"]
[Date "2017.05.02"]
[Round "299"]
[White "D2017.1.35.399"]
[Black "D2017.1.35.396"]
[Result "1/2-1/2"]
[ECO "E10"]
[Opening "Queen's pawn game"]
[PlyCount "89"]
[TimeControl "60+0.1"]

1. d4 {book} Nf6 {book} 2. c4 {book} e6 {book} 3. Nf3 {book} d5 {book}
4. Nc3 {book} Nbd7 {book} 5. Qc2 {book} Be7 {book} 6. Bf4 {book} c6 {book}
7. e3 {book} O-O {book} 8. Rd1 {book} a6 {book} 9. cxd5 {+0.47/17 3.4s}
Nxd5 {-0.48/15 0.92s} 10. Nxd5 {+0.47/16 2.0s} exd5 {-0.43/18 2.9s}
11. Bd3 {+0.63/17 1.8s} Nf6 {-0.37/16 2.9s} 12. O-O {+0.37/15 1.1s}
Bg4 {-0.24/16 1.9s} 13. Be5 {+0.16/15 1.5s} Bd6 {-0.12/16 0.85s}
14. Rc1 {+0.08/16 1.8s} Bxf3 {0.00/18 1.6s} 15. gxf3 {+0.16/15 1.6s}
g6 {-0.01/16 1.6s} 16. Bg3 {-0.03/16 1.3s} Nh5 {0.00/15 1.7s}
17. Qb3 {+0.05/16 1.2s} Rb8 {+0.04/14 0.79s} 18. a3 {0.00/15 1.2s}
Re8 {-0.03/14 1.5s} 19. Rc3 {-0.03/13 1.0s} Qd7 {0.00/14 1.5s}
20. Rfc1 {-0.02/15 1.2s} a5 {0.00/16 1.3s} 21. Be2 {0.00/16 1.6s}
Nxg3 {0.00/15 1.4s} 22. hxg3 {0.00/19 0.91s} h5 {+0.21/14 1.4s}
23. Kg2 {+0.02/14 1.6s} Ra8 {-0.07/14 0.58s} 24. Qa4 {+0.10/13 0.62s}
h4 {+0.14/17 3.8s} 25. gxh4 {0.00/18 1.8s} Kg7 {+0.01/19 3.3s}
26. Rh1 {-0.03/16 0.56s} Rh8 {+0.13/16 1.1s} 27. f4 {-0.06/16 1.9s}
Qe7 {0.00/15 0.88s} 28. Bf3 {+0.08/16 2.6s} Rxh4 {-0.14/15 0.53s}
29. Rcc1 {0.00/17 1.4s} Rah8 {0.00/16 0.82s} 30. Qxa5 {0.00/15 1.1s}
Qf6 {0.00/15 0.48s} 31. Qd2 {-0.31/15 0.68s} Rxh1 {+0.18/16 0.61s}
32. Rxh1 {-0.30/18 0.54s} Rxh1 {+0.22/16 0.32s} 33. Kxh1 {-0.15/16 0.35s}
g5 {+0.25/15 0.76s} 34. Qd3 {-0.01/16 0.77s} gxf4 {0.00/16 0.75s}
35. e4 {0.00/14 0.30s} Qg6 {+0.12/14 1.1s} 36. Qe2 {-0.09/13 0.33s}
dxe4 {0.00/15 0.66s} 37. Bxe4 {0.00/14 0.51s} Qg5 {0.00/13 0.56s}
38. Qd3 {+0.19/14 0.73s} f3 {0.00/13 0.37s} 39. Qxf3 {0.00/16 0.38s}
Kf8 {0.00/15 0.34s} 40. d5 {0.00/16 0.41s} Qc1+ {0.00/16 0.42s}
41. Kg2 {0.00/19 0.26s} Qg5+ {0.00/18 0.30s} 42. Kf1 {0.00/21 0.34s}
Qc1+ {0.00/20 0.30s} 43. Kg2 {0.00/22 0.61s} Qg5+ {0.00/20 0.51s}
44. Kf1 {0.00/27 0.24s} Qc1+ {0.00/21 0.57s}
45. Kg2 {0.00/24 0.54s, Draw by 3-fold repetition} 1/2-1/2
Example 2, with Termination tag and termination marker.
[Event "?"]
[Site "?"]
[Date "2017.05.02"]
[Round "300"]
[White "D2017.1.35.396"]
[Black "D2017.1.35.399"]
[Result "1/2-1/2"]
[ECO "E10"]
[Opening "Queen's pawn game"]
[PlyCount "169"]
[Termination "adjudication"]
[TimeControl "60+0.1"]

1. d4 {book} Nf6 {book} 2. c4 {book} e6 {book} 3. Nf3 {book} d5 {book}
4. Nc3 {book} Nbd7 {book} 5. Qc2 {book} Be7 {book} 6. Bf4 {book} c6 {book}
7. e3 {book} O-O {book} 8. Rd1 {book} a6 {book} 9. cxd5 {+0.36/17 4.1s}
cxd5 {-0.35/17 5.2s} 10. Bd3 {+0.31/16 0.89s} b5 {-0.28/15 1.2s}
11. O-O {+0.29/16 1.9s} Bb7 {-0.30/16 1.9s} 12. Qb1 {+0.46/13 0.76s}
Rc8 {-0.30/14 1.8s} 13. Rc1 {+0.31/14 1.7s} h6 {-0.41/13 2.6s}
14. Rfd1 {+0.29/13 1.3s} Qa5 {-0.22/15 2.2s} 15. a3 {+0.23/14 1.3s}
Nb6 {-0.18/14 1.0s} 16. Ne5 {+0.24/13 0.96s} Nc4 {-0.19/14 1.1s}
17. Ne2 {+0.14/13 3.3s} Rfd8 {-0.11/11 0.92s} 18. h3 {0.00/11 1.6s}
Bd6 {-0.07/10 0.67s} 19. Qa2 {+0.02/11 0.74s} Qb6 {+0.04/10 0.81s}
20. Bg3 {0.00/12 1.0s} Nh5 {0.00/12 1.5s} 21. Bh2 {0.00/14 1.2s}
Nf6 {0.00/13 0.58s} 22. Bg3 {0.00/16 0.57s} Bxe5 {+0.26/16 1.9s}
23. dxe5 {-0.20/15 1.4s} Nd7 {+0.35/13 1.3s} 24. b3 {-0.19/13 0.59s}
Ncxe5 {+0.24/13 1.2s} 25. Bb1 {-0.18/13 1.1s} a5 {+0.16/12 1.3s}
26. Qb2 {-0.17/13 2.0s} f6 {+0.17/13 0.73s} 27. Qd4 {-0.32/13 0.91s}
b4 {+0.13/14 2.4s} 28. axb4 {-0.21/14 0.58s} Qxb4 {-0.02/16 2.2s}
29. Qxb4 {0.00/15 1.2s} axb4 {-0.20/16 1.0s} 30. Nd4 {+0.11/16 0.83s}
Kf7 {+0.02/15 1.0s} 31. Nb5 {-0.12/15 1.7s} Nb8 {+0.28/13 0.69s}
32. Rxc8 {-0.21/14 0.84s} Bxc8 {+0.14/14 0.74s} 33. f4 {-0.35/13 0.43s}
Nec6 {+0.34/14 0.60s} 34. Rc1 {-0.40/13 0.76s} Ne7 {+0.28/13 0.72s}
35. Be1 {-0.35/13 0.79s} Nbc6 {+0.39/12 0.33s} 36. Bd2 {-0.42/12 0.42s}
Bb7 {+0.49/12 0.58s} 37. Bd3 {-0.35/10 0.36s} d4 {+0.46/12 0.68s}
38. Bc4 {-0.51/12 1.1s} Nf5 {+0.45/11 0.43s} 39. exd4 {-0.55/14 0.73s}
Nfxd4 {+0.70/14 0.48s} 40. Nxd4 {-0.57/14 1.1s} Nxd4 {+0.68/15 0.70s}
41. Bxb4 {-0.54/14 0.29s} Bd5 {+0.80/15 0.68s} 42. Kf2 {-0.60/14 0.30s}
Ra8 {+0.43/16 2.2s} 43. Bxd5 {-0.41/16 0.68s} exd5 {+0.53/15 0.37s}
44. Ke3 {-0.56/16 1.0s} Nf5+ {+0.66/14 0.29s} 45. Kd3 {-0.72/17 0.91s}
Rb8 {+0.68/15 0.31s} 46. Rc7+ {-0.77/16 0.30s} Kg8 {+0.81/15 0.55s}
47. Bc3 {-0.79/16 0.33s} Rxb3 {+0.92/15 0.50s} 48. Rc8+ {-0.77/14 1.2s}
Kf7 {+0.76/14 0.49s} 49. Rc7+ {-0.84/14 0.49s} Kf8 {+0.83/14 0.52s}
50. Kc2 {-0.76/15 0.51s} Rb5 {+0.67/14 0.45s} 51. Kd3 {-0.74/14 0.24s}
Ng3 {+0.86/14 0.50s} 52. Bd4 {-0.84/14 0.46s} Ne4 {+0.93/13 0.49s}
53. Be3 {-0.98/12 0.56s} Rb1 {+0.96/13 0.88s} 54. Rd7 {-0.97/12 0.45s}
Rb3+ {+1.06/13 0.43s} 55. Ke2 {-1.11/13 0.46s} g5 {+1.06/14 0.43s}
56. Kf3 {-0.97/12 0.21s} Nc3 {+1.15/13 0.28s} 57. Bc5+ {-0.85/13 0.52s}
Ke8 {+0.70/16 1.0s} 58. Re7+ {-0.77/16 0.47s} Kd8 {+0.63/18 0.54s}
59. Re3 {-0.58/17 0.77s} Ne4 {+0.53/15 0.24s} 60. Rxb3 {-0.35/16 0.73s}
Nd2+ {+0.39/16 0.37s} 61. Ke3 {-0.31/18 0.40s} Nxb3 {+0.19/18 0.57s}
62. Bf8 {-0.21/18 0.64s} gxf4+ {+0.19/16 0.16s} 63. Kxf4 {0.00/19 0.51s}
h5 {+0.19/16 0.35s} 64. Kf5 {0.00/18 0.27s} d4 {0.00/17 0.34s}
65. Ke4 {0.00/17 0.38s} Kd7 {0.00/16 0.17s} 66. Kd3 {0.00/17 0.17s}
Ke6 {0.00/17 0.16s} 67. Kc4 {0.00/17 0.20s} Nc1 {0.00/18 0.30s}
68. Kxd4 {0.00/18 0.19s} Ne2+ {0.00/18 0.34s} 69. Ke4 {0.00/17 0.26s}
Nc3+ {0.00/19 0.32s} 70. Kd4 {0.00/18 0.42s} Ne2+ {0.00/17 0.20s}
71. Ke3 {+0.03/18 0.22s} Nc3 {0.00/17 0.35s} 72. Ba3 {+0.15/17 0.23s}
Nd5+ {-0.07/16 0.30s} 73. Kf3 {+0.14/18 0.23s} Ke5 {-0.02/16 0.16s}
74. Bb2+ {+0.14/15 0.15s} Kf5 {0.00/17 0.32s} 75. Bd4 {+0.11/18 0.27s}
Ne7 {0.00/17 0.17s} 76. Ba1 {+0.07/17 0.34s} Nd5 {0.00/20 0.13s}
77. Bb2 {0.00/17 0.25s} Nc7 {0.00/19 0.12s} 78. Bd4 {0.00/16 0.18s}
Ne6 {0.00/17 0.21s} 79. g4+ {0.00/16 0.15s} hxg4+ {0.00/18 0.14s}
80. hxg4+ {0.00/20 0.15s} Kg6 {0.00/20 0.13s} 81. Be3 {0.00/20 0.19s}
f5 {0.00/19 0.14s} 82. Bf2 {0.00/21 0.18s} Ng5+ {0.00/21 0.12s}
83. Kf4 {0.00/25 0.14s} Nh3+ {0.00/26 0.15s} 84. Kg3 {0.00/30 0.13s}
Nxf2 {0.00/31 0.13s} 85. gxf5+ {0.00/48 0.12s, Draw by adjudication: SyzygyTB}
1/2-1/2
Looks like cutechess does not write

Code: Select all

[Termination "normal"]
in the tag section of a game when the result is just
1-0 white mates, or 0-1 black mates or draw by .. , or stalemate.

User avatar
Guenther
Posts: 2953
Joined: Wed Oct 01, 2008 4:33 am
Location: Regensburg, Germany
Full name: Guenther Simon
Contact:

Re: MATCH sanity

Post by Guenther » Thu May 04, 2017 10:40 am

Ferdy wrote:
hgm wrote:There is no PGN standard for game termination, so every source might have done it different.
Not exactly sure what do you mean by that. But in pgn spec, termination tag is mentioned.

Code: Select all

9.8.1: Tag: Termination

This takes a string that describes the reason for the conclusion of the game.
While the Result tag gives the result of the game, it does not provide any
extra information and so the Termination tag is defined for this purpose.

Strings that may appear as Termination tag values:

* "abandoned": abandoned game.

* "adjudication": result due to third party adjudication process.

* "death": losing player called to greater things, one hopes.

* "emergency": game concluded due to unforeseen circumstances.

* "normal": game terminated in a normal fashion.

* "rules infraction": administrative forfeit due to losing player's failure to
observe either the Laws of Chess or the event regulations.

* "time forfeit": loss due to losing player's failure to meet time control
requirements.

* "unterminated": game not terminated.
Ref:
https://www.chessclub.com/user/help/PGN-spec
mentioned yes, but obviously he means the specific content of the tag and the
whole thread is about dozens of different strings of content.

'Strings that may appear as Termination tag values:', actually it
could also write 'engine x refuses to play on Sunday'

(it is also clear from the example strings that they mainly cared for Human chess)
Current foe list count : [91]
http://rwbc-chess.de/chronology.htm

Ferdy
Posts: 4043
Joined: Sun Aug 10, 2008 1:15 pm
Location: Philippines

Re: MATCH sanity

Post by Ferdy » Thu May 04, 2017 3:47 pm

Guenther wrote:
Ferdy wrote:
hgm wrote:There is no PGN standard for game termination, so every source might have done it different.
Not exactly sure what do you mean by that. But in pgn spec, termination tag is mentioned.

Code: Select all

9.8.1: Tag: Termination

This takes a string that describes the reason for the conclusion of the game.
While the Result tag gives the result of the game, it does not provide any
extra information and so the Termination tag is defined for this purpose.

Strings that may appear as Termination tag values:

* "abandoned": abandoned game.

* "adjudication": result due to third party adjudication process.

* "death": losing player called to greater things, one hopes.

* "emergency": game concluded due to unforeseen circumstances.

* "normal": game terminated in a normal fashion.

* "rules infraction": administrative forfeit due to losing player's failure to
observe either the Laws of Chess or the event regulations.

* "time forfeit": loss due to losing player's failure to meet time control
requirements.

* "unterminated": game not terminated.
Ref:
https://www.chessclub.com/user/help/PGN-spec
mentioned yes, but obviously he means the specific content of the tag and the
whole thread is about dozens of different strings of content.

'Strings that may appear as Termination tag values:', actually it
could also write 'engine x refuses to play on Sunday'
As I understand tag values can vary just like the Event tag

Code: Select all

[Event "World Cup 2017"]
or

Code: Select all

[Event "Candidates Tournament"]
For Termination tag, according to the specs:

Code: Select all

This takes a string that describes the reason for the conclusion of the game.
So this is a string and you can have different values.
Guenther wrote:(it is also clear from the example strings that they mainly cared for Human chess)
You can have a different string if you want for the dogs and birds.

User avatar
hgm
Posts: 23455
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: MATCH sanity

Post by hgm » Thu May 04, 2017 4:43 pm

Anyway, the Termination tag is not one of the mandatory tags.

Sven
Posts: 3819
Joined: Thu May 15, 2008 7:57 pm
Location: Berlin, Germany
Full name: Sven Schüle
Contact:

Re: MATCH sanity

Post by Sven » Thu May 04, 2017 7:16 pm

hgm wrote:
Sven Schüle wrote:I hope your filter ignores case since I have often seen messages like "False draw claim", "False win claim" or "False illegal move claim" with uppercase F.
No, it doesn't, and there would be little point to it. You can also filter on 'alse' or 'llegal' if you suspect mixed-case messages.

There is no escaping that you have to know how the messages look. There is no PGN standard for game termination, so every source might have done it different. Instead of "False draw claim" it could print "invalid result command". If you don't know what you are looking for, you will not be able to find it. That holds for hard-coded scripts just as much as for WinBoard's message filtering.
That is certainly right. I was just suggesting to think about your filter details since I got (and still get) the impression that you search for "false" while not ignoring case but it is WinBoard/xboard that prints messages starting with "False" which you wouldn't catch then, obviously.

Code: Select all

$ find * -name '*.[ch]'|xargs grep -i '".*false.*claim.*"'
backend.c:                                "False illegal-move claim", GE_XBOARD );
backend.c:                      snprintf(buf, MSG_SIZ, "False win claim: '%s'", resultDetails);
backend.c:                snprintf(buf, MSG_SIZ, "False draw claim: '%s'", resultDetails);

User avatar
Rebel
Posts: 4541
Joined: Thu Aug 18, 2011 10:04 am

Re: MATCH sanity

Post by Rebel » Fri May 05, 2017 4:14 am

Rebel wrote:
Ferdy wrote:
Rebel wrote:I have a tool that reports time-forfeits during a match by parsing the PGN. Are there other known irregularities in the PGN output of cutechess-cli and Arena? I want to add them.
In the pgn tag section from cutechess.

Code: Select all

void PgnGame::setResult(const Chess::Result& result)
{
	setTag("Result", result.toShortString());

	switch (result.type())
	{
	case Chess::Result::Adjudication:
		setTag("Termination", "adjudication");
		break;
	case Chess::Result::Timeout:
		setTag("Termination", "time forfeit");
		break;
	case Chess::Result::Disconnection:
		setTag("Termination", "abandoned");
		break;
	case Chess::Result::StalledConnection:
		setTag("Termination", "stalled connection");
		break;
	case Chess::Result::IllegalMove:
		setTag("Termination", "illegal move");
		break;
	case Chess::Result::NoResult:
		setTag("Termination", "unterminated");
		break;
	default:
		setTag("Termination", QString());
		break;
	}
}
That was helpful. I now have it all automatic during a match. Still (so now and then) I am having a problem with Cute. It happens in draw cases (draw repetitions, 50 move rules, stalemate and insufficient material). There are hundreds of them but occasionally Cute gives a [Termination=abandoned] and disconnects. No idea why that is, no such problems with other interfaces. I am using 0.8.2.
Here is such an examples fresh from the press.
[Event "?"]
[Site "?"]
[Date "2017.05.05"]
[Round "295"]
[White "220"]
[Black "240"]
[Result "1-0"]
[ECO "B54"]
[Opening "Sicilian"]
[PlyCount "205"]
[Termination "abandoned"]
[TimeControl "40/15"]
[Variation "Prins (Moscow) Variation"]

1. e4 {book} c5 {book} 2. Nf3 {book} d6 {book} 3. d4 {book} cxd4 {book}
4. Nxd4 {book} Nf6 {book} 5. f3 {book} Qb6 {book} 6. c4 {book} g6 {book}
7. Nc3 {book} Bg7 {book} 8. Be3 {book} Qa5 {book} 9. Be2 {book} Nc6 {book}
10. Nb3 {book} Qd8 {book} 11. O-O {+0.48/10 0.69s} O-O {-0.19/9 0.51s}
12. Nd4 {+0.41/8 0.39s} Nd7 {-0.22/10 1.1s} 13. Nd5 {+0.34/10 0.63s}
a5 {-0.29/10 0.47s} 14. Qd2 {+0.53/10 0.55s} Bxd4 {-0.37/10 0.52s}
15. Bxd4 {+0.56/10 0.52s} Nxd4 {-0.53/10 0.49s} 16. Qxd4 {+0.64/10 0.54s}
Nc5 {-0.53/11 0.52s} 17. f4 {+0.73/10 0.46s} Be6 {-0.58/11 0.69s}
18. Rad1 {+0.73/10 0.70s} Bxd5 {-0.55/10 0.49s} 19. exd5 {+0.64/10 0.62s}
Qd7 {-0.57/9 0.33s} 20. Rf3 {+0.73/9 0.33s} Qa4 {-0.64/9 0.54s}
21. Ra3 {+0.82/9 0.35s} Qc2 {-0.73/10 0.77s} 22. Re1 {+0.65/9 0.48s}
e6 {-0.59/9 0.34s} 23. Bd1 {+0.80/9 0.32s} Qb1 {-0.43/8 0.30s}
24. dxe6 {+0.55/8 0.35s} Nxe6 {-0.58/7 0.29s} 25. Qc3 {+0.50/9 0.33s}
Qf5 {-0.45/10 0.34s} 26. Bf3 {+0.62/9 0.34s} Qc5+ {-0.45/10 0.55s}
27. Kh1 {+0.56/9 0.35s} Ra7 {-0.51/9 0.43s} 28. Qc1 {+0.58/8 0.33s}
b5 {-0.52/9 0.41s} 29. cxb5 {+0.56/8 0.39s} Qxb5 {-0.57/8 0.52s}
30. Qd2 {+0.73/9 0.59s} a4 {-0.62/7 0.30s} 31. Bg4 {+0.78/8 0.42s}
d5 {-0.62/8 0.34s} 32. f5 {+0.70/8 0.35s} Nc7 {-0.73/8 0.44s}
33. Rae3 {+0.75/8 0.43s} Re8 {-0.87/9 0.56s} 34. fxg6 {+0.94/10 0.33s}
hxg6 {-0.58/8 0.32s} 35. Rxe8+ {+0.75/9 0.41s} Nxe8 {-0.65/10 0.52s}
36. Qd4 {+0.68/9 0.46s} Rb7 {-0.41/10 0.51s} 37. Bf3 {+0.54/9 0.47s}
Nc7 {-0.38/10 0.32s} 38. Rb1 {+0.52/8 0.31s} Qb4 {-0.41/9 0.44s}
39. Qd1 {+0.51/9 0.35s} Qf4 {-0.30/10 0.35s} 40. b3 {+0.43/9 0.29s}
axb3 {-0.28/10 0.36s} 41. axb3 {+0.39/10 0.37s} Rb5 {-0.17/10 0.58s}
42. Qc2 {+0.39/9 0.39s} Ne6 {-0.12/9 0.40s} 43. Rf1 {+0.11/9 0.60s}
Rc5 {-0.10/8 0.31s} 44. Qb1 {+0.23/9 0.33s} Qe3 {-0.07/9 0.49s}
45. b4 {+0.42/9 0.33s} Rb5 {-0.26/9 0.33s} 46. Qa1 {+0.36/9 0.41s}
d4 {-0.09/9 0.39s} 47. Rb1 {+0.11/9 0.37s} Kh7 {0.00/9 0.36s}
48. Bc6 {+0.16/10 0.59s} Rh5 {0.00/9 0.37s} 49. Rf1 {+0.16/10 0.70s}
Nf4 {-0.15/8 0.32s} 50. Rf3 {+0.25/9 0.30s} Qd2 {-0.12/9 0.46s}
51. Qg1 {+0.33/10 0.38s} Re5 {-0.14/9 0.28s} 52. Rf1 {-0.02/10 0.32s}
Rf5 {0.00/10 0.30s} 53. g3 {+0.20/10 0.32s} Nd3 {0.00/11 0.51s}
54. Rxf5 {+0.46/11 0.34s} gxf5 {0.00/10 0.25s} 55. b5 {0.00/12 0.97s}
Nf2+ {+0.76/11 0.41s} 56. Kg2 {-0.54/12 0.89s} Ng4+ {+0.68/11 0.36s}
57. Kh1 {-0.29/11 0.66s} Qe2 {+0.76/11 0.39s} 58. Qg2 {-0.51/11 0.41s}
d3 {+0.97/10 0.47s} 59. Bf3 {-0.75/11 0.43s} Qe1+ {+0.40/10 0.79s}
60. Qg1 {-0.85/7 0.038s} d2 {+0.68/10 0.30s} 61. h3 {-1.08/13 0.81s}
Ne3 {+0.96/11 0.53s} 62. b6 {-1.16/12 0.35s} Nf1 {+1.24/12 0.43s}
63. b7 {-1.25/12 0.47s} Nxg3+ {+1.29/12 0.32s} 64. Kh2 {-1.20/12 0.54s}
Ne2 {+1.52/11 0.30s} 65. Bxe2 {-1.72/12 0.51s} Qxe2+ {+1.55/10 0.17s}
66. Qg2 {-1.59/11 0.32s} Qxg2+ {+1.87/11 0.38s} 67. Kxg2 {-1.34/7 0.030s}
d1=Q {+1.91/15 0.51s} 68. b8=Q {-1.64/14 0.37s} Qe2+ {+1.82/11 0.30s}
69. Kh1 {-1.80/11 0.39s} Qe3 {+1.79/11 0.30s} 70. Kg2 {-1.67/11 0.46s}
f4 {+1.79/11 0.44s} 71. Qb1+ {-1.46/11 0.42s} Kh8 {+1.51/10 0.35s}
72. Qf5 {-1.28/11 0.33s} Qg3+ {+1.32/11 0.37s} 73. Kf1 {-1.17/12 0.60s}
Kg7 {+1.12/12 0.47s} 74. Qe5+ {-1.11/11 0.30s} Kg6 {+1.17/11 0.34s}
75. Qe4+ {-0.94/12 0.45s} Kh6 {+1.12/11 0.32s} 76. Qf5 {-1.00/11 0.40s}
Qg5 {+1.07/11 0.36s} 77. Qxg5+ {-1.11/10 0.82s} Kxg5 {+1.04/10 0.071s}
78. Kg2 {-1.03/18 0.26s} Kf5 {+1.25/17 0.28s} 79. Kf3 {-1.22/19 0.57s}
Ke5 {+1.30/17 0.26s} 80. Kf2 {-1.43/17 0.30s} Ke4 {+1.59/19 0.34s}
81. h4 {-1.54/18 0.27s} Kf5 {+2.15/20 0.33s} 82. Kf3 {-1.65/23 0.31s}
f6 {+1.78/21 0.29s} 83. h5 {-1.52/25 0.33s} Kg5 {+1.39/23 0.42s}
84. h6 {-1.25/23 0.26s} Kxh6 {+2.15/19 0.10s} 85. Kxf4 {-1.93/18 0.085s}
Kg6 {+2.06/24 0.29s} 86. Kg4 {0.00/26 0.29s} Kh7 {+1.72/22 0.30s}
87. Kf5 {-1.60/24 0.28s} Kg7 {+1.81/26 0.30s} 88. Ke4 {-1.81/23 0.29s}
Kf7 {+1.65/25 0.35s} 89. Kf5 {0.00/26 0.29s} Ke7 {+1.83/25 0.29s}
90. Kf4 {0.00/26 0.27s} Ke6 {+1.98/27 0.29s} 91. Ke4 {0.00/24 0.29s}
f5+ {+1.56/26 0.38s} 92. Kf4 {0.00/24 0.29s} Kf6 {0.00/28 0.28s}
93. Kf3 {0.00/28 0.29s} Kg5 {+1.70/28 0.30s} 94. Kg3 {-1.72/25 0.30s}
f4+ {0.00/34 0.34s} 95. Kf2 {0.00/31 0.27s} Kg4 {0.00/32 0.33s}
96. Kg2 {0.00/31 0.30s} f3+ {0.00/35 0.32s} 97. Kf2 {0.00/36 0.27s}
Kf4 {0.00/39 0.43s} 98. Kf1 {0.00/35 0.30s} Ke3 {0.00/35 0.30s}
99. Ke1 {0.00/36 0.30s} Kd4 {0.00/35 0.35s} 100. Kf2 {0.00/37 0.33s}
Ke4 {0.00/36 0.32s} 101. Kf1 {0.00/36 0.32s} Kf4 {0.00/37 0.37s}
102. Kf2 {0.00/40 0.28s} Kg4 {0.00/38 0.32s}
103. Kf1 {0.00/33 0.29s, Black disconnects} 1-0
[d]8/8/8/8/6k1/5p2/8/5K2 b - -
And Cute unloads itself.

Ferdy
Posts: 4043
Joined: Sun Aug 10, 2008 1:15 pm
Location: Philippines

Re: MATCH sanity

Post by Ferdy » Fri May 05, 2017 4:38 am

Rebel wrote:
Rebel wrote:
Ferdy wrote:
Rebel wrote:I have a tool that reports time-forfeits during a match by parsing the PGN. Are there other known irregularities in the PGN output of cutechess-cli and Arena? I want to add them.
In the pgn tag section from cutechess.

Code: Select all

void PgnGame::setResult(const Chess::Result& result)
{
	setTag("Result", result.toShortString());

	switch (result.type())
	{
	case Chess::Result::Adjudication:
		setTag("Termination", "adjudication");
		break;
	case Chess::Result::Timeout:
		setTag("Termination", "time forfeit");
		break;
	case Chess::Result::Disconnection:
		setTag("Termination", "abandoned");
		break;
	case Chess::Result::StalledConnection:
		setTag("Termination", "stalled connection");
		break;
	case Chess::Result::IllegalMove:
		setTag("Termination", "illegal move");
		break;
	case Chess::Result::NoResult:
		setTag("Termination", "unterminated");
		break;
	default:
		setTag("Termination", QString());
		break;
	}
}
That was helpful. I now have it all automatic during a match. Still (so now and then) I am having a problem with Cute. It happens in draw cases (draw repetitions, 50 move rules, stalemate and insufficient material). There are hundreds of them but occasionally Cute gives a [Termination=abandoned] and disconnects. No idea why that is, no such problems with other interfaces. I am using 0.8.2.
Here is such an examples fresh from the press.
[Event "?"]
[Site "?"]
[Date "2017.05.05"]
[Round "295"]
[White "220"]
[Black "240"]
[Result "1-0"]
[ECO "B54"]
[Opening "Sicilian"]
[PlyCount "205"]
[Termination "abandoned"]
[TimeControl "40/15"]
[Variation "Prins (Moscow) Variation"]

1. e4 {book} c5 {book} 2. Nf3 {book} d6 {book} 3. d4 {book} cxd4 {book}
4. Nxd4 {book} Nf6 {book} 5. f3 {book} Qb6 {book} 6. c4 {book} g6 {book}
7. Nc3 {book} Bg7 {book} 8. Be3 {book} Qa5 {book} 9. Be2 {book} Nc6 {book}
10. Nb3 {book} Qd8 {book} 11. O-O {+0.48/10 0.69s} O-O {-0.19/9 0.51s}
12. Nd4 {+0.41/8 0.39s} Nd7 {-0.22/10 1.1s} 13. Nd5 {+0.34/10 0.63s}
a5 {-0.29/10 0.47s} 14. Qd2 {+0.53/10 0.55s} Bxd4 {-0.37/10 0.52s}
15. Bxd4 {+0.56/10 0.52s} Nxd4 {-0.53/10 0.49s} 16. Qxd4 {+0.64/10 0.54s}
Nc5 {-0.53/11 0.52s} 17. f4 {+0.73/10 0.46s} Be6 {-0.58/11 0.69s}
18. Rad1 {+0.73/10 0.70s} Bxd5 {-0.55/10 0.49s} 19. exd5 {+0.64/10 0.62s}
Qd7 {-0.57/9 0.33s} 20. Rf3 {+0.73/9 0.33s} Qa4 {-0.64/9 0.54s}
21. Ra3 {+0.82/9 0.35s} Qc2 {-0.73/10 0.77s} 22. Re1 {+0.65/9 0.48s}
e6 {-0.59/9 0.34s} 23. Bd1 {+0.80/9 0.32s} Qb1 {-0.43/8 0.30s}
24. dxe6 {+0.55/8 0.35s} Nxe6 {-0.58/7 0.29s} 25. Qc3 {+0.50/9 0.33s}
Qf5 {-0.45/10 0.34s} 26. Bf3 {+0.62/9 0.34s} Qc5+ {-0.45/10 0.55s}
27. Kh1 {+0.56/9 0.35s} Ra7 {-0.51/9 0.43s} 28. Qc1 {+0.58/8 0.33s}
b5 {-0.52/9 0.41s} 29. cxb5 {+0.56/8 0.39s} Qxb5 {-0.57/8 0.52s}
30. Qd2 {+0.73/9 0.59s} a4 {-0.62/7 0.30s} 31. Bg4 {+0.78/8 0.42s}
d5 {-0.62/8 0.34s} 32. f5 {+0.70/8 0.35s} Nc7 {-0.73/8 0.44s}
33. Rae3 {+0.75/8 0.43s} Re8 {-0.87/9 0.56s} 34. fxg6 {+0.94/10 0.33s}
hxg6 {-0.58/8 0.32s} 35. Rxe8+ {+0.75/9 0.41s} Nxe8 {-0.65/10 0.52s}
36. Qd4 {+0.68/9 0.46s} Rb7 {-0.41/10 0.51s} 37. Bf3 {+0.54/9 0.47s}
Nc7 {-0.38/10 0.32s} 38. Rb1 {+0.52/8 0.31s} Qb4 {-0.41/9 0.44s}
39. Qd1 {+0.51/9 0.35s} Qf4 {-0.30/10 0.35s} 40. b3 {+0.43/9 0.29s}
axb3 {-0.28/10 0.36s} 41. axb3 {+0.39/10 0.37s} Rb5 {-0.17/10 0.58s}
42. Qc2 {+0.39/9 0.39s} Ne6 {-0.12/9 0.40s} 43. Rf1 {+0.11/9 0.60s}
Rc5 {-0.10/8 0.31s} 44. Qb1 {+0.23/9 0.33s} Qe3 {-0.07/9 0.49s}
45. b4 {+0.42/9 0.33s} Rb5 {-0.26/9 0.33s} 46. Qa1 {+0.36/9 0.41s}
d4 {-0.09/9 0.39s} 47. Rb1 {+0.11/9 0.37s} Kh7 {0.00/9 0.36s}
48. Bc6 {+0.16/10 0.59s} Rh5 {0.00/9 0.37s} 49. Rf1 {+0.16/10 0.70s}
Nf4 {-0.15/8 0.32s} 50. Rf3 {+0.25/9 0.30s} Qd2 {-0.12/9 0.46s}
51. Qg1 {+0.33/10 0.38s} Re5 {-0.14/9 0.28s} 52. Rf1 {-0.02/10 0.32s}
Rf5 {0.00/10 0.30s} 53. g3 {+0.20/10 0.32s} Nd3 {0.00/11 0.51s}
54. Rxf5 {+0.46/11 0.34s} gxf5 {0.00/10 0.25s} 55. b5 {0.00/12 0.97s}
Nf2+ {+0.76/11 0.41s} 56. Kg2 {-0.54/12 0.89s} Ng4+ {+0.68/11 0.36s}
57. Kh1 {-0.29/11 0.66s} Qe2 {+0.76/11 0.39s} 58. Qg2 {-0.51/11 0.41s}
d3 {+0.97/10 0.47s} 59. Bf3 {-0.75/11 0.43s} Qe1+ {+0.40/10 0.79s}
60. Qg1 {-0.85/7 0.038s} d2 {+0.68/10 0.30s} 61. h3 {-1.08/13 0.81s}
Ne3 {+0.96/11 0.53s} 62. b6 {-1.16/12 0.35s} Nf1 {+1.24/12 0.43s}
63. b7 {-1.25/12 0.47s} Nxg3+ {+1.29/12 0.32s} 64. Kh2 {-1.20/12 0.54s}
Ne2 {+1.52/11 0.30s} 65. Bxe2 {-1.72/12 0.51s} Qxe2+ {+1.55/10 0.17s}
66. Qg2 {-1.59/11 0.32s} Qxg2+ {+1.87/11 0.38s} 67. Kxg2 {-1.34/7 0.030s}
d1=Q {+1.91/15 0.51s} 68. b8=Q {-1.64/14 0.37s} Qe2+ {+1.82/11 0.30s}
69. Kh1 {-1.80/11 0.39s} Qe3 {+1.79/11 0.30s} 70. Kg2 {-1.67/11 0.46s}
f4 {+1.79/11 0.44s} 71. Qb1+ {-1.46/11 0.42s} Kh8 {+1.51/10 0.35s}
72. Qf5 {-1.28/11 0.33s} Qg3+ {+1.32/11 0.37s} 73. Kf1 {-1.17/12 0.60s}
Kg7 {+1.12/12 0.47s} 74. Qe5+ {-1.11/11 0.30s} Kg6 {+1.17/11 0.34s}
75. Qe4+ {-0.94/12 0.45s} Kh6 {+1.12/11 0.32s} 76. Qf5 {-1.00/11 0.40s}
Qg5 {+1.07/11 0.36s} 77. Qxg5+ {-1.11/10 0.82s} Kxg5 {+1.04/10 0.071s}
78. Kg2 {-1.03/18 0.26s} Kf5 {+1.25/17 0.28s} 79. Kf3 {-1.22/19 0.57s}
Ke5 {+1.30/17 0.26s} 80. Kf2 {-1.43/17 0.30s} Ke4 {+1.59/19 0.34s}
81. h4 {-1.54/18 0.27s} Kf5 {+2.15/20 0.33s} 82. Kf3 {-1.65/23 0.31s}
f6 {+1.78/21 0.29s} 83. h5 {-1.52/25 0.33s} Kg5 {+1.39/23 0.42s}
84. h6 {-1.25/23 0.26s} Kxh6 {+2.15/19 0.10s} 85. Kxf4 {-1.93/18 0.085s}
Kg6 {+2.06/24 0.29s} 86. Kg4 {0.00/26 0.29s} Kh7 {+1.72/22 0.30s}
87. Kf5 {-1.60/24 0.28s} Kg7 {+1.81/26 0.30s} 88. Ke4 {-1.81/23 0.29s}
Kf7 {+1.65/25 0.35s} 89. Kf5 {0.00/26 0.29s} Ke7 {+1.83/25 0.29s}
90. Kf4 {0.00/26 0.27s} Ke6 {+1.98/27 0.29s} 91. Ke4 {0.00/24 0.29s}
f5+ {+1.56/26 0.38s} 92. Kf4 {0.00/24 0.29s} Kf6 {0.00/28 0.28s}
93. Kf3 {0.00/28 0.29s} Kg5 {+1.70/28 0.30s} 94. Kg3 {-1.72/25 0.30s}
f4+ {0.00/34 0.34s} 95. Kf2 {0.00/31 0.27s} Kg4 {0.00/32 0.33s}
96. Kg2 {0.00/31 0.30s} f3+ {0.00/35 0.32s} 97. Kf2 {0.00/36 0.27s}
Kf4 {0.00/39 0.43s} 98. Kf1 {0.00/35 0.30s} Ke3 {0.00/35 0.30s}
99. Ke1 {0.00/36 0.30s} Kd4 {0.00/35 0.35s} 100. Kf2 {0.00/37 0.33s}
Ke4 {0.00/36 0.32s} 101. Kf1 {0.00/36 0.32s} Kf4 {0.00/37 0.37s}
102. Kf2 {0.00/40 0.28s} Kg4 {0.00/38 0.32s}
103. Kf1 {0.00/33 0.29s, Black disconnects} 1-0
[d]8/8/8/8/6k1/5p2/8/5K2 b - -
And Cute unloads itself.
You can try using the option.

Code: Select all

  -recover              Restart crashed engines instead of stopping the match
What engines are 220 and 240?

User avatar
Rebel
Posts: 4541
Joined: Thu Aug 18, 2011 10:04 am

Re: MATCH sanity

Post by Rebel » Fri May 05, 2017 7:51 am

Ferdy wrote:You can try using the option.

Code: Select all

  -recover              Restart crashed engines instead of stopping the match
I am aware, but I am more interested to avoid that option, that cute doesn't crash any longer.
What engines are 220 and 240?
220 - ProDeo 2.2
240 - ProDeo 2.4 (somewhere in the future)

Ferdy
Posts: 4043
Joined: Sun Aug 10, 2008 1:15 pm
Location: Philippines

Re: MATCH sanity

Post by Ferdy » Fri May 05, 2017 10:30 am

Rebel wrote:
Ferdy wrote:You can try using the option.

Code: Select all

  -recover              Restart crashed engines instead of stopping the match
I am aware, but I am more interested to avoid that option, that cute doesn't crash any longer.
Based from this,

Code: Select all

103. Kf1 {0.00/33 0.29s, Black disconnects} 1-0
It is the engine that disconnected in the first place.

User avatar
Rebel
Posts: 4541
Joined: Thu Aug 18, 2011 10:04 am

Re: MATCH sanity

Post by Rebel » Fri May 05, 2017 3:26 pm

Ferdy wrote: Based from this,

Code: Select all

103. Kf1 {0.00/33 0.29s, Black disconnects} 1-0
It is the engine that disconnected in the first place.
Doubt that because it can't :wink: But I think the -draw option will solve the problem.

Post Reply