Giter VIP home page Giter VIP logo

nnue-pytorch's Introduction

Setup

Software prerequisites

Python

If using easy_train.py then at least 3.7 is required.

Otherwise versions around 3.6 should also work, but updating is recommended.

Python 3.11 was also tested and works well.

A C++ compiler

If you're using easy_train.py then at least GCC 9.2 is required for compiling the data loader, Stockfish, and c-chess-cli. This a defensive version requirement as older versions were known to cause problems with Stockfish.

If you're not using easy_train.py then no automatic compilation will take place; use what you wish.

If you're on Windows the best way is to probably use MSYS2. It would also make it easy to install Make (next step).

Make

For compiling Stockfish and c-chess-cli. Not strictly necessary if you're not using easy_train.py, but recommended.

CMake

Necessary for compiling the data loader.

https://cmake.org/install/

Package dependencies

python -m venv trainer
pip install -r requirements.txt

PyTorch with CUDA 11.8 will be automatically installed, along with the matching CuPy version.

The data loader (if not using easy_train.py)

This requires a C++17 compiler and cmake.

Windows:

compile_data_loader.bat

Linux/Mac:

sh compile_data_loader.bat

Network training and management

Hard way: wiki

Easier way: wiki

Logging

TODO: Move to wiki. Add setup for easy_train.py

tensorboard --logdir=logs

Then, go to http://localhost:6006/

Automatically run matches to determine the best net generated by a (running) training

TODO: Move to wiki

python run_games.py --concurrency 16 --stockfish_exe ./stockfish.master --c_chess_exe ./c-chess-cli --ordo_exe ./ordo --book_file_name ./noob_3moves.epd run96

Automatically converts all .ckpt found under run96 to .nnue and runs games to find the best net. Games are played using c-chess-cli and nets are ranked using ordo. This script runs in a loop, and will monitor the directory for new checkpoints. Can be run in parallel with the training, if idle cores are available.

Thanks

nnue-pytorch's People

Contributors

cakiki avatar cglemon avatar cj5716 avatar ddobbelaere avatar dhbloo avatar disservin avatar fauziakram avatar glinscott avatar kennyfrc avatar linrock avatar naphthalin avatar niklasf avatar nodchip avatar nomoras avatar sergiovieri avatar sopel97 avatar tomalard avatar uniqp avatar vondele avatar xu-shawn 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.