kaorahi / lizgoban

Leela Zero & KataGo visualizer
GNU General Public License v3.0
172 stars 29 forks source link

Tsumego frame fails in some cases #91

Open awsjgy opened 1 year ago

awsjgy commented 1 year ago

I saw in lizzieyzy's open source project that you have been involved in helping with dead-end problems. But in the actual solution of dead-live problems, found some problems For example, the topic of robbery, if the positive solution is robbery and kill, but considering the number of robberies is not enough, thus leading to the calculation of robbery can not be It is also possible that the solution is net kill, but if the robbery can be won, katago may calculate that the solution is a robbery instead of a net kill. Is it possible to modify the code to set the number of robberies and the value of robberies so that katago can prioritize the dead-or-alive questions instead of ignoring them?

If black kills white, but some white can eat the white pieces in another area instead of eating them, can we set the code to realize this function?

kaorahi commented 1 year ago

Tsumego frame feature is far from perfect and I don't have a good idea at present, unfortunately.

As for a quick workaround, to create more or larger ko threats manually, you can remove some surrounding stones around the pattern by clicking on them while pressing b key (or w key, either is ok). You can also place new stones by clicking on empty points with b or w key, though this may confuse KataGo due to unnatural "recent moves".

The ko threat patterns are hard-coded in src/tsumego_frame.js as follows. So you can edit them if you prefer more or larger ko threats. But note that such patterns tend to interfere with the tsumego itself when its size is large.

const offense_ko_threat = [`
....OOOX.
.....XXXX
`, true, false]
const defense_ko_threat = [`
..
..
X.
XO
OO
.O
`, false, true]