Goban image recognition in ZBaduk - And detecting the order of moves.

New today: import a photo of your game
You can now import pictures of your Go games directly into ZBaduk.

That has been released. It’s available right now.


TL;DR;

…but for those who are curious/interested. I’d also like to give you a sneak peek at what’s coming next. Something that I am personally really excited about.

An idea I’ve had for a long long time
Have you ever looked at a picture of a Go board and wondered in which order the moves were actually played? Maybe you played a game with a friend and snapped a photo. The next day you look at it and can’t remember how you got to that position.

In theory, you can work out the move order. Your phone can never know the exact order, because many different sequences lead to the same position. With enough computing time, though, a computer could find the most plausible sequence. The catch is that the number of possible orderings is astronomical (easily 10^400 or more for a full game), far too many to check one by one.

I had the idea years ago, but back then it was hard to pull off. It was more science fiction than reality. In mean time, I began to realize that there are many shortcuts, it’s less astronomical than it seems. And a few days ago I finally started building it (with my AI friends).

Where we are today
Below is a pro game reconstructed from a single picture. The actual move order is on the right, and the reconstructed version is on the left.

This example covers 60 moves and took about 3 minutes on an ordinary desktop computer, without a strong GPU or any optimizations.

The reconstruction clearly isn’t the same as the real game, so you could call it a failure. However, the interesting part is that it’s actually better than the real game.

Here’s what that means. Every game is full of small mistakes, and KataGo can measure how much each move gives away. Add those up over the whole game and you get a total error score. That score lets us compare the reconstructed move order with the real one.

In this case, the reconstruction has a lower total error than the actual game. In other words, the reconstructed sequence is a more sensible way to reach this position than the moves the players actually played. That’s something I did not expect, to be honest.

Where we’re heading
On our test server, ZBaduk already reconstructs a full game in about a minute. It shows the result as it goes and keeps refining it.

This will become an extension of the picture import feature. We’re still testing and fine-tuning, but I’d love to release it soon, so you can probably expect it sometime next week.

4 Likes

Whoa, lesssgoooooooo.
I pushed some similar features in my app yesterday, but my kifu recogniser is crappy haha

1 Like