GNOME Bugzilla – Bug 609815
chess: Computer keeps thinking, does not play
Last modified: 2013-05-01 04:52:06 UTC
Created attachment 153692 [details] Saved game Game settings, when the game began: Game name: Human versus GNU Chess Move Time: Five minutes White: Human Black: GNU Chess Difficulty: Black: Easy I started a limited-time game against the computer in glchess. After a few moves, the computer did not respond with a move, and finally lost the game as it ran out of time. In a 5 minute game, I was left with 2 min 46 s, while the computer was left with a something over 3 min, when its turn began. It was only the 5th move. The program was not hung, as the timer was ticking smoothly, and the program was responsive throughout, even after the game got over. I am attaching the .pgn file for the game (stuck.pgn), as saved after the game got over. Also attaching the following log files that came up after clicking "View > Show Logs": Application-Log.txt: The first tab in the log window. GNU-Chess-1.txt: The second tab in the log window, named "GNU Chess". GNU-Chess-2.txt: The second tab in the log window, also named "GNU Chess". 'GNU-Chess-2.txt' shows something interesting. All the moves mentioned in this file match with the moves that the computer actually made during the game. However, there are 2 things that I found strange: 1) The last 2 lines in this log file are: 4. ... g1f3 My move is: g1f3 However, the computer never played such a move. 2) The numbering of moves in this file looks very confusing. For example the above move is numbered as 4, although this was the 5th move.
Created attachment 153693 [details] Log window: Tab #1
Created attachment 153694 [details] Log window: Tab #2
Created attachment 153695 [details] Log window: Tab #3 This is the log file that shows a move (last line) that the chess engine seems to have thought of, but never played.
Sorry, it is meant to be "Log window: Tab #3". (In reply to comment #3) > Created an attachment (id=153695) [details] > Log window: Tab #2 > > This is the log file that shows a move (last line) that the chess engine seems > to have thought of, but never played.
Reproduced. I played the game again, and the program behaved in the same way. The game had reached a very similar position (Both black knights pinned using bishops). I just noticed that the last moved decided by the engine (as seen in the log file) is a valid move for white, whereas the computer was playing black! Attached is the .pgn file (stuck-1.pgn) and the new log file (GNU-chess-3.txt).
Created attachment 153705 [details] Saved game - session 2
Created attachment 153706 [details] Log window: session 2
I think I ran into the same bug, so I figured I'd attach my own PGN as well. To duplicate on my PGN, make the move b4 as white as soon as it loads. To make the game playable, load my PGN and make the move Rh1 as soon as it loads :/ Therefore, it's not confused on what it's playing as when the game starts up, it only pretends to be confused when the user makes a good move :). (or something else...) I'm going to try to load up my game in gnuchess directly and see what happens. I've never done that before, so if anyone has any pointers let me know. Hopefully this isn't a bug in gnuchess. :/ Niraj, I was able to make your game playable by editing the PGN file. The file you attached had your own move as the last move played, and I'm pretty sure glchess craps out when that happens. If you edit it to remove your move (and remove the end of game at the end of your moves line), your game becomes playable. 15c15 < 1. e4 Nc6 2. Bb5 Nf6 3. d3 e5 4. Bg5 1-0 --- > 1. e4 Nc6 2. Bb5 Nf6 3. d3 e5 * Thanks, Jordan Bray
Created attachment 195244 [details] Saved game from Jordan Bray
Created attachment 195249 [details] The version not including move 19. Make the move b4 as white, then gl/gnuchess has a chance of making Nxb3, which is an invalid chess move. Ctrl+Z is your friend in duplicating this bug.
In git master it is simply Nb3 rather than Nxb3, so I guess this is fixed somehow. Ran this multiple times and everything looks fine. Jordan, can you still reproduce this, and if so on which version? The entire program's been rewritten since Niraj's original report, so I didn't even bother looking into that.
(In reply to comment #8) > Niraj, I was able to make your game playable by editing the PGN file. The file > you attached had your own move as the last move played, and I'm pretty sure > glchess craps out when that happens. If you edit it to remove your move (and > remove the end of game at the end of your moves line), your game becomes > playable. OK, got this fixed for the next stable release (3.8.2). Thanks for identifying the problem!