Skip to content
Switch branches/tags
Go to file

Latest commit

* set --trainer back to False by default
* changed to CamelCase Notation for js-file
* use constructor initialization list

Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Build Status License: GPL v3   Codacy Badge ArXiv Badge Thesis Badge Journal Badge



CrazyAra is an open-source neural network chess variant engine, initially developed in pure python by Johannes Czech, Moritz Willig and Alena Beyer in 2018. It started as a semester project at the TU Darmstadt with the goal to train a neural network to play the chess variant crazyhouse via supervised learning on human data. The project was part of the course "Deep Learning: Architectures & Methods" held by Kristian Kersting, Johannes Fürnkranz et al. in summer 2018.

The development was continued and the engine ported to C++ by Johannes Czech. In the course of a master thesis supervised by Karl Stelzner and Kristian Kersting, the engine learned crazyhouse in a reinforcement learning setting and was trained on other chess variants including chess960, King of the Hill and Three-Check.

The project is mainly inspired by the techniques described in the Alpha-(Go)-Zero papers by David Silver, Thomas Hubert, Julian Schrittwieser, Ioannis Antonoglou, Matthew Lai, Arthur Guez, Marc Lanctot, Laurent Sifre, Dharshan Kumaran, Thore Graepel, Timothy Lillicrap, Karen Simonyan, Demis Hassabis.

The training scripts, preprocessing and neural network definition source files are written in python and located at DeepCrazyhouse/src. There are two version of the search engine available: The initial version is written in python and located at DeepCrazyhouse/src/domain/agent. The newer version is written in C++ and located at engine/src.

CrazyAra is an UCI chess engine and requires a GUI (e.g. Cute Chess, XBoard, WinBoard) for convinient usage.




We provide binary releases for the following plattforms:

Operating System Backend Compatible with
Linux CUDA 10.2, cuDNN 7.6.5, TensorRT- NVIDIA GPUs
Linux Intel MKL 20190502 Intel CPUs
Windows CUDA 10.2, cuDNN 7.6.5, TensorRT- NVIDIA GPUs
Windows Intel MKL 20190502 Intel CPUs
Mac Apple Accelerate Mac-Books

The current CrazyAra release and all its previous versions can also be found at releases.


The extracted model should be placed in the same directory as the engine executable. The directory can be changed by adjusting the UCI-parameter Model_Directory. Model-0S-96 is included in release 0.8.0.

The following models are available for download:

Release 0.7.0

For release 0.7.0, a pre-initialized model on human games was updated by applying reinforcement learning.

The 45th model update was obtained after generating ~ 1.05 million self-play games. It was also used for the 100 evaluation games with Multi-Variant-Stockfish:

The reinforcement learning loop was then continued until a total of ~ 2.37 million self-play games, resulting in the 96th model update:

Release 0.6.0

For release 0.6.0 and all previous releases, models were solely based on supervised learning on the data set as described in our paper.

More information about the different models can be found in the wiki.


The current list of available chess variants include:


For more details about the initial python version visit the wiki pages:


Instructions can be found in the wiki.


The playing strength of CrazyAra has been evaluated over the course of development.

Playing strength of CrazyAra 0.3.1

CrazyAra 0.3.1 played multiple world champion Justin Tan (LM JannLee) at 18:00 GMT on 21st December in five official matches and won 4-1. You can find a detailed report about the past event published by okei here:

CrazyAra 0.3.1 was also put to the test against known crazyhouse engines:

Playing strength of CrazyAra 0.5.0

Matuiss2 generated 25 games (Intel i5 8600k, 5GHz) between CrazyAra 0.3.1 and CrazyAra 0.5.0:

[TimeControl "40/300"]
Score of CrazyAra 0.5.0 vs CrazyAra 0.3.1: 22 - 3 - 0 [0.88]
Elo difference: 346 +/- NaN

25 of 25 games finished.

Playing strength of CrazyAra 0.6.0

CrazyAra 0.6.0 is the first C++ release and has been evaluated in our paper (section 11 Experimental Evaluation).


These libraries are used in the python version:

  • python-chess: A pure Python chess library
  • MXNet: A flexible and efficient library for deep learning
  • numpy: The fundamental package for scientific computing with Python
  • Zarr: An implementation of chunked, compressed, N-dimensional arrays

The following libraries are used to run the C++ version of CrazyAra:

  • Multi Variant Stockfish: Stockfish fork specialized to play chess and some chess variants
    • Used for move generation and board representation as a replacement for python-chess.
  • MXNet C++ Package: A flexible and efficient library for deep learning
    • Used as the deep learning backend for loading and inference of the trained neural network
  • Blaze: An open-source, high-performance C++ math library for dense and sparse arithmetic
    • Used for arithmetic, numerical vector operation within the MCTS search as a replacement for NumPy
  • Catch2: A multi-paradigm test framework for C++

