#chess-engine #data-format #monte-carlo-tree-search #validation #monty

bin+lib montyformat

Chess implementation & compressed data formats for Monty

4 releases

0.10.0 Oct 2, 2025
0.9.2 Aug 23, 2025
0.9.1 Aug 21, 2025
0.9.0 Apr 3, 2025

#295 in Game dev

Download history 318/week @ 2025-10-15 131/week @ 2025-10-22 116/week @ 2025-10-29 86/week @ 2025-11-05 350/week @ 2025-11-12 374/week @ 2025-11-19 304/week @ 2025-11-26 654/week @ 2025-12-03 274/week @ 2025-12-10 476/week @ 2025-12-17 255/week @ 2025-12-24 245/week @ 2025-12-31 216/week @ 2026-01-07 422/week @ 2026-01-14 205/week @ 2026-01-21 328/week @ 2026-01-28

1,179 downloads per month

AGPL-3.0

59KB
1.5K SLoC

Monty

"MCTS is cool."

Compiling

To compile, run make. The required networks will be downloaded automatically (and validated). This requires make and a recent enough rust version (see the MSRV) installed via rustup (the official way).

Analysis

Monty is the state-of-the-art engine for CPU-based contempt analysis. Its contempt parameter is calibrated to represent the effective rating difference between us and the opponent, and it has been validated across a wide range from –1000 Elo (us being weaker) to +1000 Elo (us being stronger).

When using contempt in analysis, it is crucial the Contempt_Analysis flag is set to true. Below is an example in the En Croissant GUI:

Development & Project Structure

Testing

Development of Monty is facilitated by montytest. Functional patches are required to pass on montytest, with an STC followed by an LTC test. Nonfunctional patches may be required to pass non-regression test(s) if there are any concerns.

Source Code

The main engine code is found in src/, containing all the search code and network inference code.

There are a number of other crates found in crates/:

  • montyformat
    • Core chess implementation
    • Policy/value data formats
    • All other crates depend on this
  • datagen
    • Intended to be ran on montytest, there is no need to run it locally (unless testing changes)
  • train-value
  • train-policy
    • Uses bullet & extends it with custom operations

Terms of use

Monty is free and distributed under the GNU Affero General Public License (AGPL v3). Essentially, this means you are free to do almost exactly what you want with the program, including distributing it among your friends, making it available for download from your website, selling it (either by itself or as part of some bigger software package), or using it as the starting point for a software project of your own.

The only real limitation is that whenever you distribute Monty in some way, including distribution over a network (such as providing access to Monty via a web application or service), you MUST always include the license and the full source code (or a pointer to where the source code can be found) to generate the exact binary you are distributing. If you make any changes to the source code, these changes must also be made available under AGPL v3.

No runtime deps