Giter VIP home page Giter VIP logo

lizzie's Introduction

Lizzie - Leela Zero Interface

screenshot

Lizzie is a graphical interface allowing the user to analyze games in real time using Leela Zero. You need Java 8 or higher to run this program.

See the Wiki for learning more.

Build Status

Running a release

Just follow the instructions in the provided readme in the release.

The first run may take a while because Leela Zero needs to set up the OpenCL tunings. Just hang tight, and wait for it to finish, then you will see Leela Zero's analysis displayed on the board. Feel free to supply your own tunings, as this will speed up the process. Do this by copying any leelaz_opencl_tuning file you have into the directory.

Building from source

Building Leela Zero

First, you will need to have a version of Leela Zero that continually outputs pondering information. You can get this from one of the Lizzie releases or build it yourself; just compile from the next branch of Leela Zero (see http://github.com/gcp/leela-zero/tree/next for more details).

$ git clone --recursive --branch next http://github.com/gcp/leela-zero.git

Building Lizzie

The simplest way to build Lizzie is to use Maven.

To build the code and package it:

$ mvn package

Running Lizzie

$ java -jar "target/lizzie-0.7-shaded.jar"

(or whatever the current version of the shaded jar file is in target/).

After you run this command you should see a GUI start. Lizzie will also start a Leela Zero process that it will communicate with. You can configure the location of Leela Zero from the config.txt file from the folder you started the java command. If Lizzie is unable to start Leela Zero it will display an error and you can fiddle with the config.txt file until you get all the paths correct.

Lizzie will provide multitude of options to load and save SGF files, run an auto analysis and configure the board. To see all the options just hold down the key x (yes, just press and hold the letter x) and you will see all the commands listed in the GUI.

lizzie's People

Contributors

aerisnju avatar alreadydone avatar apetresc avatar bittsitt avatar bvandenbon avatar c362 avatar dependabot[bot] avatar dfannius avatar duskeagle avatar featurecat avatar gjm11 avatar icespike-x avatar infinity0 avatar inohiroki avatar ivysrono avatar ka-zam avatar kaorahi avatar komu avatar kuba97531 avatar njfox avatar objt-ba avatar odcat avatar olivierblanvillain avatar parmuzinalexander avatar tfifie avatar toomasr avatar typohh avatar yi-kai avatar yzyray avatar zsalch 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  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  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

lizzie's Issues

UI proposal

ui

I think the UI of Wgo.js is quite simple yet useful enough, so it would be great if lizzie can have an interface like that. The picture above is a sample image of what it may look like.

  • A range slider to navigate through the game, with the field right next to it showing the move number, and users can also type a move number in the field.
  • The leftmost button is a menu button, which is expanded when clicked to show Load sgf/Save sgf/Toggle coordinate etc.
  • The button in the middle would be a pause/think button or whatsoever, which pauses or restart thinking.
  • And a help button, which shows the functionalities of UI elements on-screen, probably with corresponding keyboard shortcuts.

What's next: Lizzie v0.4

Hi all,

I'm glad so many of you are enjoying Lizzie. She has big dreams for the future! I'm sorry there have been some bugs / issues, but so happy to see contributions coming in (special thanks to @dfannius and @cngoodboy - I appreciate it).

I am quite busy during the week, so my development often happens during the weekend. Sorry that I can't address every issue immediately - I try to do that during the weekends. I would appreciate any help I can get! I'm anxious to incorporate all the proposed PR changes as soon as possible and fix several of the issues, based on your feedback. You can expect a release some time this weekend.

What's new in 0.4

  • most or all of the PRs will be merged. This includes variations in the sgf from @dfannius and plug-in support from @cngoodboy, as well as several bug fixes/features/customizations based on your issues. If you have a PR idea please do submit it by Saturday :)
  • Lizzie will now give you a proper error message if you are not using the correct Leela Zero binary, instead of silently failing
  • Release will include all the dlls necessary for Windows.
  • More elements of the gui will be customizable
  • Handicap game support
  • Probably Lizzie will become more useful for loading / saving the analysis.
  • Use system default look and feel for dialog boxes, instead of the Java Swing UI.

