An online tsumego solver.

For discussing go computing, software announcements, etc.
Post Reply
User avatar
d180cf
Beginner
Posts: 6
Joined: Tue Sep 29, 2015 10:25 pm
Rank: KGS 1d
GD Posts: 0
Been thanked: 2 times

An online tsumego solver.

Post 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.
Last edited by d180cf on Mon Jul 04, 2016 1:58 am, edited 1 time in total.
Sennahoj
Dies with sente
Posts: 103
Joined: Fri Jun 20, 2014 5:45 am
Rank: Tygem 5d
GD Posts: 0
Has thanked: 3 times
Been thanked: 37 times

Re: An online tsumego solver.

Post by Sennahoj »

Not rendering the board for me in Chrome (on Windows 10)
Jhyn
Lives with ko
Posts: 202
Joined: Thu Sep 26, 2013 3:03 am
Rank: EGF 1d
GD Posts: 0
Universal go server handle: Jhyn
Location: Santiago, Chile
Has thanked: 39 times
Been thanked: 44 times

Re: An online tsumego solver.

Post by Jhyn »

Same problem for me on Firefox 47.0 under Lubuntu.
La victoire est un hasard, la défaite une nécessité.
User avatar
d180cf
Beginner
Posts: 6
Joined: Tue Sep 29, 2015 10:25 pm
Rank: KGS 1d
GD Posts: 0
Been thanked: 2 times

Re: An online tsumego solver.

Post 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.
Jhyn
Lives with ko
Posts: 202
Joined: Thu Sep 26, 2013 3:03 am
Rank: EGF 1d
GD Posts: 0
Universal go server handle: Jhyn
Location: Santiago, Chile
Has thanked: 39 times
Been thanked: 44 times

Re: An online tsumego solver.

Post by Jhyn »

Yes, I see them.
La victoire est un hasard, la défaite une nécessité.
User avatar
d180cf
Beginner
Posts: 6
Joined: Tue Sep 29, 2015 10:25 pm
Rank: KGS 1d
GD Posts: 0
Been thanked: 2 times

Re: An online tsumego solver.

Post 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.
Jhyn
Lives with ko
Posts: 202
Joined: Thu Sep 26, 2013 3:03 am
Rank: EGF 1d
GD Posts: 0
Universal go server handle: Jhyn
Location: Santiago, Chile
Has thanked: 39 times
Been thanked: 44 times

Re: An online tsumego solver.

Post 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".
La victoire est un hasard, la défaite une nécessité.
User avatar
d180cf
Beginner
Posts: 6
Joined: Tue Sep 29, 2015 10:25 pm
Rank: KGS 1d
GD Posts: 0
Been thanked: 2 times

Re: An online tsumego solver.

Post 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.
User avatar
d180cf
Beginner
Posts: 6
Joined: Tue Sep 29, 2015 10:25 pm
Rank: KGS 1d
GD Posts: 0
Been thanked: 2 times

Re: An online tsumego solver.

Post 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:

xiaodai
Lives with ko
Posts: 129
Joined: Sat Mar 14, 2015 7:31 pm
Rank: AUS 2D
GD Posts: 0
KGS: 5d
OGS: 1d-2k
Has thanked: 30 times
Been thanked: 87 times

Re: An online tsumego solver.

Post by xiaodai »

can't figure out how to use it
Post Reply