GNOME Bugzilla – Bug 668553
iagno AI sometimes freezes
Last modified: 2013-09-08 17:17:43 UTC
Play a level 3 computer against itself and the AI will go into an infinite loop. It takes the entire app down with it because it blocks the mainloop. Sometimes even when it doesn't freeze, it causes noticeable lags. So really, this is two bugs: 1) the AI sometimes gets stuck 2) the AI should probably be moved into a separate thread
I noticed something similar (perhaps the same thing tonight). It is very easy to get the computer stuck (reproducible, within a few moves). In fact, I'm having trouble finishing a game. The command line message is: ** WARNING **: computer-player.vala:73: Computer chose an invalid move: 0,0
The invalid move message definitely indicates the AI screwed up...
I just pushed a fix for this to master: http://git.gnome.org/browse/gnome-games/commit/?id=b2554eaa4b96e56e43bc29859b1fcd13984ad2f9
Should this bug be closed?
I think that there could still be another AI-hang bug. During my tests I experienced a hang at least once. I left this bug open to post any problems I find during testing here.
Also filed in Fedora against 3.3.91: https://bugzilla.redhat.com//show_bug.cgi?id=803438
The fedora bug is definitely the one fixed for 3.3.92 in comment #3.
thats great, thanks
I don't know about vala, but I saw you mistake check game over. For example next game, f5f6f7g7h7g5d3f8e6d6e7f4h5h8e3h6c7h4g6c6d7c8b6a6b5g8c5g4a7a8b8b7e8d8h3a4a5g3a3a2h2f3c4b3b4h1b2b1g2c3c2c1d2d1 -56 This game is over at 58 pieces, and score is 1:57. But if black is 0, then score always become 0:64. Even if pieces is less than 64, and one player score is not 0, if both player can not place anywhere, then the game is over.
Now iagno doesn't judge above game is over, and search next, but can not place anywhere, and crash.
*** Bug 674978 has been marked as a duplicate of this bug. ***
Still an issue,
Same occurs to me (iagno 3.6) when playing against AI, and not restricted to level 3.
Towards the end of the game the search depth jumps from 3/5/7 (easy/normal/hard) to 15/17/19. That means the AI is computing all its possible moves, all your possible countermoves, all its possible moves in response to those countermoves, and so on for 15 moves into the future. That's understandably taking several minutes to complete, making it impossible to finish any game that gets that far. The following fix has been pushed: 9746987 Search to a constant depth
Created attachment 254425 [details] [review] Search to a constant depth Towards the game the search depth jumps from 3/5/7 (easy/normal/hard) to 15/17/19, which takes several minutes to complete and causes the game to hang during that time. This is making it pretty much impossible to finish a game of Iagno unless one player is completely eliminated before that point. Search instead to a constant depth of 3/5/7 throughout the game. It might make sense to go a bit deeper towards the end of the game when playing on Hard, but 3/5/7 should work fairly well.