CrazyAra

From Chessprogramming wiki
Revision as of 17:03, 26 May 2021 by GerdIsenberg (talk | contribs)
Jump to: navigation, search

Home * Engines * CrazyAra

CrazyAra,
an UCI compatible chess variant open source engine licensed under the GPL v3.0. CrazyAra started as a semester project by Johannes Czech, Moritz Willig and Alena Beyer for the course Deep Learning: Methods and Architectures at the TU Darmstadt in summer 2018, headed by Kristian Kersting and Johannes Fürnkranz. The project was inspired by the deep learning and MCTS techniques described in DeepMind's AlphaZero papers [2] [3], the goal to train a deep convolutional neural network to play Crazyhouse trained by supervised learning on human data - the initial version of CrazyAra entirely written in Python [4]. In December 2018, CrazyAra won a five game Crazyhouse online-match versus Justin Tan aka JannLee with 4-1 [5] [6].

Continuation

As subject of his master thesis [7], Johannes Czech continued the development in porting the engine to C++ and to further apply reinforcement learning to Crazyhouse and other chess variants including Chess960. While the initial version uses Python-chess by Niklas Fiekas, the C++ version uses a multi variant Stockfish fork by Daniel Dugovic [8] for move generation, board representation and Syzygy parsing. To feature more chess variants, more recently Fairy-Stockfish by Fabian Fichter was incorporated [9], as for instance used in Maximilian Langer's Xiangqi version of CrazyAra [10].

Network

CrazyAra uses MXNet as it's deep learning framework - with three NN back-ends to run the NN inference available, Nvidia's TensorRT built on CUDA (GPU only), MXNet and Torch [11]. The input representation is a hybrid between chess and Shogi and compared to the AlphaZero description avoids the history of past board representations [12]. In CrazyAra v0.2.0 a newly designed architecture was used which is called RISE (ResneXt, Inception, Squeeze, Excitation). The model uses mixed depth-wise convolutional kernels, efficient squeeze excitation modules, use of 5x5 convolutions in deeper layers, and hard sigmoid instead of sigmoid activation functions. The proposed model architecture has fewer parameters, faster inference and training time while maintaining an equal amount of depth compared to the architecture proposed by DeepMind (19 residual layers with 256 filters) [13]. Similar to AlphaZero, the output is represented by a value and policy head, the latter implemented as vector of moves [14] [15].

Monte-Carlo Graph Search

CrazyAra optionally features an improvement of AlphaZero's MCTS / PUCT algorithm, considering transpositions - dubbed Monte-Carlo Graph Search based on a directed acyclic graph (DAG) instead of a tree structure [16] [17].

ClassicAra

ClassicAra is a version of CrazyAra to play classical chess as well as Chess960. ClassicAra had its tournament debut as TCEC Season 21 in Spring 2021, not yet improved by reinforcement learning [18].

See also

Publications

Forum Posts

Re: ClassicAra Chess Engine..World Record Download!! by Johannes Czech, CCC, May 20, 2021
Re: ClassicAra Chess Engine..World Record Download!! by Johannes Czech, CCC, May 25, 2021 [19]

External Links

Chess Engine

GitHub

Reports

Misc

lineup: Joe Zawinul, Wayne Shorter, Jaco Pastorius, Alex Acuña, Manolo Badrena

References

  1. Red-and-green macaw in Brookfield Zoo, Photo by Nimesh M, July 05, 2008, Wikimedia Commons
  2. 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 (2017). Mastering Chess and Shogi by Self-Play with a General Reinforcement Learning Algorithm. arXiv:1712.01815
  3. 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 (2018). A general reinforcement learning algorithm that masters chess, shogi, and Go through self-play. Science, Vol. 362, No. 6419
  4. GitHub - QueensGambit/CrazyAra: A Deep Learning UCI-Chess Variant Engine written in C++ & Python
  5. CrazyAra Crazyhouse
  6. Crazyhouse Chess: CrazyAra plays JannLee for Christmas, December 26, 2018
  7. Johannes Czech (2019). Deep Reinforcement Learning for Crazyhouse. Master thesis, TU Darmstadt, pdf
  8. GitHub - ddugovic/Stockfish: BETA multi-variant fork of popular UCI chess engine; final release for now
  9. Releases · QueensGambit/CrazyAra · GitHub
  10. Maximilian Langer (2021). Evaluation of Monte-Carlo Tree Search for Xiangqi. B.Sc. thesis, TU Darmstadt, pdf
  11. 2. Build neural network inference library · QueensGambit/CrazyAra Wiki · GitHub
  12. Input representation · QueensGambit/CrazyAra Wiki · GitHub
  13. Model architecture · QueensGambit/CrazyAra Wiki · GitHub
  14. Output representation · QueensGambit/CrazyAra Wiki · GitHub
  15. Network visualization · QueensGambit/CrazyAra Wiki · GitHub
  16. Johannes Czech, Patrick Korus, Kristian Kersting (2020). Monte-Carlo Graph Search for AlphaZero. arXiv:2012.11045
  17. Engine settings · QueensGambit/CrazyAra Wiki · GitHub
  18. Re: ClassicAra Chess Engine..World Record Download!! by Johannes Czech, CCC, May 20, 2021
  19. Drofa 3.0.0 vs ClassicAra 0.9.2.post1 - TCEC Season 21 - League 4

Up one Level