-
Notifications
You must be signed in to change notification settings - Fork 228
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
Feature/abutting kata overlay #571
Feature/abutting kata overlay #571
Conversation
… rectangles large enough that they abut, with more transparency, and _behind_ the stones, which some users -- including me -- may prefer.
@featurecat There's been a lot of recent interest in Katago on Windows, which the author has been working on supporting as well as adding support for non-nVidia GPUs. Lizzie seems to be the GUI of choice for Katago users. If you have a chance to merge some of these recent PRs in, maybe it'd be a good time for a fresh official release so the latest 'official' client will work well out of box with Katago? Thanks for your big contribution to the scene! |
Then what about the mixture of two? Filling the square fully like in the first figure, but additionally drawing smaller squares onto the dead stones like in the second figure seems decent. |
@yzyray Personally I find "my" version clearer even when there are lots of stones on the board. I take your point, though: it is harder to see the occupancy info behind stones than on empty points. It would be possible to draw the overlay "on top" of the stones on the board instead of underneath, which would largely resolve that problem -- but at the cost of making the stones themselves harder to see, which I think would be worse rather than better overall. Maybe the "." key should cycle through { no overlay, full-square overlay behind stones, small-square overlay on top of stones } and then if you find different ones clearer at different stages in the game you can change? Or large-square mode could also draw small squares but only when there's a stone present on the board? That might be awkward to implement in the presence of "branch" stones, though. I don't see any option I'm 100% happy with. Anyone got any cleverer ideas? |
I think, only the dead stone need to draw a square. |
How to define "dead stone" for that purpose, though? Draw squares on top of black stones whose ownership estimate is more-white-than-black, and on top of white stones whose ownership estimate is more-black-than-white? That might work but seems a little complicated. (I had another worry but I realise it was wrong; I'll say what it was in case anyone else has the same feeling. I was concerned that doing that would introduce a sudden "jump", from not drawing the extra square to drawing it. But if we draw the extra square exactly when the ownership estimate "has the wrong sign", then there isn't a jump because at the point where it changes we're drawing the square with alpha=0, i.e., completely transparent.) |
OK, I have a version with the following behaviour.
I haven't yet pushed this version because it might be appropriate to make a few other changes at the same time and I thought I should get others' opinions before doing so.
Thoughts? |
(Oh, the current version of this -- which, again, so far exists only on my laptop -- also includes the fix for #569.) |
I think, it is a dead stone when the color is different from the square color. PS: @yzyray proposes to draw a square on the alive stone, which is good for viewing the vitality of the stone. I think it makes sense. |
I've made a version (still only on my own machine) that, in addition to the changes above,
I can push this and make it the proposed change for this PR, but I don't want to do that without giving others a chance to object since some of the changes are backward-incompatible. I have tested this with KataGo but not with Zen. (Zen is a commercial product and I don't have a copy.) |
If can upload some screenshots, it might help to understand. |
OK, here are lots of screenshots. First of all, for context, here is a position with no ownership information shown: Here is a modified version of the "smart" display, showing small squares on top of all stones rather than just "opposite-coloured" ones, as per @zsalch's more recent suggestion. The position here is a pretty stupid one, intended only to exhibit a variety of degrees of ownership. Here's a position from a game between some very strong players :-), first of all with no ownership information shown: My current thinking:
|
(I'm not very sure about the two versions of "smart". E.g., in those last two images the version that shows squares over all stones makes it easier to see that KataGo thinks the black stone on E16 is less securely white than the white stones surrounding it. Maybe that sort of comparison is worth the extra clutter.) |
It provides a good choice, but I think in most cases, it may not need to cycling, but turn it on/off. Maybe there are three options:
|
Option 1: Alt- Option 2: that's certainly possible; it requires that the user remember the name of the style they prefer (whereas with the "cycling" approach they can just hit Option 3: to me this feels needlessly complicated. An option to decide how you select between other options? It's probably true that most users will have a single style they prefer, and that they're more likely to want to turn ownership display on and off than to want to change the style. So I'm coming round to the following:
|
…plicit mode names. Mostly-fix race condition issue.
If I haven't messed up my merging :-) then the current state of this PR should behave as follows.
Once again, I don't have Zen and can't test against it, so it's possible that I might have broken things for Zen users. |
The text the user sees on holding down the |
@yzyray I think you're the Zen expert; at any rate, the Zen estimate code was added by you. Would it be possible for you to take a look at the changes in this PR and see whether they break things for Zen users? (I expect that the behaviour of Ctrl- |
The image in yzyray's comment above doesn't look particularly bad to me; I can imagine preferring it to the "small" style. But if Zen never gives ownership for points with stones on then the large+small, large+dead and large+stones options seem pretty pointless... |
When ownership colors the entire board, you might consider (if only as another option) having it fully determine the color instead of it being blended with the normal wood color, so as to minimize distortion. Intersections and star points that would become too obscured by this could then possibly be rendered in white instead (which would hopefully make things not too ugly). You might also want to make the ownership color spectrum customizable, so that it won't necessarily have to be on a gray scale. |
Because the variable name in the config.java has been changed, references of the Menu.java must now be changed. |
Wow, I had no idea that even existed. ... Ah, that's because it didn't exist until just now. OK, so what I think I'll do -- rather than making the "Estimate info" menu super-long -- is to split it up. Something like this:
Any objections? |
OK, I've done that. As before, I have made no attempt to do anything with non-English string resources. |
LGTM. but I think default should be tune off. |
You're right, the default should be off. I've changed that, and also fixed a stupid mistake. (I forgot that Do we need all the variant styles? (I have no strong opinion on this; the least likely one for anyone to want, I think, is the one that shows large and small squares everywhere.) Should I make ctrl-. cycle through a smaller set of variants when using Zen rather than KG? (My preference is not to do this, but users who use Zen all the time and KG never may well feel differently.) |
It seems to have no effect on Zen now. |
That sounds bad. I don't have Zen to test with, so could you be a bit more specific:
(My guess: everything appears right in the menus but nothing ever shows up because there's an error in my handling of the Zen ownership output. I'll investigate.) |
I have no the Zen too. |
This PR adds a new config option called show-katago-estimate-large. By default it's true (this could be changed for greater conservatism). When it's true and KataGo ownership display is turned on, instead of showing KataGo's ownership estimates as small squares on top of the stones they are shown as squares exactly large enough to abut one another without gaps, underneath the stones, with a bit more transparency to make up for the fact that they're larger.
I find this both easier to make sense of and less distracting when I just want to focus on the board. (Others may feel differently, which is why it's optional.)
While I was visiting that bit of the code, I also streamlined it a little -- there was some avoidable repetition.
You can see a (reduced-resolution) comparison of old and new at https://i.imgur.com/8E9huSK.png.
This change also modifies what happens when "branch" stones are displayed and small squares are used for the ownership overlay. Before, "branch" stones would (unlike stones actually played on the board) appear over rather than under the ownership squares -- making these purely hypothetical stones more prominent on the board than the ones actually played, and also hiding the ownership predictions. I've changed that so that small ownership squares appear on top of branch stones as well as actually-played stones.