After 0.4

One of my main reasons for creating Lizzie was that I wanted an interface that automatically pairs you against an AI of equivalent level. This means that Play mode will be enhanced. You can expect:

  • Probably: play/analyze with a ladder-conscious Leela Zero. This means that a 5 kyu won't be able to beat a 5 dan network just by exploiting a ladder. This makes the rating system more stable.
  • Each network will have a self-play elo rating from zero.sjeng.org, and I will try to loosely map the elo ratings to kyu-dan system rankings.
  • By playing against the system, you will be assigned your own self-play elo rating which can be mapped to a kyu-dan ranking.
  • Play in automatch, which pairs you against a suitable opponent within ~n rating points and adjusts your rating according to the result.
  • Choose to play against a specific ranked opponent in an unranked game, with desired handicap/time settings.
  • Keep track of Leelaz's thoughts during the game, for better analysis afterward (including graphs and an overview of your mistakes, from the perspective of your opponent network and the best network). This means we will probably add support for reading Leela Zero log files.
  • Better menu system to support above features.

I hope you continue to enjoy learning and playing with Lizzie :)

Build instructions

I am not a Java programmer, but I am enough of a general programmer that if I were able to build the source I might be able to fix or at least diagnose bugs that I run into. From the existence of pom.xml I assume that I am supposed to use Maven, but just running mvn package doesn't seem to know to what sources to compile, and generates an (almost) empty target/lizzie-1.3.jar. Clearly I'm missing something simple, but I don't know enough to know what it is. Some minimal build instructions would be very useful to people like me.

Highlight next move instead of top move

I am using Lizzie primarily to analyze SGF files of games that have already been played. It would be much more useful to me if Lizzie highlighted the location of the move that was actually played in the displayed position (if any) rather than the location of its top-ranked move (which you can already see on the board from the color and stats of the suggestions). This could of course be an option if people prefer the old behavior.

Can you make a tourament mode?

So now that LeelaZero has hundreds of network and plenty of unofficial networks, people want to test one network against the other. Back in the Chess days Shredder UI even had a tourament mode where it pit engines against each other and spit out a final score etc..

Can you bring this to Lizzie so we can scedule matches and then go to sleep and wake up and get results of hundreds of games?!

Even Sabaki no has this feature.

[Question] Needed change on top of leelaz

Problem

AFAIK, unmodified leelaz did not work with lizzie. It does not show anything on screen.

Context

