Skip to content

rafid-dev/rice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rice logo by Midjourney

strong, free and open source UCI chess engine written in C++.

Overview

Rice is a powerful NNUE chess engine that combines the use of alpha-beta search with various other search techniques to achieve its impressive performance.

Features

Board Representation

  • Bitboards
  • Fancy magics for movegen

Search

  • Negamax
  • Alpha beta pruning
  • Quiescence search
  • Null move pruning (NMP)
  • Static null move pruning aka Reverse Futility Pruning
  • PVS (Principal Variation Search)
  • ZWS (Zero Window Search)
  • LMR (Late Move Reduction)
  • SEE Pruning (Static Exchange Evaluation Pruning)
  • Movecount Pruning/LMP (Late Move Pruning)
  • Transposition Table cutoffs and move ordering
  • History, killers and MVVLVA Move ordering
  • Search Extensions

Evaluation

  • NNUE (Efficiently updateable neural network)
  • Net Architecture: 16 king buckets horizontally mirrored, no output buckets (12 * 64 * 16 -> 512)x2->1
  • NNUE Trainer: Grapheus by Luecx
  • Old trainer: marlinflow

Building

Default build (g++):

git clone https://github.com/rafid-dev/rice
cd rice/src
make 
./Rice

Clang build:

git clone https://github.com/rafid-dev/rice
cd rice/src
make CXX=clang++
./Rice

Usage

The Universal Chess Interface (UCI) is a standard protocol used to communicate with a chess engine, and is the recommended way to do so for typical graphical user interfaces (GUI) or chess tools. Rice requires a UCI-compatible graphical user interface in order to be used with the protocol.

NNUE Background

From 5.0, Rice has switched to NNUE from its handcrafted evaluation.

When I lack the hardware resources to generate enough training data, I need to use data generated by external engines. However, I think it's important to be transparent about the use of these engines and where the training data comes from.

Rice 5.0 has used data generated by Viridithas, a strong chess engine by Cosmo.

Leela Chess Zero by the Lc0 Team

LC0 employs a novel method for playing high-level chess by utilizing MCTS and acquiring its chess knowledge through self-play. As Rice 6.0 and onwards utilizes data from LC0, it is worth noting that this data is licensed under the Open Database License, which promotes the sharing and reuse of data while maintaining legal protection for contributors and users.

Special thanks to:

Acknowledgements: