I'm trying to develop chess engine basing on this article:
https://www.cs.tau.ac.il/~wolf/papers/deepchess.pdf
I've got some knowledge about classic engines. Some time ago I've build engine that played about 2100 rating. It was my first big application, now I'd do many things better.
I'd like to ask if any of you tried to build an engine based on neural network and I'd like to hear some advices from you. Is it possible to achieve grandmaster level like authors of this article said?
It is my first day on this forum, if question like this appeared before, I appologise in advance.
Deepchess - neural network engine
Moderators: hgm, Rebel, chrisw
-
- Posts: 16
- Joined: Tue Apr 14, 2020 1:15 pm
- Full name: Pawel Wojcik
-
- Posts: 536
- Joined: Thu Mar 09, 2006 3:01 pm
Re: Deepchess - neural network engine
There have been major advances with NN engine development since this article came out.
Suggest starting here:
http://www.lczero.org/
And follow the links (the Github link to the repos, then Lc0, then to the Wiki), or jump to:
https://github.com/LeelaChessZero/lc0/wiki
Suggest starting here:
http://www.lczero.org/
And follow the links (the Github link to the repos, then Lc0, then to the Wiki), or jump to:
https://github.com/LeelaChessZero/lc0/wiki
-
- Posts: 16
- Joined: Tue Apr 14, 2020 1:15 pm
- Full name: Pawel Wojcik
Re: Deepchess - neural network engine
Thanks for reply. Building Lc0 seems to be very difficult to me. I'd like to start with something a little less complicated. Grandmaster level as authors say is completely satisfying for me. I'm pretty new with neural network and I can't predict if the approach from this article is worth trying. Previously I created a model and it was a completely disaster. 9 of 10 moves seemed completely random, but authors claimed that it can play on 1400 rating level.
-
- Posts: 536
- Joined: Thu Mar 09, 2006 3:01 pm
Re: Deepchess - neural network engine
I would skip the old paper until you better understand neural net training generally.
Typically people only build Lc0 if not on Windows.
Yes, Lc0 is quite complicated for chess, but there are some more introductory level options.
For a simpler approach you might start here.
https://github.com/Zeta36/chess-alpha-zero
Another closely related option to Lc0 is here:
https://github.com/dkappe/a0lite
For basic NN training mostly in just Python this blog is quite good (search for the older posts first):
https://machinelearningmastery.com/
And here:
http://cs231n.stanford.edu/
A more self-contained and excellent place to review things is Giraffe (follow the links to source etc):
https://www.chessprogramming.org/Giraffe
Typically people only build Lc0 if not on Windows.
Yes, Lc0 is quite complicated for chess, but there are some more introductory level options.
For a simpler approach you might start here.
https://github.com/Zeta36/chess-alpha-zero
Another closely related option to Lc0 is here:
https://github.com/dkappe/a0lite
For basic NN training mostly in just Python this blog is quite good (search for the older posts first):
https://machinelearningmastery.com/
And here:
http://cs231n.stanford.edu/
A more self-contained and excellent place to review things is Giraffe (follow the links to source etc):
https://www.chessprogramming.org/Giraffe
-
- Posts: 16
- Joined: Tue Apr 14, 2020 1:15 pm
- Full name: Pawel Wojcik
Re: Deepchess - neural network engine
Thank you very much, I'll look at links closely. So you think that the approach presented in this paper is a waste of time?
-
- Posts: 536
- Joined: Thu Mar 09, 2006 3:01 pm
Re: Deepchess - neural network engine
Yes.
I had tried to replicate the results and while I do not recall the details, it was disappointing.
I had tried to replicate the results and while I do not recall the details, it was disappointing.
-
- Posts: 16
- Joined: Tue Apr 14, 2020 1:15 pm
- Full name: Pawel Wojcik
Re: Deepchess - neural network engine
I'm browsing links you've sent me, but I think I need more detailed description how to build such an engine, but thanks anyway
-
- Posts: 536
- Joined: Thu Mar 09, 2006 3:01 pm
Re: Deepchess - neural network engine
See
https://web.stanford.edu/~surag/posts/alphazero.html
and
These are for Go, but the principals are the same.
https://web.stanford.edu/~surag/posts/alphazero.html
and
These are for Go, but the principals are the same.
-
- Posts: 16
- Joined: Tue Apr 14, 2020 1:15 pm
- Full name: Pawel Wojcik
Re: Deepchess - neural network engine
I don't know if I'm repeating this subject but I have some doubts about neural network structure. My model should have two outputs:
First - continuous value of board state
I should learn model to evaluate postion. How can I learn model to evaluate position?
Second - probability distribution over all possible actions
Summarizing, it's 4096 possible actions in chess (excluding promotion options). This number is indeed that big or people have different approach?
Keras library would be suitable here?
First - continuous value of board state
I should learn model to evaluate postion. How can I learn model to evaluate position?
Second - probability distribution over all possible actions
Summarizing, it's 4096 possible actions in chess (excluding promotion options). This number is indeed that big or people have different approach?
Keras library would be suitable here?
-
- Posts: 536
- Joined: Thu Mar 09, 2006 3:01 pm
Re: Deepchess - neural network engine
Yup.
I think one of the earlier suggested links (Zeta36) has a Keras implementation.
Lc0 is C++ for speed (playing games) and Python for training nets.
The outputs (or heads) would be Value (result of the game W/D/L mapped to some numerical range), and Policy (which move to make; actually all moves with a probability for each).
If you haven't yet, suggest reading the seminal paper and the magazine piece in the links from here:
https://www.chessprogramming.org/AlphaZero
I think one of the earlier suggested links (Zeta36) has a Keras implementation.
Lc0 is C++ for speed (playing games) and Python for training nets.
The outputs (or heads) would be Value (result of the game W/D/L mapped to some numerical range), and Policy (which move to make; actually all moves with a probability for each).
If you haven't yet, suggest reading the seminal paper and the magazine piece in the links from here:
https://www.chessprogramming.org/AlphaZero