Skip to content

CrazyAra 0.8.0

Compare
Choose a tag to compare
@QueensGambit QueensGambit released this 16 May 21:19
· 547 commits to master since this release
c7e35a4

Notes

This release provides new features and addresses the main issues from release 0.7.0.
It is expected to be the last release which only supports crazyhouse.
Model-OS-96, the final model after ~ 2.37 million self-play games from release 0.7.0, is included in all release packages.

TensorRT backend

CrazyAra's default GPU backend is now a native TensorRT backend without MXNet library dependency.
The networks are loaded in the ONNX format.

Multi-GPU support

CrazyAra now supports multiple GPUs for the same MCTS search.
The first GPU is defined by the GPU index First_Device_ID and the last GPU index by Last_Device_ID.
The Threads parameters defines the number of threads to use for each GPU.

Low precision inference

CrazyAra now allows float16 and int8 inference besides float32. The active precision can be set by the UCI-option Precision. Float16 is the new default precision and greatly accelerates search for NVIDIA RTX cards (~2.2x speed increase).

Int8 precision is still experimental and increases speed for older GPUs by about 2.5x at the cost of losing precision. Before creating the TensorRT engine files, the network will be automatically calibrated.
Higher nps is primarily beneficial for low time control, e.g. TC: 30s + 0.1s:

Score of CrazyAra-0.8.0-INT8-GTX1080ti vs CrazyAra-0.8.0-FP16-GTX1080ti: 72 - 17 - 11 [0.775]
Elo difference: 214.8 +/- 77.1, LOS: 100.0 %, DrawRatio: 11.0 %

100 of 100 games finished.

Start-up time

The first start-up time of CrazyAra can take several minutes to generate the trt hardware specific engine files.
All later start-ups should be fast e.g. < 3s. The TensorRT files are stored in the Model_Directory.

Memory consumption

Reduced memory consumption of the search tree by 90%.

Example: Generation of 1.5 million nodes:

CrazyAra 0.7.0 memory consumption:

  • 12.8 GiB total memory:
    • 1.5 GiB constant memory (MXNet GPU backend)
    • 11.3 GiB tree memory

CrazyAra 0.8.0 memory consumption:

  • 2.7 GiB total memory:
    • 1.1 GiB constant memory (TensorRT backend)
    • 1.6 GiB tree memory

Time manager

The time management was improved to stop searches early if large parts of the tree were reused and is extended for positions with a falling evaluation.

MCTS solver

CrazyAra can now calculate forced mates and tries to choose the shortest line to mate or longest line for getting mated.
The algorithm is an extended version of:

Improved UCI interface

  • The logging of the evaluation information is now performed asynchronously.

  • The commands go infinite, stop and quit are now supported.

  • Every second the current evaluation information is displayed which can be stopped at any point via stop.

  • The root command now displays the eval information in a more structured way.

  • selDepth information is now displayed to show the maximum reached depth in the current search.

  • Terminal node visits are now counted separately and not counted as nodes anymore.

Random root exploration

A new UCI Option Random_Playout was added which explores randomly direct child nodes of the root for 5% of all visits (default: on). This technique helps to detect lines which may look unattractive at first sight.

Tablebase support

CrazyAra now supports Syzygy tablebases which may later be used for chess, anti-chess and atomic.

Asnychronous freeing of memory

The memory of the previous search tree is now asynchronously deallocated which can save up to 1-5s for long time control settings.

Full OS support

The C++ version of CrazyAra now runs on all major operating systems: Linux (GPU+CPU), Windows (GPU+CPU) and Mac-OS (CPU only).

Known issues

  • The first start-up time of the engine may take some minutes to generate the trt-engine files.
  • The available batch sizes are limited to the provided onnx models. Current available batch-sizes are:
    • 1
    • 8
    • 16
    • 64

Regression test

Conductor: Matuiss2
TC: 3min +2s
OS: Windows
GPU: GTX 1070ti
Model: Model-OS-96
Opening suite: zh-equal-long-81.pgn (with 3 openings removed)

Score of CrazyAra 0.8.0 vs CrazyAra 0.7.0: 72 - 21 - 7 [0.245]
Elo difference: +195.51 +/- 77.45

Inference libraries

The following inference libraries are used in each package:

  • CrazyAra_0.8.0_Linux_TensorRT.zip
    • CUDA 10.2
    • cuDNN 7.6.5
    • TensorRT-7.0.0.11
  • CrazyAra_0.8.0_Linux_MKL.zip
    • Intel MKL 20190502
  • CrazyAra_0.8.0_Win_TensorRT.zip
    • CUDA 10.2
    • cuDNN 7.6.5
    • TensorRT-7.0.0.11
  • CrazyAra_0.8.0_Win_MKL.zip
    • Intel MKL 20190502
  • CrazyAra_0.8.0_Mac_CPU.zip
    • Apple Accelerate