Castling twice

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

Moderator: Ras

bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Castling twice

Post by bob »

Henk wrote:If a chess program does not allow illegal moves then you may not be able to replay games of beginners or maybe one of your own games played when you did not notice your opponent was playing an illegal en passant move or likewise
How can you replay games with illegal moves, leaving illegal positions. Should you allow e8 without promoting the pawn to anything?
Henk
Posts: 7261
Joined: Mon May 27, 2013 10:31 am

Re: Castling twice

Post by Henk »

bob wrote:
Henk wrote:If a chess program does not allow illegal moves then you may not be able to replay games of beginners or maybe one of your own games played when you did not notice your opponent was playing an illegal en passant move or likewise
How can you replay games with illegal moves, leaving illegal positions. Should you allow e8 without promoting the pawn to anything?
Yes it will be limited. I also don't know what to do if two drunk men start to play chess on a draughts board.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Castling twice

Post by bob »

Henk wrote:
bob wrote:
Henk wrote:If a chess program does not allow illegal moves then you may not be able to replay games of beginners or maybe one of your own games played when you did not notice your opponent was playing an illegal en passant move or likewise
How can you replay games with illegal moves, leaving illegal positions. Should you allow e8 without promoting the pawn to anything?
Yes it will be limited. I also don't know what to do if two drunk men start to play chess on a draughts board.
I would also bet that major league baseball doesn't continue when the ball gets replaced by a basketball, etc. You have to follow the rules to play the game.
User avatar
hgm
Posts: 28514
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Castling twice

Post by hgm »

carldaman wrote:Engines should not accommodate illegal moves, at least not in normal playing mode, but the GUIs should have a feature that can be enabled to allow such moves for the reason Henk stated, and for other reasons, too - let's say you quickly wanted to reach a new position without going thru 'new position set-up' while in analysis mode.

Today's GUIs lack many such common-sense features.
Win/XBoard provides a legality-testing option for that. Just swicth it off, and you can do anything. Usually there are no side effects to any illegal move you play or type, but you might be surprised if you move a King on last rank more than one square sideways.

BTW, some engines accept any move. E.g. my engine Shokidoki. If the GUI already can check legality, why should the engine?
carldaman
Posts: 2287
Joined: Sat Jun 02, 2012 2:13 am

Re: Castling twice

Post by carldaman »

bob wrote:
Henk wrote:
bob wrote:
Henk wrote:If a chess program does not allow illegal moves then you may not be able to replay games of beginners or maybe one of your own games played when you did not notice your opponent was playing an illegal en passant move or likewise
How can you replay games with illegal moves, leaving illegal positions. Should you allow e8 without promoting the pawn to anything?
Yes it will be limited. I also don't know what to do if two drunk men start to play chess on a draughts board.
I would also bet that major league baseball doesn't continue when the ball gets replaced by a basketball, etc. You have to follow the rules to play the game.
Yes, to play the game we need strict rules, but for analysis more latitude is useful. :)

Regards,
CL
carldaman
Posts: 2287
Joined: Sat Jun 02, 2012 2:13 am

Re: Castling twice

Post by carldaman »

hgm wrote:
carldaman wrote:Engines should not accommodate illegal moves, at least not in normal playing mode, but the GUIs should have a feature that can be enabled to allow such moves for the reason Henk stated, and for other reasons, too - let's say you quickly wanted to reach a new position without going thru 'new position set-up' while in analysis mode.

Today's GUIs lack many such common-sense features.
Win/XBoard provides a legality-testing option for that. Just swicth it off, and you can do anything. Usually there are no side effects to any illegal move you play or type, but you might be surprised if you move a King on last rank more than one square sideways.

BTW, some engines accept any move. E.g. my engine Shokidoki. If the GUI already can check legality, why should the engine?
Right, I can now vaguely recall seeing that legality check option somewhere. :)
Thumbs up to WB/XB!

Regards,
CL
JoshPettus
Posts: 730
Joined: Fri Oct 19, 2012 2:23 am

Re: Castling twice

Post by JoshPettus »

Heck in WB/XB you can have the engine define the rules, board even the pieces! :)