Giter Club home page Giter Club logo

leelawatcher's Introduction

LeelaWatcher

A GUI for watching Leela Zero self train

Please note that this is a fairly quick hack, and I resurected code I wrote 15 years ago when I first learned java, so there's a bunch of warts in the code, but with that caveat LeelaWatcher provides the following features:

  1. Executes Leela Zero's autogtp cooperative training mode
  2. Parses the standard output from the training sesion to extract the moves
  3. Displays the moves on a graphical board
  4. When the game ends, writes it out to an SGF file named for the timestamp of when the game ended.

Running

Before you can use the LeelaWatcher you must first obtain a current copy of Leela Zero and the autogtp program that comes with it. Instructions can be found on the Leela Zero site.

You will also need to install the Java Runtime Environment

After you have Java, Leela Zero and autogtp, you can run the latest version of LeelaWatcher (found here)

On Linux (what I use) the command looks like this

java -jar LeelaWatcher-1.1.0.jar /home/gus/leelaz/leela-zero/autogtp/

Mac should be similar. For those not familiar with java, what that line does is it invokes java and instructs it to run the code found in LeelaWatcher.jar. Everything after LeelaWatcher.jar is passed to the program as arguments

Two arguments are possible, the first one is the location where LeelaWatcher will search for the autogtp program, the second is optional, but if supplied it will be interpreted as the name of the autogtp program file (the compiled executable that you created when you built auto gtp). This second argument is usually only needed on Windows.

Here's a Windows example, that assumes that your autogtp is in a folder named D:\My Folders\Downloads\leela-zero-0.4-window :

C:>java -jar LeelaWatcher-1.1.0.jar D:\My Folders\Downloads\leela-zero-0.4-windows autogtp.exe

or alternately

C:> cd D:\My Folders\Downloads\leela-zero-0.4-windows
D:\My Folders\Downloads\leela-zero-0.4-windows>java -jar LeelaWatcher-1.1.0.jar . autogtp.exe

Note that the '.' in the second example is a symbol that means "the current directory." Also if I've messed up the Windows example let me know by filing an issue with an example of the corrected command line(s). I don't use Windows very much, and haven't actually run my program there.

Additional command line options can be seen by passing --help or -h

java -jar ~/projects/LeelaWatcher/LeelaWatcher/build/libs/LeelaWatcher-1.1.0.jar --help 

Start a LeelaWatcher instance. A prefix of java -jar is presumed for all
usage below. <dir> specifies where to find autogtp and <cmd> allows
overide of default './autogtp' command (windows users need to specify
an exe for example)

Usage:
 LeelaWatcher-1.1.0-SNAPSHOT.jar [--help] [options] <dir> [<cmd>]

Options:
  --no-sgf        Don't save an sgf file for each game
  --board-only    Don't show output window and other diagnostic features.
  --help -h       Print detailed help message

leelawatcher's People

Contributors

fsparv avatar barrybecker4 avatar ihavnoid avatar felixbrendel avatar

Watchers

Xusheng Li avatar  avatar

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.