would PGN need updates following recent rule changes?

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

casaschi
Posts: 164
Joined: Wed Dec 23, 2009 1:57 pm

would PGN need updates following recent rule changes?

Post by casaschi »

Hello,

I just read the following article about recent rule changes in blitz and rapid:
https://www.chess.com/news/view/new-fid ... ot-perfect

Till now, illegal moves were only tolerated in fast games if unnoticed hence being limited to rare exceptions.

It dawned on me that for the first time the chess rules would actually embrace illegal moves, allowing a player to continue the game after noticing their opponent made an illegal move.

Would that required then to develop a way to allow the PGN standard to record those games?

Currently the PGN standard would not be suitable to represent any of the games in the article, unless the game is split into fragment each with a sequence of legal moves.

Thoughts?

PS: personally, I believe it's a bad idea to allow illegal moves; it would be so much simpler to go back to the old rule implying a loss after an illegal move in a fast game.
User avatar
hgm
Posts: 27808
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: would PGN need updates following recent rule changes?

Post by hgm »

I don't see any problems. Moves allowed by the rules are by definition not illegal. There is no problem whatsoever to express any Chess move (legal or illegal) in SAN anyway. PGN is already in use for a wide range of Chess variants.
casaschi
Posts: 164
Joined: Wed Dec 23, 2009 1:57 pm

Re: would PGN need updates following recent rule changes?

Post by casaschi »

hgm wrote:I don't see any problems. Moves allowed by the rules are by definition not illegal. There is no problem whatsoever to express any Chess move (legal or illegal) in SAN anyway. PGN is already in use for a wide range of Chess variants.
The issue though is how to represent moves that are not legal.

Take the sequence of the first example:
1. e4 d6 2. Bb5 h5 3. Qxh5+

Here h5 is illegal and anyone would most likely read the h5 move in the fragment above as Black moving the pawn h7 to h5. Now consider what happens instead if Black moves the pawn g7 to h5, how would your record that move?

Doesn't the SAN notation rely on chess rules to code moves and avoid any ambiguity?

If illegal moves are allowed to stay (under the opponent discretion to claim the illegal move or continue the game according to their best interest) wouldn't the PGN standard need to be extended to disambiguate illegal moves?

An illegal move could really be anything... Black could grab a spare pawn and place it on h5 isntead of moving an existing pawn, illegal possibilities are endless.
MikeGL
Posts: 1010
Joined: Thu Sep 01, 2011 2:49 pm

Re: would PGN need updates following recent rule changes?

Post by MikeGL »

casaschi wrote:Hello,

I just read the following article about recent rule changes in blitz and rapid:
https://www.chess.com/news/view/new-fid ... ot-perfect

Till now, illegal moves were only tolerated in fast games if unnoticed hence being limited to rare exceptions.

It dawned on me that for the first time the chess rules would actually embrace illegal moves, allowing a player to continue the game after noticing their opponent made an illegal move.

Would that required then to develop a way to allow the PGN standard to record those games?

Currently the PGN standard would not be suitable to represent any of the games in the article, unless the game is split into fragment each with a sequence of legal moves.

Thoughts?

PS: personally, I believe it's a bad idea to allow illegal moves; it would be so much simpler to go back to the old rule implying a loss after an illegal move in a fast game.
No need, in my opinion. There's {} braces in PGN standard for comments. Illegal moves
can be explained there and game continues with some minor corrections pointed out in {comment section}.

Regarding illegal move, there are many games in chessgames.com where an illegal move
was played in elite tournaments. Even Kasparov won with an illegal move against Karpov,
in tournament conditions.

edit: just realized all chess GUI and chess DB applications needs to be modified and recompiled to handle illegal moves.
casaschi
Posts: 164
Joined: Wed Dec 23, 2009 1:57 pm

Re: would PGN need updates following recent rule changes?

Post by casaschi »

MikeGL wrote: No need, in my opinion. There's {} braces in PGN standard for comments. Illegal moves
can be explained there and game continues with some minor corrections pointed out in {comment section}.
MikeGL wrote: edit: just realized all chess GUI and chess DB applications needs to be recompiled
to handle illegal moves.
How do you expect the software to read comments and interpret them to explain the illegal move?
Last edited by casaschi on Wed Jan 03, 2018 5:55 pm, edited 1 time in total.
User avatar
hgm
Posts: 27808
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: would PGN need updates following recent rule changes?

