GithubHelp home page GithubHelp logo

leela-analysis's People

Contributors

hanspi42 avatar lightvector avatar stevenvandijk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

leela-analysis's Issues

Nice to have: options ordered from best to worst

Hi, we can have this kind of display (see below).
It would be good to have it sorted and labelled accordingly.

A -> Win%: 49.01% (8200 visits)
B -> Win%: 47.03% (12611 visits)
C -> Win%: 46.78% (5269 visits)
D -> Win%: 47.38% (4509 visits)
E -> Win%: 46.98% (4082 visits)
F -> Win%: 44.97% (1787 visits)
G -> Win%: 46.81% (736 visits)

Suggestion: Nicer, more informative graph

A suggestion: the graph is not well readable if there are lines, I think it is easier to identify when (at which move) something happens if the graph has no lines and a slightly different dimension. Also, without reading Leela's doc, it is not clear whose win rate the script is showing.

Therefore, my suggestion for lines 30ff in the main script:

plt.figure(1, figsize=(7,3.6))
plt.axhline(0.5, 0, max(winrates.keys()), linestyle='--', color='0.7')
plt.plot(X, Y, linestyle='None', color='k', marker='+')
plt.xlim(0, max(winrates.keys()))
plt.ylim(0, 1)
plt.xlabel("Move number", fontsize=12)
plt.ylabel("Black's win rate", fontsize=12)
plt.savefig(outp_fn, dpi=200, format='pdf', bbox_inches='tight')

Thanks for maintaining this! I use it on all my games and learn a lot.

max rollout depth exceeded! import copy rasied it ?

when i want to use mtcs to play ,it rasied error :
File "/home/mrmartinke/Desktop/MuGo-master/strategies.py", line 265, in estimate_value
current = copy.deepcopy(leaf_position)
NameError: name 'copy' is not defined
so i import copy ,the game can run ,but it rasied this everytime :

Move: 4. Captures X: 0 O: 0
max rollout depth exceeded!
value: 23.0
tree search

thanks for your help!

9x9 sgf

I seem to be getting an error running on a 9x9 game generated from OGS. Here is a sample output followed by the files.

C:\Leela0100GTP\leela-analysis-master>sgfanalyze.py "9336957-056-Prester Jane-brose.sgf" --leela C:\Leela0100GTP\Leela0100GTP_OpenCL.exe > PresterJane-brose.sgf
Executing approx 168 analysis steps

| | done% | Est... | done / total
| | 0.00% | Est... | 0 / 168
WARNING: analysis stats missing data mc_winrate
WARNING: analysis stats missing data nn_winrate
WARNING: analysis stats missing data margin
| | 0.60% | 0:37:51 | 1 / 166
WARNING: analysis stats missing data mc_winrate
WARNING: analysis stats missing data nn_winrate
WARNING: analysis stats missing data margin
| | 1.22% | 0:34:03 | 2 / 164

9336957-056-Prester Jane-brose.sgf.txt

PresterJane-brose.sgf.txt

One win rate inversion too many in graph_winrates()

The function graph_winrates() inverts win rates according to colour, but this has been done somewhere else before, so a winrate that should be constant becomes a triangle curve.

Fix: remove lines 25 and 26 of sfganalyze.py

for move_num in sorted(winrates.keys()):
    pl, wr = winrates[move_num]
    # if pl != color:
    #    wr = 1. - wr
    X.append(move_num)
    Y.append(wr)

Existing comment concatenation

If a move already has a comment leela-analysis should, (could?) start its comments on a new line or at least a space.

Creates Empty SGF and then analyzes :-)

Thank you for what I know was a lot of work and which I hope will improve my go playing and analysis
I know some python, the python installed as a system default is Anaconda 3.6 so I am using a winpython 2.7
to run the program mybat.bat is my running script. When I run the program seems to write a zero length
sgf file and then proceed to do its analysis. Can you offer any advice. Is there an email address or phone number where I can contact you directly. My email is laefsky AT comcast DOT net

Windows Bat File Follows

.\python.exe E:\leela-analysis-master\sgfanalyze.py -v3 E:\downloads\testa.sgf --leela E:\Leela0110GTP\Leela0110GTP_OpenCL.exe > test2.sgf
my email is : laefsky AT comcast DOT net

Quick win: horizon effect

Hi, there is a clear horizon effect on hard games, by example: black win rate = 50% white makes a move. then black win rate drops to 20%.
It comes from the fact the analysis is probably done forward but performing the analysis backward would fix this kind of issue (because leela engine keeps track of explored sub-tree), it will not make leela that much reliable but it will improve it's evaluation with the game main line as an hint. And more importantly it makes the analysis more consistent with itself.
So performing the evalution backward from last move to first move is probably a real quick win for the script!

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.