It is currently Wed Aug 17, 2022 5:37 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 10 posts ] 
Author Message
Offline
 Post subject: An online tsumego solver.
Post #1 Posted: Sat Jul 02, 2016 11:23 pm 
Beginner
User avatar

Posts: 6
Liked others: 0
Was liked: 2
Rank: KGS 1d
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.

This post by d180cf was liked by: Bonobo
Top
 Profile  
 
Offline
 Post subject: Re: An online tsumego solver.
Post #2 Posted: Sun Jul 03, 2016 2:21 am 
Dies with sente

Posts: 103
Liked others: 3
Was liked: 37
Rank: Tygem 5d
Not rendering the board for me in Chrome (on Windows 10)

Top
 Profile  
 
Offline
 Post subject: Re: An online tsumego solver.
Post #3 Posted: Sun Jul 03, 2016 9:19 am 
Lives with ko

Posts: 202
Location: Santiago, Chile
Liked others: 39
Was liked: 44
Rank: EGF 1d
Universal go server handle: Jhyn
Same problem for me on Firefox 47.0 under Lubuntu.

_________________
La victoire est un hasard, la défaite une nécessité.

Top
 Profile  
 
Offline
 Post subject: Re: An online tsumego solver.
Post #4 Posted: Sun Jul 03, 2016 12:00 pm 
Beginner
User avatar

Posts: 6
Liked others: 0
Was liked: 2
Rank: KGS 1d
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.

Top
 Profile  
 
Offline
 Post subject: Re: An online tsumego solver.
Post #5 Posted: Sun Jul 03, 2016 12:18 pm 
Lives with ko

Posts: 202
Location: Santiago, Chile
Liked others: 39
Was liked: 44
Rank: EGF 1d
Universal go server handle: Jhyn
Yes, I see them.

_________________
La victoire est un hasard, la défaite une nécessité.

Top
 Profile  
 
Offline
 Post subject: Re: An online tsumego solver.
Post #6 Posted: Sun Jul 03, 2016 3:31 pm 
Beginner
User avatar

Posts: 6
Liked others: 0
Was liked: 2
Rank: KGS 1d
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.

Top
 Profile  
 
Offline
 Post subject: Re: An online tsumego solver.
Post #7 Posted: Sun Jul 03, 2016 3:46 pm 
Lives with ko

Posts: 202
Location: Santiago, Chile
Liked others: 39
Was liked: 44
Rank: EGF 1d
Universal go server handle: 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é.

Top
 Profile  
 
Offline
 Post subject: Re: An online tsumego solver.
Post #8 Posted: Sun Jul 03, 2016 3:58 pm 
Beginner
User avatar

Posts: 6
Liked others: 0
Was liked: 2
Rank: KGS 1d
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.

Top
 Profile  
 
Offline
 Post subject: Re: An online tsumego solver.
Post #9 Posted: Mon Jul 04, 2016 1:58 am 
Beginner
User avatar

Posts: 6
Liked others: 0
Was liked: 2
Rank: KGS 1d
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:


Top
 Profile  
 
Offline
 Post subject: Re: An online tsumego solver.
Post #10 Posted: Tue Jul 05, 2022 5:48 am 
Dies with sente

Posts: 79
Liked others: 28
Was liked: 50
Rank: AUS 2D
Wbaduk: 4k
OGS: 4k-8k
can't figure out how to use it

Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group