Skip to content

About

A chess engine written in Rust using a NNUE and with UCI support.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

WizardBot Engine

A chess engine written in Rust, built for WebAssembly (WASM) and native binaries. It uses a neural network evaluation (NNUE) and supports standard UCI protocol commands.

What is this?

This is a chess engine that can run in a browser (via WebAssembly) or as a native binary. It communicates using the UCI (Universal Chess Interface) protocol, which means it can work with chess GUIs and platforms that support UCI engines.

Quick Start

Native Binary (Server / Multi-core)

Requires Rust and a C compiler.

# Build the native binary with threading support
cargo build --release --features parallel-search --bin uci_binary --jobs 24

# Run it
./target/release/uci_binary

Then send UCI commands via stdin, for example:

uci
isready
position startpos
go movetime 8000
quit

WebAssembly (Browser / WASM Build)

The WASM build is what runs in browsers. It uses single-threaded execution (WASM does not support multi-threading in this setup) and embeds the NNUE model directly.

# Build WASM output
bash build_wasm.sh

This creates dist/ with the deployable files and pkg/ with the WASM module.

Features

  • NNUE evaluation: Uses a neural network (nn-5af11540bbfe.nnue, CC0 license) for position evaluation.
  • UCI protocol: Supports uci, isready, position, go, stop, quit, and time/movetime controls.
  • Opening book: Uses openings.js for book moves in the opening phase.
  • Threading (native only): The parallel-search feature enables Rayon-based multi-core root search, but requires the native binary (uci_binary), not the WASM build.

License

This project is licensed under the GNU General Public License version 2 (GPLv2). See LICENSE for details.

The neural network weights (nn-5af11540bbfe.nnue) are released by Fishtest, Stockfishs training website, licensed under CC0. They are in the SF_16 format.

Project Structure

  • src/ — Rust source code (engine logic, search, evaluation, move generation)
  • pkg/ — WASM output (generated by build_wasm.sh)
  • dist/ — Deployable WASM bundle (generated)
  • openings.js — Opening book data (JSON format inside a JS file)
  • build_wasm.sh — Script to compile and package the WASM build
  • build_server.sh — Script to compile the native server binary

About

A chess engine written in Rust using a NNUE and with UCI support.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages