Astimate4.cpp: Source code of Astimate4 in ANSI c
Astimate4.h: Header file with constant definitions required for compiling Astimate4.cpp
Astimate4.tre: Opening book containing around 400k positions (~ 3 MB)
Astimate4.nnue: NNUE-network (halfka_v2) (~ 47 MB)
Astimate4.wdl: All 3-4-5-men Syzygy endgame tablebases (win/draw/loss information only) (~ 392 MB)
Note: header file, opening book, nnue network and Syzygy wdl files are only required when compiling the source code on your own. At compile time, header constants, opening book, nnue network and tablebases are integrated in the executable so that in the engines-directory (e.g. of the Arena GUI) only the executable is required. The opening book detects move transpositions. If a halfka_v2 NNUE network other than the integrated one should be used, that network should be named network.nnue and be present in the same directory as the executable.
The executable is ready to use in an UCI-capable chess-GUI in Windows (e.g. Arena http://www.playwitharena.de). However, if you need to compile the engine for your system, you need the files Astimate4.cpp, Astimate4.h, Astimate4.tre, Astimate4.nnue and Astimate4.wdl and a c compiler.
Compiling under Windows (example): Use for instance DevC++ (https://bloodshed-dev-c.de.softonic.com), set Compiler Options (under "Tools") to 64 or 32 bit Release, set the "Optimization Level" to "Highest" and "Language Standard ISO C++11" (under "Tools->Compiler Options->Settings->Code Generation"), select general compiler option "-mavx2" (if machine has avx2) and compile ("Execute->Compile"). If machine has no avx, you need to comment out the line "#define USE_AVX2 1" near the beginning of the code.
Compiling under Linux (example): use "g++ Astimate4.cpp -Ofast -pthread -lpthread -o Astimate4". Use -mavx2 for machines that have the 256-bit AVX2 vector extensions. Astimate4 works on the DGT Pi too!
Compiling under Android (example): use the App "C4droid" and therein the compiler "G++ + Bionic" and export the binary (under Export). For Android you can use the app "DroidFish" as GUI.
If you have an ARM chip with NEON acceleration you can uncomment the line "#define USE_NEON 1" near the beginning of the code before compiling. The AVX2 and NEON SIMD acceleration code is used for NNUE only. So if you don't use NNUE, you don't need the SIMD acceleration.
Somne chess GUIs allow for a configuration of the engine. Astimate4 offers a huge number of configurable parameters. In Arena, for instance, you can go to "Engines->Configuration" to change parameters. However, the default parameters are tuned to give maximum strength. Astimate4 is a multi-thread engine. The parameter "HelperThreads" controls, how many processor threads are used by Astimate4 in addition to the main thread. The more helper threads, the faster Astimate4 calculates. However, if more threads are configured than the computer can handle, the engine becomes even slower. The best setting depends, therefore, on your platform. The default is 2 which is a safe setting for most current processors. By default, Astimate4 uses its internal opening book and the 3-4-5-men Syzygy wdl tablebases. Both options can be switched off in the engine configuration. Astimate4 uses only an NNUE-network for evaluation. This can not be switched off.
Openings: Integrated opening books (450k positions) with transposition and setup position detection.
Endgame: The result of all 3-4-5-men endgames (also KBNvK) is integrated as win/draw/loss-tablebases
Search: Magic Bitboards, NegaScout, Principle Variation Search, Nullmove, Multicut, Internal Iterative Deepening, Late Move Reductions, Delta Pruning, Quiescence Search, Mate Distance Pruning, Tactics Extensions, Static Exchange Evaluation, Counter and History heuristics, Pondering, MultiPV, ...
Hash Tables: Two Tier Transposition Table, Evaluation Table
Multi Threads: SMP (Shared Memory Parallelization) where the independent threads share history- and transposition tables
NNUE: Astimate can make use of "Efficently Updatable Neural Networks", coded in its internal network or in the file network.nnue. It supports the NNUE version "halfka_v2".
Console: The Astimate4 executable can also be run in terminal mode too. There, it supports all UCI-commands and some additional commands like entering a move (e.g. "e2e4") "back" (take back last move) "show" (show current board and additional information), "list" (show list of possible moves with their 1-ply-evaluation) "perft x" (run a perft with depth x on current position) "divide x" (run a perft of depth x for every possible move in the current position)
Ask the author (axel.steinhage@web.de) before distributing exacutable or source code.