Post by hgm »

Why would software have to do that?

There is no need at all to modify WinBoard/XBoard. Just switch off legality checking.
casaschi
Posts: 164
Joined: Wed Dec 23, 2009 1:57 pm

Re: would PGN need updates following recent rule changes?

Post by casaschi »

hgm wrote:Why would software have to do that?
Again, look at the move sequence:

1. e4 d6 2. Bb5+ h5

How would your software guess among the multiple possibilities of illegal moves what is represented by h5 ?
Is it the pawn from h7 going to h5?
Is it the pawn from g7 going to h5?
Is it an extra spare pawn added to the chessboard on h5?
Is it Black taking the White King, replacing it with a pawn and placing it on h5?

How would you disambiguate the illegal move without adding to the PGN standard (or, god forbid, adding a textual comment)?
MikeGL
Posts: 1010
Joined: Thu Sep 01, 2011 2:49 pm

Re: would PGN need updates following recent rule changes?

Post by MikeGL »

hgm wrote:Why would software have to do that?

There is no need at all to modify WinBoard/XBoard. Just switch off legality checking.
Thanks for the info, didn't know that.
Will download now and try that feature.

casaschi wrote: How do you expect the software to read comments and interpret them to explain the illegal move?

Probably just mention the new FEN {in comment} after an illegal move, something like {Black:h5=illegal, FEN=[just instert new FEN here after the illegal move]}, or some similar unwritten rules for GUI to interpret illegal moves.

But probably HGM can answer you question on specifics on how he handles illegal moves in Winboard (haven't peeked at VC++ source code of that GUI yet), but I think there's not yet a standard for chess GUI on handling illegal moves.
User avatar
hgm
Posts: 27808
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: would PGN need updates following recent rule changes?

Post by hgm »

Ambiguous notation is a problem independent of move legality. If you write Nc6 while there are Knights both on b8 and e7, there is no way software can understand what you mean, even though both moves are legal.

WinBoard/XBoard ranks pseudo-legal moves higher than illegal moves that are not even that, however. So h5 here would always mean h7-h5, as this is the only pseudo-legal Pawn move to the mentioned square. If the Pawn comes from g7, g7h4 should be written, if a Pawn is dropped P@h5. 'h5' definitely doesn't provide any idication whatsoever that the white King could be involved, and it is not clear why a King disappearing on e8 and a Pawn appearing on h5 would be a 'replacement'.
casaschi
Posts: 164
Joined: Wed Dec 23, 2009 1:57 pm

Re: would PGN need updates following recent rule changes?

Post by casaschi »

hgm wrote:Ambiguous notation is a problem independent of move legality. If you write Nc6 while there are Knights both on b8 and e7, there is no way software can understand what you mean, even though both moves.
This is why the PGN standard define how to disambiguate Nbc6 and Nec6.
hgm wrote:WinBoard/XBoard ranks pseudo-legal moves higher than illegal moves that are not eventhat, however. So h5 here would always mean h7-h5, as this is the only prseudo-legal Pawn move to the mentioned square. If the Pawn comes from g7, g7h4 should be written, if a Pawn is dropped P@h5. 'h5' definitely doesn't provide any idication whatsoever that the white King could be involved, and it is not clear why a King disappearing on e8 and a Pawn appearing on h5 would be a 'replacement'.
You seem to be concerned only about how WinBoard/XBoard deals with illegal moves in the PGN. That is irrelevant to me at this point, I'm concerned instead about how to represent legal chess games according to the new FIDE rules.

Issue is, the new FIDE rules allow for games to continue after such an illegal move. If the term "illegal" bothers you, you can think of a move "formerly illegal but allowed to stand under the 2018 FIDE rules".

What you are suggesting is a possible way to extend the current PGN standard to handle the case; however my general issue is how to code comprehensively illegal moves that by definition can be completely unpredictable.

Again, after
1. e4 d6 2. Bb5
my opponent takes my White Queen off the board, places a new Black pawn on h5 then presses the clock. Now I can either claim an illegal move or continue; if I'm crazy enough to continue, how do you record the game?

The fact is, the sequence above is perfectly within the new FIDE rules for rapid/blitz. So whatever happens on Black move 2 is a "formerly illegal but allowed to stand under the 2018 FIDE rules".