Git Product home page Git Product logo

Comments (9)

lightvector avatar lightvector commented on July 30, 2024 3

Thanks for the question!

Just as a note first - you will want to re-pull from master or from the opencl branches, there have been some fixes to the GTP protocol logic just yesterday that were causing issues with Sabaki, there's some chance they would cause issues with Lizzie too. The changes also add new tags "lcb" and "utilityLcb" as well.

utility
KataGo's search maximizes a weighted combination of winrate and score - this makes KataGo play well in handicap games right out of the box compared to other Zero bots. This weighted combination of winrate and score is called "utility". In gtp_example.cfg, if you look near the bottom you will see:

winLossUtilityFactor = 1.0
staticScoreUtilityFactor = 0.20
dynamicScoreUtilityFactor = 0.20

These describe the weighting to be used for the utility. In this case, the utility is a sum of the winLoss value, which is the same as winrate except it is on a -1 to +1 scale instead of a 0 to 1 scale, and a "static" score utility that goes from -0.2 to +0.2, and a "dynamic" score utility that goes from -0.2 to +0.2, so the total utility could go from -1.4 to +1.4. The static score utility is based on winning by more points and losing by less points. The dynamic score utility is based on gaining points relative to how many you think you have now, even if you are far from winning or losing.

One tricky bit is that if dynamic score utility has a nonzero weight, then because of the way it is relative to your current point status on any given move, utility values will NOT remain constant in their meaning over the course of the game, so I might not recommend showing it to the user. It is not really necessary to show to the user anyways if they can already toggle between seeing winrate and score, since knowing both winrate and score is all the information you need to know anyways.

scoreMean
scoreMean is the average predicted score that KataGo is seeing in its playouts that the player is predicted to win by. So KataGo can make a prediction of how much it would win or lose by from a given position. Just as with winrate, by default it is from the perspective of the side to move.

It's an average prediction, so for example if there is a big fight where if you win you are ahead by 30 points winning and if you lose you are behind by 10, and KataGo is genuinely confused about who wins the fight and thinks it's 50-50, then scoreMean would be about 10 points (the average of +30 and -10). The vast majority of the time though the position is well-understood and scoreMean seems a pretty good guide about how many points one side is winning by.

scoreStdev
scoreStdev is a measure of uncertainty in scoreMean.

You will see that it starts out generally very high in the opening, and decreases over the course of the game, because in the opening, there is the whole game remaining, so a lot of things could happen to affect the actual final score that a player wins or loses by, but in the endgame, not much can happen. It may spike up if a big midgame fight breaks out, particularly one that involves a large dragon and/or where KataGo is not entirely certain of the result. Empirically, this value is computed based on both the standard deviation of playout results the neural net's own reported score uncertainty.

  • It is biased to be a little high because the MCTS search will have a diversity of blunders by both sides, even if those blunders would never actually be played for real. I.e. just like humans or LZ, KataGo will often read a blunder move in its search to prove and make sure that it doesn't work. But that means some of your playouts will get extreme scores, which will mean the standard deviation of the playout results is higher than what you would actually get in real play.
  • It also is biased a little high because the neural net itself is a little more uncertain than I think it should be, for unknown reasons that want to investigate.

All of this is to say that the exact numerical value of scoreStdev is not so important. But whether it goes up or down on a given move - that can be interesting! You can see pretty clearly on https://online-go.com/player/592684/ sometimes it goes sharply up or down on certain moves, and if you are reasonably good at Go, you'll find that those times very often correspond to moves where the player had a choice to go big and risky or go solid and safe, and they made one choice or the other!

I hope that helps!

from katago.

yzyray avatar yzyray commented on July 30, 2024 2

Thanks for the detailed explanation. scoreMean,ownership should be very usefull.

from katago.

kaorahi avatar kaorahi commented on July 30, 2024 1

@yzyray, I added a quick support of scoreMean to lizzie, that may help your implementation (featurecat/lizzie#542). I don't have further motivation for lizzie and will do nothing more.

from katago.

lightvector avatar lightvector commented on July 30, 2024

Oh, one more note: kata-analyze supports a tag "ownership true", like:

kata-analyze 20 ownership true

If you specify this, KataGo will also predict the ownership of every indivdual location on the board, which you can use to visualize the expected territory! For example it will output 361 numbers, in order from the top left of the board to the bottom right, where -1 means definite ownership by the opponent, and 1 means definite ownership by the current player, and in between is in between.

from katago.

lightvector avatar lightvector commented on July 30, 2024

Nice!
@yzyray - what were you thinking might be the user interface you wanted to implement? It might be very useful to show predicted score on individual moves as well - in handicap games, this can strongly differentiate between moves and show some moves as clear mistakes even if they barely affect the winrate because black is still too far ahead. But the space for displaying values on individual moves is very limited already to show everything at the same time, so maybe a button to toggle between showing the winrate and the score for all the moves could be reasonable? I'm not sure.

from katago.

yzyray avatar yzyray commented on July 30, 2024

@lightvector yes scoreMean is usefull int handicap games, i implement like
nokomi
and i added score+komi
komi
and also added scoreMean graph like winrategraph.
but i haven't make it support english,and the code is a little messy, so i didn't pr yet
it's in https://github.com/yzyray/lizziey/tree/multiEngines

from katago.

yzyray avatar yzyray commented on July 30, 2024

by the way, now i to use the firstmove's scoreMen form kata-analyze to draw the scoreMean graph.i wonder if it is appropriate.

from katago.

lightvector avatar lightvector commented on July 30, 2024

Using the order 0 move's scoreMean is reasonable. It would also be reasonable to use the average across all moves, weighted by visits, if you prefer it not to potentially jump a little when the best move switches during active analysis. Please let me know if at any point you have any other questions.

from katago.

lightvector avatar lightvector commented on July 30, 2024

As of now, the new tip of Lizzie seems pretty sweet.

Additionally, I've now added a file about KataGo's GTP extensions, including kata-analyze, documenting how they're supposed to work. You can see it here:
https://github.com/lightvector/KataGo/blob/master/GTP_Extensions.md

I'm considering this issue closed, but feel free to reply back or open a new issue if there are any further questions!

from katago.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.