sanderland / katrain

Improve your Baduk skills by training with KataGo!
Other
1.59k stars 224 forks source link

Feature Request: local playout #613

Closed kylebakerio closed 1 year ago

kylebakerio commented 1 year ago

I think it's possible that the "g" shortcut for only searching within a box is an underused feature. Katago of course is a very global player, and often understanding a suggested move is difficult because katago isn't interested in playing out the consequence immediately and will only get back to that area 10 to 50 or 100 or whenever moves later.

I've been using the "g" (region select) feature to force katago to play locally. This works great! The one kind of annoying thing is that the 'hover over proposed move to see a playout' feature doesn't respect that box. That's acceptable--I can just click the move and use the region select feature to see the next move that way instead, but it would be amazing if it would also do local playouts within that box, as well?


I know I've just dropped a lot of suggestions in a project on maintainence mode on your plate--again, while this isn't exactly my wheelhouse, I have a hunch that this wouldn't be so difficult to implement (the core features are all already there, just a matter of tweaking some things to respect some contraints?), so I'm open to taking a stab at it if you can give some guidance.


and once again, thanks so much for this. When I started playing go, nothing like this was possible. I just started getting back into go in the last few days (thus all the interaction here, lol). I'm learning and exploring so much, digging into openings and josekis and learning my mistakes and how to punish things, etc. It used to be that finding help with your go was just a shot in the dark and like sucking info through a straw, and you never knew how reliable your source was, we were all making mistakes all the time. Now I just have access to definitive good/bad on tap for all games. Really, I cannot stress enough how incredible this program is.

sanderland commented 1 year ago

The one kind of annoying thing is that the 'hover over proposed move to see a playout' feature doesn't respect that box.

Actually the entire evaluation of moves does not respect the box after the first one. This took quite a bit of back-and-forth, but corresponds most reasonably to what you think of as the optimal move in a region. Things get really weird otherwise.

kylebakerio commented 1 year ago

Right, I am pretty sure I understand. I think it's great that the percentages and points are still whole-board relative, it would be weird otherwise. But it would be nice if the playouts on hover were the best move within the box (f a box is present), instead of following up with best moves on the whole board.

Perhaps could do something like stop once there are no more at least yellow or at least orange moves?

Basically, I want it to continue playing out optimal moves in the region only, if I've set region selection. (If nothing else, could even be a new experimental region explorer tool that is otherwise identical but with this behavior?)

Or am I missing some reason this doesn't have merit?

sanderland commented 1 year ago

I'd encourage you to play around a bit with the analysis engine (it talks in json, so node will be happy to do this) There is only really 'untilDepth' not 'untilsomescoredifference'. Anything other than '1' makes moves potentially rank highly purely because you force the opponent to respond in the box.

kylebakerio commented 1 year ago

Sure. I would imagine that katrain would throw away responses after a certain score. What I mean is, I can do this by hand, and I currently do. I open a region box, click the strongest move, then click the strongest response in the box, and so on, until the sequence is clearly finished locally. I watch the plays go down to light green, yellow, orange, because the rest of the board is calling, but then I understand the local threat behind the initial move.

All I want is that task to be automated--when I'm doing this and I hover over a move, the playouts are all over the board, because katago is great at positional judgement and timing, and knows that locally finishing out the sequence would be overplay--but I just want to understand the local sequence, not see the optimal global-correct-timing sequence.

Does that make more sense, or am I missing something?

sanderland commented 1 year ago

I think you're missing that the current view is a single query, rather than a complex multi-query feedback thingy (which are a lot slower and harder to support)

kylebakerio commented 1 year ago

Yeah, that's probably the thing. katago just returns an easy playout, and I'm asking to basically manually do multiple queries to katago to get custom behavior. Certainly would add implementation complexity in that case.