Book about Neural Networks for Chess

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

dkl
Posts: 28
Joined: Wed Jan 14, 2015 5:55 pm

Book about Neural Networks for Chess

Post by dkl »

Slightly about a year ago I got interested in how AlphaGo, AlphaGo Zero, AlphaZero and then later Stockfish NNUE actually worked. I've looked around but found the papers not easy to read (they take ideas from various domains), and started to take notes.

In the end I wrote a book and decided to give it away as a free PDF. So if you are interested in the topic, I invite you to have a look at

https://github.com/asdfjkl/neural_network_chess
Not Fritz, it's Jerry! Free Chess GUI - https://github.com/asdfjkl/jerry
Free Book about Neural Networks for Chess - https://github.com/asdfjkl/neural_network_chess
dkappe
Posts: 1632
Joined: Tue Aug 21, 2018 7:52 pm
Full name: Dietrich Kappe

Re: Book about Neural Networks for Chess

Post by dkappe »

A good effort. I’d note that an important bit of information missing with regard to Fat Fritz 2 was that it was the second NNUE network trained on data from a mcts/nn engine (namely Fat Fritz 1).
Fat Titz by Stockfish, the engine with the bodaciously big net. Remember: size matters. If you want to learn more about this engine just google for "Fat Titz".
User avatar
phhnguyen
Posts: 1526
Joined: Wed Apr 21, 2010 4:58 am
Location: Australia
Full name: Nguyen Hong Pham

Re: Book about Neural Networks for Chess

Post by phhnguyen »

dkl wrote: Wed Sep 29, 2021 6:50 am Slightly about a year ago I got interested in how AlphaGo, AlphaGo Zero, AlphaZero and then later Stockfish NNUE actually worked. I've looked around but found the papers not easy to read (they take ideas from various domains), and started to take notes.

In the end I wrote a book and decided to give it away as a free PDF. So if you are interested in the topic, I invite you to have a look at

https://github.com/asdfjkl/neural_network_chess
Thanks a lot. I have just downloaded and started reading!
https://banksiagui.com
The most features chess GUI, based on opensource Banksia - the chess tournament manager
User avatar
Thomas Lagershausen
Posts: 328
Joined: Mon Jun 11, 2007 6:59 pm

Re: Book about Neural Networks for Chess

Post by Thomas Lagershausen »

Big thx 8-)

Best christmasgift.
TL
User avatar
pohl4711
Posts: 2834
Joined: Sat Sep 03, 2011 7:25 am
Location: Berlin, Germany
Full name: Stefan Pohl

Re: Book about Neural Networks for Chess

Post by pohl4711 »

dkl wrote: Wed Sep 29, 2021 6:50 am Slightly about a year ago I got interested in how AlphaGo, AlphaGo Zero, AlphaZero and then later Stockfish NNUE actually worked. I've looked around but found the papers not easy to read (they take ideas from various domains), and started to take notes.

In the end I wrote a book and decided to give it away as a free PDF. So if you are interested in the topic, I invite you to have a look at

https://github.com/asdfjkl/neural_network_chess
Great! Just bought the paper-version on Amazon. Cant wait to read it!
scchess
Posts: 51
Joined: Mon Jan 04, 2021 4:12 pm
Full name: scchess

Re: Book about Neural Networks for Chess

Post by scchess »

Thanks! I've shared your book with people in our contacts.
Mike Sherwin
Posts: 965
Joined: Fri Aug 21, 2020 1:25 am
Location: Planet Earth, Sol system
Full name: Michael J Sherwin

Re: Book about Neural Networks for Chess

Post by Mike Sherwin »

dkl wrote: Wed Sep 29, 2021 6:50 am Slightly about a year ago I got interested in how AlphaGo, AlphaGo Zero, AlphaZero and then later Stockfish NNUE actually worked. I've looked around but found the papers not easy to read (they take ideas from various domains), and started to take notes.

In the end I wrote a book and decided to give it away as a free PDF. So if you are interested in the topic, I invite you to have a look at

https://github.com/asdfjkl/neural_network_chess
Hi Dominik,

I am very excited about your book! Maybe now I'll be able to write my own NN evaluator for for my new engine Bricabrac. However, I feel I have to beat my own drum just a bit. My engine RomiChess has had deep RL from January of 2006. At Leo Dijksman's (RIP) WBEC RomiChess climbed from class D to class B and was about to promote to class A when Leo suffered a hard drive failure and lost Romi's learn file.

