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

Draw winrate and score lead in the graph. #79

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

CGLemon
Copy link
Contributor

@CGLemon CGLemon commented Sep 26, 2022

There is the analysis winrate or score lead value on the graph. I think that it is more easy to get the best winrate if there are too many candidate moves? The value is always black's POV.

Draw winrate if we set 'Display -> Graph -> Winrate'.
Screenshot from 2022-09-26 14-59-26

Draw score lead if we 'Display -> Graph -> Score'.
Screenshot from 2022-09-26 14-59-33

@rooklift
Copy link
Owner

I doubt I'll accept this honestly, I'm trying to avoid info overload.

If you were going to do it at all, I think you can just call node.stored_winrate() and node.stored_score() from within draw_position() (and not bother worrying about the arrays). Check if the result is null though.

But I doubt I'll merge it.

@rooklift
Copy link
Owner

rooklift commented Sep 26, 2022

Also best not to draw it if the program is in a special mode (autoanalysis etc) because it will flicker in and out of existence. So I'd do it like so:

let analysis_str = "";

if (!hub.__autoanalysis && !hub.__backanalysis && !hub.__autoplay && !hub.__play_colour) {
	if (config.graph_type === 1) {
		let val = node.stored_winrate();
		if (typeof val === "number") {
			analysis_str = `(${(val * 100).toFixed(1)}%) `;
		}
	} else if (config.graph_type === 2) {
		let val = node.stored_score();
		if (typeof val === "number") {
			let s = val.toFixed(1);
			if (!s.startsWith("-")) {
				s = "+" + s;
			}
			analysis_str = "(" + s + ") ";
		}
	}
}

@CGLemon
Copy link
Contributor Author

CGLemon commented Sep 26, 2022

Already fixed the flicker issue. Does it look better?

@rooklift
Copy link
Owner

I guess so. But as I say, it's not a feature I really want, sorry.

@HackYardo
Copy link

I suggest to add axis to the curve and highlight the max and min values. If there is only a curve as is, it would be hard to know which move is important in a Go game...

@ernop
Copy link

ernop commented Aug 9, 2023

I would accept & enable this feature. The graph is very strange in that the meaning is implicit - there is no axis, no ticks, not even anything saying whether left or right represents white/black. You just have to memorize that fact, and it's inefficient.

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

Successfully merging this pull request may close these issues.

4 participants