Page 1 of 1

An online tsumego solver.

Posted: Sat Jul 02, 2016 11:23 pm
by d180cf
Here is my attempt to write a tsumego solver: https://d180cf.github.io/

For now it solves only fully enclosed tsumegos, but most of reasonably enclosed tsumegos can be easily fixed. With this in mind, this solver is capable enough to solve even 4d rated problems like this one: (though I personally not sure why it's rated so high).



It works only in Chrome at the moment.

In short, first add stones with B+Click and W+Click, select a target with T+Click, make sure the target is white and click Solve. Just in case, I've written a short tutorial: d180cf.github.io/v0.1.0/tutorial

The idea is to eventually come up with a tool that would simplify adding new problems on goproblems.com - at the moment you need to specify all variations, which is quite a bit of work.

Re: An online tsumego solver.

Posted: Sun Jul 03, 2016 2:21 am
by Sennahoj
Not rendering the board for me in Chrome (on Windows 10)

Re: An online tsumego solver.

Posted: Sun Jul 03, 2016 9:19 am
by Jhyn
Same problem for me on Firefox 47.0 under Lubuntu.

Re: An online tsumego solver.

Posted: Sun Jul 03, 2016 12:00 pm
by d180cf
Could you guys check if you see the 3 pics of the board in the tutorial? Those 3 pics are also made with SVG. If you do see them, then the problem must be on JS side.

Re: An online tsumego solver.

Posted: Sun Jul 03, 2016 12:18 pm
by Jhyn
Yes, I see them.

Re: An online tsumego solver.

Posted: Sun Jul 03, 2016 3:31 pm
by d180cf
I had to fix a few things to make it work in Firefox. Please try https://d180cf.github.io/ (it will redirect you to /v0.1.1). Still doesn't work in IE/Edge (I know what to fix, though) and not tested in Safari. Btw, the https: prefix seems to be important: otherwise Chrome doesn't load a few sgf fields with sample problems; Firefox seems to work fine with http: too.

Re: An online tsumego solver.

Posted: Sun Jul 03, 2016 3:46 pm
by Jhyn
It's working for me now.
I tried it on a few tsumego and it doesn't find the unconditional kill unless I explicitly gave it a negative amount of ko threats. Maybe this is a feature. You might consider a "best answer" option where the goal is to get the best possible kill/life, at least in terms of ko. This is what we usually do when we "solve tsumego".

Re: An online tsumego solver.

Posted: Sun Jul 03, 2016 3:58 pm
by d180cf
ko is a tricky topic. At the moment modeling ko in the solver is simple: it's given the number of external ko treats and if while solving it needs to recapture a stone, it checks if the number of ko treats allows that, decrements that number and proceeds.

What it should ideally do is it should start with 0 ko treats and then increment the number if recapturing is necessary, then find a solution with the min number of required ko treats. Unfortunately, this is much harder to implement. IMO, at the moment the more important problem to solve is how to block the group from escaping thru little holes in the surrounding wall, which is a hard problem too. This would allow to not make a thick wall and solve tsumegos as is, just like they appear in goproblems.

Re: An online tsumego solver.

Posted: Mon Jul 04, 2016 1:58 am
by d180cf
This one (rated as 7d) was solved in 3-4 mins:



A quite impressive result given that the solver doesn't have any domain-specific knowledge yet - it just tries all possible moves one by one. And it seems it even found a missing variation that vougalar forgot to add:


Re: An online tsumego solver.

Posted: Tue Jul 05, 2022 5:48 am
by xiaodai
can't figure out how to use it