Here is a quote from the CPW.
RomiChess is famous for its learning approach ...

Learning
As explained by Michael Sherwin, RomiChess uses two types of learning [5] :

1. Monkey see Monkey do. Romi remembers and incorporates winning lines regardless of which side played the moves into the opening book and can play them back instantly up to 180 ply if the stats for that line remain good.
2. Pavlov's dog experiments adapted to computer chess. Each sides moves are given a slight bonus if that side has won and the other sides moves are given a slight penalty. So, good moves can get a slight penalty and bad moves can get a slight bonus, however, through time those are corrected. These bonus/penalties are loaded into the hash table before each move by the computer. If Romi is loosing game after game then this will cause Romi to 'fish' for better moves to play until Romi starts to win.
Also against Glaurung 2 in a series of ten matches using Noomen's ten position opening suite Romi went from 5% in the first match to 95% in the tenth match. AFAIK RomiChess was the first engine to successfully demonstrate the power of deep RL. So while this is about your book I do believe RomiChess although not NN deserves a mention in the introduction.

Thanks
Mike
Ferdy
Posts: 4851
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Book about Neural Networks for Chess

Post by Ferdy »

dkl wrote: Wed Sep 29, 2021 6:50 am Slightly about a year ago I got interested in how AlphaGo, AlphaGo Zero, AlphaZero and then later Stockfish NNUE actually worked. I've looked around but found the papers not easy to read (they take ideas from various domains), and started to take notes.

In the end I wrote a book and decided to give it away as a free PDF. So if you are interested in the topic, I invite you to have a look at

https://github.com/asdfjkl/neural_network_chess
Excellent work thanks for sharing.
Joerg Oster
Posts: 986
Joined: Fri Mar 10, 2006 4:29 pm
Location: Germany
Full name: Jörg Oster

Re: Book about Neural Networks for Chess

Post by Joerg Oster »

Thank you!
Jörg Oster
Uri Blass
Posts: 11074
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: Book about Neural Networks for Chess

Post by Uri Blass »

Mike Sherwin wrote: Wed Sep 29, 2021 9:57 pm
dkl wrote: Wed Sep 29, 2021 6:50 am Slightly about a year ago I got interested in how AlphaGo, AlphaGo Zero, AlphaZero and then later Stockfish NNUE actually worked. I've looked around but found the papers not easy to read (they take ideas from various domains), and started to take notes.

In the end I wrote a book and decided to give it away as a free PDF. So if you are interested in the topic, I invite you to have a look at

https://github.com/asdfjkl/neural_network_chess
Hi Dominik,

I am very excited about your book! Maybe now I'll be able to write my own NN evaluator for for my new engine Bricabrac. However, I feel I have to beat my own drum just a bit. My engine RomiChess has had deep RL from January of 2006. At Leo Dijksman's (RIP) WBEC RomiChess climbed from class D to class B and was about to promote to class A when Leo suffered a hard drive failure and lost Romi's learn file.

Here is a quote from the CPW.
RomiChess is famous for its learning approach ...

Learning
As explained by Michael Sherwin, RomiChess uses two types of learning [5] :

1. Monkey see Monkey do. Romi remembers and incorporates winning lines regardless of which side played the moves into the opening book and can play them back instantly up to 180 ply if the stats for that line remain good.
2. Pavlov's dog experiments adapted to computer chess. Each sides moves are given a slight bonus if that side has won and the other sides moves are given a slight penalty. So, good moves can get a slight penalty and bad moves can get a slight bonus, however, through time those are corrected. These bonus/penalties are loaded into the hash table before each move by the computer. If Romi is loosing game after game then this will cause Romi to 'fish' for better moves to play until Romi starts to win.
Also against Glaurung 2 in a series of ten matches using Noomen's ten position opening suite Romi went from 5% in the first match to 95% in the tenth match. AFAIK RomiChess was the first engine to successfully demonstrate the power of deep RL. So while this is about your book I do believe RomiChess although not NN deserves a mention in the introduction.

Thanks
Mike
The question is if Romi can beat stockfish in a series using Noomen's ten position with learning or maybe after enough games it is going to get only draws.

I am not sure what are the Noomen's ten positions but I will not be surprised if Stockfish get 100% draws against itself in rapid time control from these positions(I know that Stockfish almost never win against itself in Mark Young's matches and for example Stockfish14 won against Stockfish13 3-0 with 997 draws).

https://prodeo.actieforum.com/t445-stoc ... 1000-games