FEN standard for 3check ?

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

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

FEN standard for 3check ?

Post by hgm »

Does there exist a standard way to encode the number of checks that you can still survive in 3check?

If we want to use existing FEN fields as a kludge to encode it, it could be done in the holdings field, as a number of 'in-hand' Kings.
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: FEN standard for 3check ?

Post by sje »

I'd be against any non-intuitive modification of the semantics of the six fields. A better idea would be to add a seventh field with the variant identifier with any following fields being interpreted in a manner specific to that variant.
User avatar
hgm
Posts: 27795
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: FEN standard for 3check ?

Post by hgm »

A variant-identifier field would be a nice idea. It would solve the problem that it is not possible to derive the variant unambuguously from a FEN. (This is the reason why WB automatically switches to the proper variant when you paste in a game, but you have to switch variant by hand before you can paste in a position.)

For easy parsing, it would be best if this field came first as an optional field, recognizable by its delimiter characters. (e.g. <xiangqi>) This solves the problem of recognition. It should be optional, though, to provide backward compatibility: most variants use FENs now that do not have it, so its absence cannot be taken to mean that it is a FEN for FIDE Chess. Its absence must mean something like 'the variant implied by the context' (e.g. the PGN variant tag).

In general it would be good idea to make optional fields recognizable from their syntax. This is why I put the holdings into brackets. The e.p. field is recognizable from the fact that it has letters+digits, the castling field has only letters, the board contains slashes, and the reversible-ply and move counter are numeric. To resolve the ambiguity between te latter two, one could specify that they always come in this order.

I guess a second ambiguity could be if there are both no castling rights and no e.p. rights: if you see a singl '-' then, you don't know if it was the e.p. field, and the castling field was omitted, or the other way around. But this can be resolved by having an omitted field imply 'no rights'; then you do not care. In fact you could omit both, which provides backward compatibility with FENs for games that have no castling or e.p. (e.g. Xiangqi).

A new field for counting the number of checks could be based on the occurence of a '+' sign in it. (As '+' in SAN means check.) E.g. a field '1+2' occurring in the FEN would mean that white has been checked once, and black twice. Absense of the field would imply '0+0', which means that in opening positions you could omit the field (making life easier on applications that only use FENs to relay opening positions).

If the field is uniquely recognizable from the %d+%d syntax it could occur anywhere in the FEN, but for definiteness I would recommend that if it coccurs, it should occur immediately after the castling field, so that the order is:

FEN := <variant> B/o/a/r/d [Holdings] stm Castling ep che+cks 50move moveNr

Variant, holdings, e.p., castling and checks field would be optional, in accordance with current practice. Perhaps 50-move and move number should be optional as well, so that the only truly required fields are board and stm. Stm would be the first single-letter field that follows the board.

A 3check FEN could then look like

8/4k3/8/8/3n4/4N3/8/4K3 w - - 1+2 0 64
ernest
Posts: 2041
Joined: Wed Mar 08, 2006 8:30 pm

Re: FEN standard for 3check ?

Post by ernest »

hgm wrote:3check?
What is 3check? :o
User avatar
hgm
Posts: 27795
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: FEN standard for 3check ?

Post by hgm »

A Chess variant on ICC (and supported by WinBoard) in which you win by chcking the opponent 3 times.