herzbube / littlego

Little Go. An iOS application that lets you play the game of Go on the iPhone or iPad.
https://littlego.herzbube.ch/
Apache License 2.0
138 stars 53 forks source link

Fuego thinks forever in latest update #328

Closed Spurlock closed 5 years ago

Spurlock commented 5 years ago

In playing games against the computer, the AI somehow gets stuck "thinking" indefinitely by the second move. This happens even against the "weak" computer player that normally plays almost instantly.

So far I've been unable to get more than 2 moves into any game I've played against the computer since downloading the latest update.

I am running iOS 12.1.1 on an iPhone SE.

herzbube commented 5 years ago

Thanks for reporting this. This is a combination of two bugs:

  1. Fuego for some reason that I'm still investigating is not seeing handicap stones when it generates a move (the genmove GTP command). This results in an error status reported back to Little Go. You can see the erroneous GTP command under "Diagnostics > GTP Log".
  2. Little Go does not have proper error handling for this scenario. The result of this is that the UI never gets updated although the computer is no longer actually thinking.

I already have a fix for the second problem. The first problem, however, which is the actual root cause, is surprisingly difficult to debug. I'll update the issue as soon as I know more.

herzbube commented 5 years ago

Found the solution for problem 1. This is a bug in Fuego itself. It's now fixed in the fuego-on-ios project: See issue 20. As a precaution, a similar bug was also fixed: See issue 21.

herzbube commented 5 years ago

This "only" affected board sizes 13, 15, 17 and 19.

Spurlock commented 5 years ago

Awesome, thanks for the update!

It sounds like you've got it figured out, but I wanted to clarify just in case that the games I was playing didn't have any handicap stones, so I'm not sure why problem 1 would apply.

herzbube commented 5 years ago

Yeah, I guess the bug could have affected anyone playing a stone on one of the 4/4 intersections within the first couple of moves. The handicap use case was merely how I could reproduce the problem.