I want to be able spend some times learning MCTS / other tree search algorithm by modifying Leela Zero code.
I then want to use Lizzie to test modification so I can see impact of my changes (eg same network but Thomson filter instead of raw MCTS, or different pruning parameter.

Analysis

Request

Can you share a diff of your modified leelaz and upstream one ?

please add “undo” function

this gui is great,I hope it has "undo".
In the game,if my mouse point error,I need come back again.
this is a really important function.
Thanks.

2 simple ideas to make lizzie better!

  1. I like in v03 you have the variations while hovering over! Could you optionally add the following; let use map a key (say CTRL) whereby if we hold it down and then mouse over then it gives the variations, but for any legal move that has branching variations it will show the most highest winrate first, but WHILE holding down the variation key (ie CTRL) and hovered over a legal move, if there are many different variations, the user can use the scroll of the mousewheel to instatly switch between variations so it shows all the different variations per that one move and it cycles graphically through them all, all the while numbering each variations!

  2. While moused over holding down the ALT key (or let us map it) will show the NEXT move by LZ AI as if the human player already made his move at that location of holding down the ALT key and hovering over the location... this saves time when playing "what if" and so no more need to constantly "go back" or "undo" etc...

  3. a way to dynamically adjust playout # on the fly... right now once I start a game in sabaki I can't change the playout until the next game.

  4. a way to side load multiple different nets and change/switch between them dynamically in game. or even during a game!

bug?

With a little longer time(ex:30sec) to read
It takes time until the next ponder

please confirm

Option to customize threads

Currently lizzie calls leelaz.exe with "-t 2" command, is it possible to add a config file to customize this?

It's great if lizzie could load LZ's debug log

Is it possible to add a new feature to load LZ's debug log? The winrate, visit counts and variations are all listed in the debug log. So we could just read that and display it in lizzie.
It will help us analyze games more easier after a game with LZ. The opposite could send out the debug log and we could analyze it without running LZ again. And lizzie could also enable LZ's debug log. So that we could review the game multiple times without running it again.

Can't load incomplete games?

When I try to load an SGF that I recorded with SmartGo Kifu, nothing happens (although the program does not hang). Loading games from KGS works fine. My first guess is that Lizzie is not able to load games that don't have an end and a result, but I'm sure there are plenty of other differences between SGFs from the two sources that could possibly account for it.

Can't start lizzie

Windows7 64 cpu version.
When I double click on jar file nothing happens. When running through console I get:
time_left b 0 0
Leelaz process ended.
and nothing happens afterwards

board fills when ladder fails

I have noticed a couple of times that the board fills up (with vague red circles) in situations where there is for instance a ladder that doesnt work for the active player.

Could anybody explain what is going on there?

image

How do I show the heatmap?

Hi,
after installing the 0.3 release, copying leelaz and the tuning file into the folder, then starting java -jar Lizzie.jar the board shows. Things like showing move numbering or generating a new move by Leelaz work. But how do I show the heat map or any evaluation by Leelaz?

(on Linux, using lizzie0.3 release zip)

leelaz.exe can't find OpenCL.dll

Windows 10, 64 bit. Have the latest nvidia drivers installed.
When trying to launch lizzie, nothing happens. The prompt says Leelaz process ended
When trying to launch leelaz.exe directly, the error pops up: The code execution cannot proceed because OpenCL.dll was not found. Reinstalling the program may fix this problem.

Lizzie fails on start-up.

Hi, I have windows 7, and Java 8 Update 161. When I type C:\Users\Tom\Lizzie\lizzie>java -jar lizzie.jar, I get the following response:

time_left b 0 0
Using 2 thread(s).
RNG seed: 16978191442050247177
Using per-move time margin of 0.00s.
Detecting residual layers...v1...128 channels...10 blocks.
BLAS Core: Haswell
=

java.lang.NullPointerException
        at wagner.stephanie.lizzie.analysis.Leelaz.parseLine(Leelaz.java:122)
        at wagner.stephanie.lizzie.analysis.Leelaz.read(Leelaz.java:155)
        at java.lang.Thread.run(Unknown Source)

But when I type C:\Users\Tom\Lizzie\lizzie>Leelaz.exe -w network, I get

Using 8 thread(s).
RNG seed: 7445661829116835432
Leela Zero 0.13  Copyright (C) 2017-2018  Gian-Carlo Pascutto and contributors
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; see the COPYING file for details.

Detecting residual layers...v1...128 channels...10 blocks.
BLAS Core: Haswell

Passes: 0            Black (X) Prisoners: 0
Black (X) to move    White (O) Prisoners: 0

   a b c d e f g h j k l m n o p q r s t
19 . . . . . . . . . . . . . . . . . . . 19
18 . . . . . . . . . . . . . . . . . . . 18
17 . . . . . . . . . . . . . . . . . . . 17
16 . . . + . . . . . + . . . . . + . . . 16
15 . . . . . . . . . . . . . . . . . . . 15
14 . . . . . . . . . . . . . . . . . . . 14
13 . . . . . . . . . . . . . . . . . . . 13
12 . . . . . . . . . . . . . . . . . . . 12
11 . . . . . . . . . . . . . . . . . . . 11
10 . . . + . . . . . + . . . . . + . . . 10
 9 . . . . . . . . . . . . . . . . . . .  9
 8 . . . . . . . . . . . . . . . . . . .  8
 7 . . . . . . . . . . . . . . . . . . .  7
 6 . . . . . . . . . . . . . . . . . . .  6
 5 . . . . . . . . . . . . . . . . . . .  5
 4 . . . + . . . . . + . . . . . + . . .  4
 3 . . . . . . . . . . . . . . . . . . .  3
 2 . . . . . . . . . . . . . . . . . . .  2
 1 . . . . . . . . . . . . . . . . . . .  1
   a b c d e f g h j k l m n o p q r s t

Hash: 9A930BE1616C538E Ko-Hash: A14C933E7669946D

Black time: 01:00:00
White time: 01:00:00

Leela:

Can anyone help? Thanks.

Omits some moves while loading SGF file

I don't know why but when I load a sgf file to lizzie some stones are not be shown on the board.
Please check the image below.
Another image is showing same sgf file loaded by zen 7.

Please check it out...
Thanks.

20180403_145146

When using a 76M weight file, leelaz often stop and crash

When using a 76M weight file, it often takes more than 100 rounds. Suddenly, it reminds Leelaz to stop and crash. This does not happen when using a 35M size weight file. The use of 76M weight files under sabaki software will not be the case. Is it related to lelaz.exe that comes with lizzie? How to solve this problem?

linux-cpu doesn't work

Launching the cpu only version of lizzie.jar returns this error

$ java -jar lizzie.jar
./leelaz: error while loading shared libraries: libboost_program_options.so.1.58.0: cannot open shared object file: No such file or directory
Leelaz process ended.
java.io.IOException: Stream closed
at java.lang.ProcessBuilder$NullOutputStream.write(ProcessBuilder.java:433)
at java.io.OutputStream.write(OutputStream.java:116)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:141)
at wagner.stephanie.lizzie.analysis.Leelaz.sendCommand(Leelaz.java:137)
at wagner.stephanie.lizzie.analysis.Leelaz.ponder(Leelaz.java:179)

