Skip to content

xiaoxiae/Prokopakop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prokopakop Logo Prokopakop

A moderately fast UCI chess engine written in Rust that kops the Prokop.

Challenge it on Lichess! and read a blog post on how it was written

Bot

Move Generation

Search

Evaluation

Uses a self-trained NNUE (transitioned at commit b0cf0c1); initially trained on a hand-crafted eval that used

Usage

Run

cargo run --release

Prokopakop implements most of the UCI (Universal Chess Interface) protocol for integration with chess GUIs:

uci                              # Initialize UCI mode
isready                          # Check engine readiness
ucinewgame                       # Start new game
position startpos                # Set starting position
position startpos moves <moves>  # Set position with moves
position fen <FEN>               # Set position from FEN
setoption name <id> value <val>  # Set engine options
go perft <depth>                 # Run perft test
go <params>                      # Search with various parameters
stop                             # Stop current search
quit                             # Exit engine

and also some special commands that are not UCI-compliant, but I'm a rebel:

eval                             # Show position evaluation
joke                             # Tells a random joke... just be careful to not ask for too many

Command Line Options

UCI Chess Engine, made to kop the Prokop

Usage: prokopakop [OPTIONS]

Options:
      --magic                  Generate magic bitboards
      --training               Generate NNUE training data through self-play
  -g, --games <NUM>            Number of games to play (default: 32) [default: 32]
  -d, --depth <DEPTH>          Fixed search depth per move (default: 8) [default: 8]
  -o, --output <FILE>          Output file for training data (default: data/selfplay.txt) [default: data/selfplay.txt]
      --start-moves-min <NUM>  Minimum number of random starting moves (default: 1) [default: 1]
      --start-moves-max <NUM>  Maximum number of random starting moves (default: 6) [default: 6]
  -h, --help                   Print help
  -V, --version                Print version

NNUE Training

The train/ directory contains an NNUE neural network trainer (using bullet) for improving the engine's evaluation function.

Prokopakop's NNUE trainer + utilities

Usage: train <COMMAND>

Commands:
  train        Run hyperparameter optimization training
  deduplicate  Deduplicate FEN positions from a file
  convert      Convert text FEN to binary format
  help         Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help

Training Workflow

  1. Generate Training Data: Use prokopakop --training to play self-play games and generate positions with game outcomes
  2. Process Data: Use the trainer utility to convert data to binary format (see --help)
  3. Train the Network: Create an experiment-<NAME> folder, copy train/example-config.toml to experiment-<NAME>/config.toml, add data created in steps 1-2 to experiment-<NAME>/data.bin, and run train <experiment folder name> to train

Resources

About

A moderately fast chess engine written in Rust that kops the Prokop.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages