Life In 19x19
http://www.lifein19x19.com/

An online tsumego solver.
http://www.lifein19x19.com/viewtopic.php?f=18&t=13333
Page 1 of 1

Author:  d180cf [ Sat Jul 02, 2016 11:23 pm ]
Post subject:  An online tsumego solver.

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.

Author:  Sennahoj [ Sun Jul 03, 2016 2:21 am ]
Post subject:  Re: An online tsumego solver.

Not rendering the board for me in Chrome (on Windows 10)

Author:  Jhyn [ Sun Jul 03, 2016 9:19 am ]
Post subject:  Re: An online tsumego solver.

Same problem for me on Firefox 47.0 under Lubuntu.

Author:  d180cf [ Sun Jul 03, 2016 12:00 pm ]
Post subject:  Re: An online tsumego solver.

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.

Author:  Jhyn [ Sun Jul 03, 2016 12:18 pm ]
Post subject:  Re: An online tsumego solver.

Yes, I see them.

Author:  d180cf [ Sun Jul 03, 2016 3:31 pm ]
Post subject:  Re: An online tsumego solver.

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.

Author:  Jhyn [ Sun Jul 03, 2016 3:46 pm ]
Post subject:  Re: An online tsumego solver.

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".

Author:  d180cf [ Sun Jul 03, 2016 3:58 pm ]
Post subject:  Re: An online tsumego solver.

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.

Author:  d180cf [ Mon Jul 04, 2016 1:58 am ]
Post subject:  Re: An online tsumego solver.

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:


Author:  xiaodai [ Tue Jul 05, 2022 5:48 am ]
Post subject:  Re: An online tsumego solver.

can't figure out how to use it

Page 1 of 1 All times are UTC - 8 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/