Skip to content
Martin Poiroux
Language : Français
Projects · CodeCode · Chess engines · 2026

chess-net

A second chess engine, written in Rust, whose evaluation is a learned network. The opposite approach to the first one, whose evaluation is written by hand.

Writing a second engine is only worthwhile if it is not the first one done better. This one takes the problem from the other end: where opti_chess evaluates a position with hand-written, readable terms, this one evaluates it with a trained network, first supervised, then against itself.

A real forward pass, on a small network with random weights: the position goes in on the left, the evaluation comes out on the right. Click for another position.

The goal is not a gain in strength, but two independent answers to the same problem, on a game known well enough to judge which one is wrong and where. Rust came with it, because an engine is the kind of program where the absence of a garbage collector is felt.

The classical part is finished and verified: bitboards, magic move generation, zobrist, principal variation search with transposition table, killers, history, null move and quiescence, all driven over UCI. A chess engine has the courtesy of being testable: the perft suite, from the starting position to kiwipete, is green, which establishes that move generation is correct and not merely plausible.

The learned part exists on both sides: a custom binary network format, read by the Rust inference and written by the Python training tooling, with the hard constraint that the feature encoders be identical in both languages. A single-index offset breaks nothing, it simply makes the network silently wrong. Both training paths are written, supervised on labelled positions and self-play with a Monte Carlo search; a few cycles have run and left their checkpoints.

What is missing is the one thing that would make this page conclusive: the match against opti_chess. It has not happened, and until it does, this repository is an architecture that holds, not an answer to the question it asks.

Private project, no public link