The java version in my computer:
$ java -version
openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-0ubuntu0.17.10.2-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)

Some little suggestions

  1. Add more key controls, e.g. P for pausing analysis, R for resuming analysis.

  2. The default window size is 800 x 600, I recommend something like 800 x 770, since the tittle bar on win 10 is 30px height.

  3. Make lz stop thinking after searching certain amount of visits or playouts, e.g. 2,000,000 visit. Just to make sure if anyone forget to quit the app, it won't keep running forever.

I guess All my suggestions here can be achieved in a few minutes. I really hope you can consider these.

Ask for supporting 32-Bit operating system

There is Windows 10 of 32-Bit operating system installed on my computer, so the current version can't work, could you release another version? Besides, could you add the funtion to control the time of analysis?

Y coordinate labeling is opposite of convention

While Go unfortunately does not have a totally standard coordinate system like chess does, it is conventional for the rows to be numbered 1-19 from the bottom to the top rather than from the top to the bottom. KGS, OGS, Crazy Stone, Leela all do it that way, for example.

Nullpointer exception on startup

Hi!

I've had a look at the screenshots and am very keen to try out the GUI.
But, when trying to start Lizzie 0.3, I only get the following output:

time_left b 0 0
Using 2 thread(s).
RNG seed: 13477237188667865876
Using per-move time margin of 0.00s.
Detecting residual layers...v1...128 channels...10 blocks.
BLAS Core: Haswell
= 

java.lang.NullPointerException
	at wagner.stephanie.lizzie.analysis.Leelaz.parseLine(Leelaz.java:122)
	at wagner.stephanie.lizzie.analysis.Leelaz.read(Leelaz.java:155)
	at java.base/java.lang.Thread.run(Unknown Source)

