Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tsumego frame for life/death problems #498

Closed
kaorahi opened this issue Jan 8, 2022 · 13 comments
Closed

Tsumego frame for life/death problems #498

kaorahi opened this issue Jan 8, 2022 · 13 comments

Comments

@kaorahi
Copy link
Contributor

kaorahi commented Jan 8, 2022

I imported "tsumego frame" from lizgoban as an exercise of python. It helps AI to solve life/death problems slightly better than mere use of "smaller board" or "region of interest". Does anyone want to use this feature seriously?

(black to play: from https://www.h-eba.com/heba/tumego/eba.html)

tsumego_frame

  • Fill the rest of the board evenly so that katago concentrates on the problem.
  • Set ko threats only for the opponent so that katago finds unconditional solutions (not ko solutions). This seems important in my experiences.

(tentative usage)

  1. Put a problem on the 19x19 board.
  2. Hit u key to copy tsumego frame to clipboard. (shift+u for ko problem)
  3. Hit ctrl+v to paste it.
  4. Set region of interest manually from Analysis Options if you like more efficient search.

I dare to require ctrl+v to avoid unintentional loss of the current board by an accidental hit of u.

https://github.com/kaorahi/katrain/tree/tsumego_frame

@kaorahi kaorahi closed this as completed Jan 14, 2022
@sanderland sanderland reopened this Jan 22, 2022
@sanderland
Copy link
Owner

Will have a look later

@sanderland
Copy link
Owner

in branch now under tsumegoframe

Issues

The wall is quite close, e.g.

image

Ctrl-v is awkward. Any reason we can't just add the AB/AW as an additional node to the current position?

@kaorahi
Copy link
Contributor Author

kaorahi commented Mar 2, 2022

We can increase margin = 2 if the wall is too close. Or, we need to add a black stone manually around C14 beforehand. (This algorithm is far from perfect anyway. It fails in some cases.)

Ctrl-v is just a quick hack as I'm not sure how to append AB/AW in katrain.

...and I pushed a bug fix 814529e to https://github.com/kaorahi/katrain/tree/tsumego_frame . I missed translation of some logic from the original JS code.

https://github.com/kaorahi/lizgoban/blob/master/src/tsumego_frame.js
https://github.com/kaorahi/lizgoban/blob/v0.7.0-pre2/src/tsumego_frame.js

@sanderland
Copy link
Owner

sanderland commented Mar 2, 2022

See cd61a18 for some work on using AB/AW and a little more natural python instead of flatten (and reformatting with black)

@kaorahi
Copy link
Contributor Author

kaorahi commented Mar 2, 2022

Thanks for the revision!

@sanderland
Copy link
Owner

Menus + analysis region setting added and merged into 1.11 at #506 , please test :)

@kaorahi
Copy link
Contributor Author

kaorahi commented Mar 5, 2022

It seems to work well in brief tests. :)

@sanderland sanderland mentioned this issue Mar 7, 2022
@kaorahi
Copy link
Contributor Author

kaorahi commented Mar 7, 2022

The default margin 5 may be too large? It destroys ko threats in large size problems.

@sanderland
Copy link
Owner

Can you give an example?

@kaorahi
Copy link
Contributor Author

kaorahi commented Mar 7, 2022

If I allow ko in this problem, no room is left for B's ko threats.

broken_ko_threat

(The third problem in https://www.h-eba.com/heba/tumego/eba.html)

@sanderland
Copy link
Owner

it's a tough balance, but i've set it to 4 now

@sanderland
Copy link
Owner

Closing as it's released

@xiaoyifang
Copy link
Contributor

xiaoyifang commented Oct 11, 2023

katrain support arbitary board size ,which means ,you can do this.
image
image

based on the above picture ,what about a new way to solve life/death problem.
drag the region around the place(this function is already existed),then shrink the board size to the region.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants