Jnrolfe / pychess

Automatically exported from code.google.com/p/pychess
GNU General Public License v3.0
0 stars 0 forks source link

Illegal Move into Check After a Promotion #338

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
This might be a chess engine error, but I wanted to mention it in case the
engine was confused by some internal reporting error about promotions.

Summary:

I ran a Crafty vs. Glaurung match (I believe both were on expert). 
Everything went smoothly until Crafty promoted a pawn to queen.  Glaurung
then moved the king into check to take a piece guarded by the now-promoted
queen.  The game then hung there.  However, the program was fine and
successfully ran other tabs.  On reloading the saved move history (saved at
the hang so that it included the illegal move), it undid the illegal move
and played to the end successfully.  Altering the move history save file to
BEFORE the promotion, however, reproduced the error.

What steps will reproduce the problem?
1. I had to erase to before the promotion to reproduce it.  I attach the
altered save I used to reproduce it.

What is the expected output? What do you see instead?
See above.

Does it happen every time?
Consistently with the altered save file.  Perhaps other tests can be run on
promotions to see if it is not unique to this match.

What version of the product are you using?
Philidor 0.8.1

Did you use an installed version of PyChess or did you run in from a
tarball/svn?
I obtained it through the Ubuntu Synaptic Package Manger 

FILE NOTES:

1. 'GvC_glaurungError.pgn' is the save from the hang, so that it includes
the illegal move.
2. 'Altered.pgn' is the same file with the move history erased to slightly
before the promotion.
3. 'GvC_trial1_worked.pgn' is the result of reloading #1 from the hang and
letting it play through to the end.
4. 'error.png' is a sample screenshot of the illegal move

Thank you for your time!

Original issue reported on code.google.com by gao.mut...@gmail.com on 11 Aug 2008 at 5:36

Attachments:

GoogleCodeExporter commented 9 years ago
I believe this is firstly a Glaurung problem, as only Glaurung ignores this 
check -
right?
I'm not sure how PyChess should react on bugge engines though. We should 
probably
take a stand.
1) Make the engine loose
2) Let the user choose another move for the engine (only possible for engines, 
that
support save/load)
3) Let PyChess engine choose another move for the engine (only possible for 
engines,
that support save/load. Otherwise it could overtake the position)
4) Bring up an error dialog, end the game, and let user save it, and open it 
with
another engine.

Any other ideas?

Likewise thanks for your time testing.

Original comment by lobais on 28 Aug 2008 at 11:25

GoogleCodeExporter commented 9 years ago

Original comment by lobais on 10 Feb 2009 at 7:04

GoogleCodeExporter commented 9 years ago
xboard/winboard treat any illegal move as instant defeat, which I find fair 
(engines should be able to play legal chess moves purely, and if they can't 
they're obviously not up to winning a game).

However, some sort of notification that the engine didn't resign voluntarily 
but were force-resigned since they attempted to play an illegal move would be 
good (xboard/winboard have that too).

I think that also matches what happens in a "real" computer chess tournament 
held by chess clubs: if your engine fails to suggest a legal move, the game is 
lost.

Original comment by jonas.thiem@gmail.com on 30 Aug 2012 at 7:08

GoogleCodeExporter commented 9 years ago
We fixed the adjudication on illegal move part before, so I change the rest to 
"enhancement".

Original comment by gbtami on 25 Apr 2013 at 7:02

GoogleCodeExporter commented 9 years ago
We could also have it lose time like for humans (if it so doesn't get the 
message, it can lose on time.)

Original comment by G.nius...@gmail.com on 9 Jul 2013 at 5:06