asdfjkl / neural_network_chess

Free Book about Deep-Learning approaches for Chess (like AlphaZero, Leela Chess Zero and Stockfish NNUE)
287 stars 27 forks source link
alphazero chess deep-learning nnue

Neural Networks For Chess

cover

Free Book

Donations are welcome:

paypal

If you like the book, a review on Amazon is also highly appreciated.

Contact

Contents

AlphaZero, Leela Chess Zero and Stockfish NNUE revolutionized Computer Chess. This book gives a complete introduction into the technical inner workings of such engines.

The book is split into four main chapters - excluding chapter 1 (introduction) and chapter 6 (conclusion):

Source Code

Just clone this repository or directly browse the files. You will find here all sources of the examples of the book.

Several users contacted me as they have problems setting up their python environment. I highly suggest to use Ubuntu 20.04. The examples do not require much computation power, i.e. you can also install a virtual machine. First install git, then install numpy and pip via apt, and finally install TensorFlow, scikit-image, matplotlib, python-chess, tqdm via pip. You can do so by opening a terminal and running the following commands.

sudo apt install python3 git python3-numpy python3-pip
pip3 install --user --upgrade TensorFlow
pip3 install --user --upgrade scikit-image
pip3 install --user --upgrade matplotlib
pip3 install --user --upgrade python-chess
pip3 install --user --upgrade tqdm
git clone https://github.com/asdfjkl/neural_network_chess.git

About

During COVID, I worked a lot from home and saved approximately 1.5 hours of commuting time each day. I decided to use that time to do something useful (?) and wrote a book about computer chess. In the end I decided to release the book for free.

Profits

To be completely transparent, here is what I make from every paper copy sold on Amazon. The book retails for $16.95 (about 15 Euro).

Errata

If you find mistakes, please report them here - your help is appreciated!

Links & Resources