This is on Ubuntu 16.04, no GPU running (I've disable OPENCL via compile flag in leelaz). I've tried with different Java versions (OpenJdk 8, 9, Oracle JRE 10), always resulting in the same NullPointerException. Customized Leelaz in textmode runs fine.

Which makes Leela Stronger?

Is Leela stronger when you just run analyze or when you press enter and face leela zero itself with certain thread and time settings?... because I changed the thread default from 2 to 8 and I am not sure if I see much of a difference when i let it analyze a move/s (without leela itself playing but me clicking moves to continue on to the next move to analyze ).... but I am wondering if it effect leela when leela itself is playing me instead of just analyzing moves without playing by itself.

improvement proposal of the next version

Next version,we hope increasing the following function key

  1. Only analysis black or analysis white ; and you can edit the situation, freedom in any situation,
    2/ at anytime could set black go or set white to go freely. and display black or white win rate (set to black to go or wihite to go )
    3, display best move : recommend the best with the red circle instead of yellow color is more clearly ,easey to find
    4/ open sgf file and save as sgf file funtion key
    5/ pass funtion: play pass at anytime freely
    6/ komi :set komi freely

Lizzie does not seem to support no-GPU version?

Hello.

I'm using CPU-only leelaz, and have my tuning file set as:

0;XgemmBatched;128;100;128;16; -DKWG=32 -DKWI=2 -DMDIMA=32 -DMDIMC=32 -DMWG=32 -DNDIMB=8 -DNDIMC=8 -DNWG=64 -DSA=0 -DSB=0 -DSTRM=0 -DSTRN=0 -DVWM=1 -DVWN=4;OpenCL: Intel(R) Corporation Intel(R) Core(TM) i5-6400 CPU @ 2.70GHz @ 2700MHz

But Lizzie starts the tuning process from scratch trying to overwrite it with another values. Is it possible to make CPU-only version work?

What's wrong with gpu?

I downloaded cpu.zip and the change in settings with gpu doesnt work, I only have one gpu and tried the [0,1] in so many ways under the leela settings and it juust doesnt work if i change it from [] } ... to ... [0,1] ] Lizzie won't even load up..... pls help I am trying to see how strong it can be with 8 cpu and 1 gpu.... I've even read another on another issue that it doesnt work on gpu.zip ( and if it does now and I can only use gpu on gpu.zip pls let me know )

memory overflow???

That lizzie, after a long time running, finally, the machine can not run, and even crash, collapse
Some people say this is memory overflow!

leelazero has the same problem if run it without noponder.

so ,could you add noponder mennu command?

add score

There's something I want to ask you
Add the score in the next version
key is "E"
please

Dependence Problem and Bug on Archlinux

I ran lizzie on my Archlinux, but it responsed

./leelaz: error while loading shared libraries: libboost_program_options.so.1.58.0: cannot open shared object file: No such file or directory
Leelaz process ended.

However, unlike the situation on ubuntu, there is no package libboost_program_options on Archlinux.

I tried to replace your leelaz file with that generated on my Archlinux, then lizzie was successfully launched but with some bugs:

the game trees and winning rates did not appear correctly near the board but in my terminal instead...

Features for Game Record Analysis

Lizzie 0.3 is great. I am super impressed. But my absolute top No. 1 use case is the analysis of games loaded from SGF files and I think that a few very minor improvements could make Lizzie 10 times better for that purpose.

When you are looking at a node which there ARE existing children in the SGF file, you currently have to press next and then back so that you know what the original players played or considered because Lizzie only draws Leela's ideas. This is sub-optimal but sometimes sufficient but, if the next move(s) are not part of Leela's top suggestions, you get no information about it/them. So...

  1. It would be cool if you give an indication not only of what Leela is thinking about but also the existing child nodes in the SGF and, if one of Leela's top moves is an existing child, mark it in some way.
  2. It would be nice if you include the existing children and Leela's valuation of those moves if they existing in the SGF even if Leela doesn't consider them to be good or worth considering.

Finally, there's little reason to analyze a game that's over so, by default, loaded SGF files should start at move 1, not at the end.

On a side note, the readme/docs could use some explanation of the numbers and colouring scheme for Leela's moves.

Carry on. This is looking grand.

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.