MATCH sanity

Discussion of chess software programming and technical issues.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
User avatar
Rebel
Posts: 4663
Joined: Thu Aug 18, 2011 10:04 am

MATCH sanity

Post by Rebel » Wed May 03, 2017 8:37 am

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.

elcabesa
Posts: 806
Joined: Sun May 23, 2010 11:32 am
Contact:

Re: MATCH sanity

Post by elcabesa » Wed May 03, 2017 8:55 am

I search for illegal, stall and timeout in pgn file created by cutechess
I don't remember if the spell of the word is right

sasachess
Posts: 24
Joined: Wed Nov 05, 2014 10:28 am
Location: Italy
Contact:

Re: MATCH sanity

Post by sasachess » Wed May 03, 2017 11:03 am

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

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

Re: MATCH sanity

Post by Ferdy » Wed May 03, 2017 11:08 am

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;
	}
}

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

Re: MATCH sanity

Post by hgm » Wed May 03, 2017 2:16 pm

In WinBoard this is a standard function. I just filter the game list on "on time", "illegal" or "false" in the result message.

User avatar
pedrox
Posts: 991
Joined: Fri Mar 10, 2006 5:07 am
Location: Basque Country (Spain)
Contact:

Re: MATCH sanity

Post by pedrox » Wed May 03, 2017 7:43 pm

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

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.

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

Re: MATCH sanity

Post by Sven » Wed May 03, 2017 8:14 pm

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

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.

User avatar
hgm
Posts: 23613
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 6:45 am

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.

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

Re: MATCH sanity

Post by Rebel » Thu May 04, 2017 9:20 am

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.

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

Re: MATCH sanity

Post by Ferdy » Thu May 04, 2017 9:58 am

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

Post Reply