You can take a look to the utility ParserCutechess by Fabio Gobbato.
It parses the output of cutechess and creates the stats.
I have found some cases and helped Fabio to complete and testing the utility.
http://www.g-sei.org/wp-content/uploads ... echess.zip
MATCH sanity
Moderators: hgm, Rebel, chrisw
-
- Posts: 4833
- Joined: Sun Aug 10, 2008 3:15 pm
- Location: Philippines
Re: MATCH sanity
In the pgn tag section from cutechess.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.
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;
}
}
-
- Posts: 27808
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: MATCH sanity
In WinBoard this is a standard function. I just filter the game list on "on time", "illegal" or "false" in the result message.
-
- Posts: 1056
- Joined: Fri Mar 10, 2006 6:07 am
- Location: Basque Country (Spain)
Re: MATCH sanity
Thank you.sasachess wrote:You can take a look to the utility ParserCutechess by Fabio Gobbato.
It parses the output of cutechess and creates the stats.
I have found some cases and helped Fabio to complete and testing the utility.
http://www.g-sei.org/wp-content/uploads ... echess.zip
The tool is good. On occasions, it happened to me that cutechess has not completed the pgn file (I lost test) even though all the games have been played. But if I have the log.txt file, with this tool I can get the information I need.
-
- Posts: 4052
- Joined: Thu May 15, 2008 9:57 pm
- Location: Berlin, Germany
- Full name: Sven Schüle
Re: MATCH sanity
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.hgm wrote:In WinBoard this is a standard function. I just filter the game list on "on time", "illegal" or "false" in the result message.
Re: cutechess messages (@Ferdinand) - at least version 0.8.2 reports "White's connection stalled" so maybe filtering should only use the word "stalled" or simply "stall" without "connection" before or behind it.
-
- Posts: 27808
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: MATCH sanity
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.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.
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.
-
- Posts: 6995
- Joined: Thu Aug 18, 2011 12:04 pm
Re: MATCH sanity
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.Ferdy wrote:In the pgn tag section from cutechess.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.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; } }
-
- Posts: 4833
- Joined: Sun Aug 10, 2008 3:15 pm
- Location: Philippines
Re: MATCH sanity
Not exactly sure what do you mean by that. But in pgn spec, termination tag is mentioned.hgm wrote:There is no PGN standard for game termination, so every source might have done it different.
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.
https://www.chessclub.com/user/help/PGN-spec
-
- Posts: 4833
- Joined: Sun Aug 10, 2008 3:15 pm
- Location: Philippines
Re: MATCH sanity
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.Rebel wrote: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.Ferdy wrote:In the pgn tag section from cutechess.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.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; } }
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.
Example 2, with Termination tag and termination marker.[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
Looks like cutechess does not write[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
Code: Select all
[Termination "normal"]
1-0 white mates, or 0-1 black mates or draw by .. , or stalemate.
-
- Posts: 4607
- Joined: Wed Oct 01, 2008 6:33 am
- Location: Regensburg, Germany
- Full name: Guenther Simon
Re: MATCH sanity
mentioned yes, but obviously he means the specific content of the tag and theFerdy wrote:Not exactly sure what do you mean by that. But in pgn spec, termination tag is mentioned.hgm wrote:There is no PGN standard for game termination, so every source might have done it different.
Ref: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.
https://www.chessclub.com/user/help/PGN-spec
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)
https://rwbc-chess.de
trollwatch:
Talkchess nowadays is a joke - it is full of trolls/idiots/people stuck in the pleistocene > 80% of the posts fall into this category...
trollwatch:
Talkchess nowadays is a joke - it is full of trolls/idiots/people stuck in the pleistocene > 80% of the posts fall into this category...