Check outthe Fastchess of you're interested: https://github.com/thomasahle/fastchess . It's a python implementation of the MCTS approach in the Alpha Zero papers, and it uses the simplest "Neural" network architecture possible: A linear function from the current boolean board to the next move. (A 1895 x 4095 matrix.)
If all you want is 2000 ELO this should be more than enough. Fastchess is 1700-1800 ELO and it is written in Python.
You need some data to train on. The best, easily accessible data is the cclr-v3 data from http://data.lczero.org/files/
AlphaZero
Moderator: Ras
-
brianr
- Posts: 541
- Joined: Thu Mar 09, 2006 3:01 pm
- Full name: Brian Richardson
Re: AlphaZero
A couple of things. The CCRL Standard Dataset is quite valuable as it provides a trained net benchmark to compare against a net you have trained from the same data. However, as mentioned earlier, the Bad Gyal data will produce stronger nets having more Policy information. And, of course, the actual Lc0 data has full Policy info and will produce even better nets.
In terms of pre-processing the data, be aware that Windows struggles with directories that have a large number of files (more than about 30,000). So, I try to limit the number of games/chunk files (if one game per chunk, some datasets have more than one game, like I think Bad Gyal data) to about 30,000 in a multi-level directory structure. If you try to open a directory with the 2 million files from the CCRL Standard dataset, it will appear as if your system is hanging for a very long time (even with fast SSD disk). There may be some Windows tools to help with this, but I used Ubuntu to split the large directory into many smaller sub-directories, which only has to be done one time.
In terms of pre-processing the data, be aware that Windows struggles with directories that have a large number of files (more than about 30,000). So, I try to limit the number of games/chunk files (if one game per chunk, some datasets have more than one game, like I think Bad Gyal data) to about 30,000 in a multi-level directory structure. If you try to open a directory with the 2 million files from the CCRL Standard dataset, it will appear as if your system is hanging for a very long time (even with fast SSD disk). There may be some Windows tools to help with this, but I used Ubuntu to split the large directory into many smaller sub-directories, which only has to be done one time.
-
Milos
- Posts: 4190
- Joined: Wed Nov 25, 2009 1:47 am
-
Fafkorn
- Posts: 16
- Joined: Tue Apr 14, 2020 1:15 pm
- Full name: Pawel Wojcik
Re: AlphaZero
Yes, but softmax doesn't know how to prevent from giving non zero values to illegal moves
-
Fafkorn
- Posts: 16
- Joined: Tue Apr 14, 2020 1:15 pm
- Full name: Pawel Wojcik
Re: AlphaZero
Due to fast chess comment
I think that I have MCTS implementation and NN model build already behind me. I've started to train my model with some engine games data. I don't know how to use lczero data for my own purpose. I guess that my policy size (4096 possible moves) is different from their.
I think that I have MCTS implementation and NN model build already behind me. I've started to train my model with some engine games data. I don't know how to use lczero data for my own purpose. I guess that my policy size (4096 possible moves) is different from their.
-
maksimKorzh
- Posts: 776
- Joined: Sat Sep 08, 2018 5:37 pm
- Location: Ukraine
- Full name: Maksim Korzh
Re: AlphaZero
Hi Thomas, I was searching for the simplest "Neural" network architecture possible and came across your fastchess repo on github. It claims: "Predicts the best chess move with 27.5% accuracy by a single matrix multiplication" - does single matrix multiplication mean that the NN is essentially a single layer perceptron without hidden layers at all? And another question is how to build the model without involving fasttext library? Did you use it just to avoid converting board to input vectors?thomasahle wrote: ↑Tue May 05, 2020 10:51 am Check outthe Fastchess of you're interested: https://github.com/thomasahle/fastchess . It's a python implementation of the MCTS approach in the Alpha Zero papers, and it uses the simplest "Neural" network architecture possible: A linear function from the current boolean board to the next move. (A 1895 x 4095 matrix.)
If all you want is 2000 ELO this should be more than enough. Fastchess is 1700-1800 ELO and it is written in Python.
You need some data to train on. The best, easily accessible data is the cclr-v3 data from http://data.lczero.org/files/
Didactic chess engines:
https://www.chessprogramming.org/Maksim_Korzh
Chess programming YouTube channel:
https://www.youtube.com/channel/UCB9-pr ... KKqDgXhsMQ
https://www.chessprogramming.org/Maksim_Korzh
Chess programming YouTube channel:
https://www.youtube.com/channel/UCB9-pr ... KKqDgXhsMQ
-
thomasahle
- Posts: 94
- Joined: Thu Feb 27, 2014 8:19 pm
Re: AlphaZero
Hi Maksim,
Your assertion is correct: Logistic regression is just like a neural network/perceptron with no hidden layers.
I used FastText because it is a very fast logistic regression algorithm on sparse inputs. You could use something else too if you'd like.
Your assertion is correct: Logistic regression is just like a neural network/perceptron with no hidden layers.
I used FastText because it is a very fast logistic regression algorithm on sparse inputs. You could use something else too if you'd like.