GithubHelp home page GithubHelp logo

kata's Introduction

KataHex

KataHex is a Hex engine that is based on Katago. See the original KataGo README for a general information on how it works.

You can find KataHex in the Hex2022 branch of this repository. It was created by HZY ([email protected]). Peter Selinger ([email protected]) has made further modifications to make KataHex more compatible with HexGUI.

Results and conclusions

Some results and conclusions about opening move win rates are here: https://zhuanlan.zhihu.com/p/476464087

Building

The following works on Ubuntu 20.04, and probably in other Linuxes too:

If you don't have a GPU, make sure the Eigen library is installed:

apt install libeigen3-dev

If you do have a GPU, you can use another one of the other GPU backends below: -DUSE_BACKEND=CUDA, -DUSE_BACKEND=TENSORRT, or -DUSE_BACKEND=OPENCL.

mkdir build
cd build
cmake -DUSE_BACKEND=EIGEN ../cpp
make -j4

By default, the maximum board size is 13x13. To specify a larger maximum board size, add something like -DMAX_BOARD_LEN=19 to the cmake call.

For Windows, pre-built KataHex executables are available on the Releases page.

Running

If you would just like to run KataHex (as opposed to training it yourself), you need both a configuration file and a pre-trained neural network model.

A sample configuration file is config.cfg, included in this repository. Use it as it is, or modify it for your purposes.

You can find a pre-trained neural network model here:

katahex_model_20220618.bin.gz

This neural network can play 19x19 or smaller.

You can run KataHex like this, except using the path to your own config file and model:

katahex gtp -config config.cfg -model model.bin.gz

In this mode, KataHex speaks the GTP protocol. It's possible to interact with it directly, although you may prefer to use a graphical user interface such as HexGUI.

Integration with HexGUI

For integration with HexGUI or other graphical frontends, it is most convenient to modify katahex-launcher.sh with the correct paths to katahex, the configuration file, and the model. Then under HexGUI โ†’ Program โ†’ New Program, add "KataHex" as the name and the path to katahex-launcher.sh as the command.

After connecting KataHex to HexGUI, you can access KataHex analysis by using the calculator icon on the main menu bar or pressing "s" (for "solve").

Note that KataHex is often very slow; making a single move seems to take several seconds. If the UI seems to be stuck for a long time, just wait.

kata's People

Contributors

lightvector avatar hzyhhzy avatar selinger avatar lpuchallafiore avatar bernds avatar tfifie avatar tychota avatar featurecat avatar dwt avatar bannerets avatar iopq avatar yenw 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.