When CrazyAra is also built with reinforcement learning functionality the following libraries are used:

  • z5: Lighweight C++ and Python interface for datasets in zarr and N5 format
    • Used for exporting generated self-play data in C++ in the Zarr data format
  • xtensor: C++ tensors with broadcasting and lazy computing
    • Used as the internal matrix format within z5


CrazyAra's knowledge in the game of crazhyouse for supervised neural networks is based on human played games of the database.

The most active players which influenced the play-style of CrazyAra the most are:

  1. mathace
  2. ciw
  3. retardedplatypus123
  4. xuanet
  5. dovijanic
  6. KyleLegion
  7. LM JannLee
  8. crosky
  9. mariorton
  10. IM opperwezen

Please have a look at Supervised training or our paper for more detailed information.


Similar open source neural network chess projects are listed below:


In CrazyAra v.0.1.0 the Monte-Carlo-Tree-Search (MCTS) was imported and adapted from the following project:

For CrazyAra v.0.2.0 the MCTS was rewritten from scratch adding new functionality:

  • Reusing the old search tree for future positions
  • Node and child-nodes structure using numpy-arrays
  • Always using mate-in-one connection if possible in the current search tree

SixtyFour crazyhouse engine

Leela-Chess-Zero chess engine

Allie(Stein) chess engine

Scorpio chess engine


The following is a collection of useful research links

AlphaGo Zero paper:

Journal Nature:

CrazyAra paper:

SixtyFour engine paper:

Hyper-Parameter Sweep on AlphaZero General:

DeepMind Blogpost:

How AlphaGo Zero works - Google DeepMind

Deep Mind's AlphaGo Zero - EXPLAINED

A Simple Alpha(Go) Zero Tutorial

AlphaGo Zero - How and Why it Works:

Simple Chess AI implementation


CrazyAra is free software, and distributed under the terms of the GNU General Public License version 3 (GPL v3). The source-code including all project files is licensed under the GPLv3-License if not stated otherwise.

For details about the GPL v3 license, refer to the file LICENSE.


  • J. Czech, M. Willig, A. Beyer, K. Kersting and J. Fürnkranz: Learning to play the Chess Variant Crazyhouse above World Champion Level with Deep Neural Networks and Human Data, link
	 AUTHOR={Czech, Johannes and Willig, Moritz and Beyer, Alena and Kersting, Kristian and Fürnkranz, Johannes},   
	 TITLE={Learning to Play the Chess Variant Crazyhouse Above World Champion Level With Deep Neural Networks and Human Data},      
	 JOURNAL={Frontiers in Artificial Intelligence},      
	 ABSTRACT={Deep neural networks have been successfully applied in learning the board games Go, chess, and shogi without prior knowledge by making use of reinforcement learning. Although starting from zero knowledge has been shown to yield impressive results, it is associated with high computationally costs especially for complex games. With this paper, we present CrazyAra which is a neural network based engine solely trained in supervised manner for the chess variant crazyhouse. Crazyhouse is a game with a higher branching factor than chess and there is only limited data of lower quality available compared to AlphaGo. Therefore, we focus on improving efficiency in multiple aspects while relying on low computational resources. These improvements include modifications in the neural network design and training configuration, the introduction of a data normalization step and a more sample efficient Monte-Carlo tree search which has a lower chance to blunder. After training on 569537 human games for 1.5 days we achieve a move prediction accuracy of 60.4%. During development, versions of CrazyAra played professional human players. Most notably, CrazyAra achieved a four to one win over 2017 crazyhouse world champion Justin Tan (aka LM Jann Lee) who is more than 400 Elo higher rated compared to the average player in our training set. Furthermore, we test the playing strength of CrazyAra on CPU against all participants of the second Crazyhouse Computer Championships 2017, winning against twelve of the thirteen participants. Finally, for CrazyAraFish we continue training our model on generated engine games. In 10 long-time control matches playing Stockfish 10, CrazyAraFish wins three games and draws one out of 10 matches.}
  • J. Czech: Deep Reinforcement Learning for Crazyhouse, pdf
	       title = { Deep Reinforcement Learning for Crazyhouse },
	       author = { Johannes Czech },
               year = { 2019 },
               type = { M.Sc. },
	       crossref = { },
	       school = { TU Darmstadt },
	       pages = { 54 },
	       month = { dec }