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.
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.
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.
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.
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.
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.
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.
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.
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.