Simple deep artificial neural network in Python
Budget: €50 – €120 EUR
Hello!
I tried to find out if a deep artificial neural networks is able to "understand" the rules of a chess game. So I built such a network and feed it with a chessboard piece assignment as the input and provided the "labeled" data in form of another chessboard piece assignment which is very similar to the input data but which contains a regular following move to the piece assignment of the input data. Example:
When the chess game starts the row in the first csv (input) is
r,n,b,q,k,b,n,r,p,p,p,p,p,p,p,p,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,P,P,P,P,P,P,P,P,R,N,B,Q,K,B,N,R
value description:
empty field: 0
white queen: Q
white rook: R
white king: K
white prawen: P
white bishop: B
white knight: N
black queen: q
black rook: r
black king: k
black prawen: p
black bishop: b
black knight: n
If then white does its move, let's say moves the king prawn from E2 to E4 the new data row would be
r,n,b,q,k,b,n,r,p,p,p,p,p,p,p,p,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,P,0,0,0,0,0,0,0,0,0,0,0,P,P,P,P,0,P,P,P,R,N,B,Q,K,B,N,R
That row is provided then from the second csv file as the target/labeled data.
The chessboard counts 8x8 fields. I did it simple and wrote the 64 positions in only one single row. Starting with the fields from A8 to H8, then A7 to H7 and so on.
I am not very experienced in Python and in AI programming so I got in trouble already with the basics. For example the values Q, K and so on are all categorical data but obviously I missed something and my network handeled them as float datatype.At least when I tried a prediction after the training I got for example
0.9473762864,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,P,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,P,0,0,0,0,0,0,0,0,0,0,0
So I have two csv files. One contains a million chessboard piece assignments (in 1 mio. rows) and the second csv file also contains one million chessboard piece assignments which are always the correct "answer" to the corresponding input row. So very similar but with one chess move done. As the output is very similar to the input I thought an Autoencoder could be a good idea. So I programmed one but, as I said, without success.
So I am looking for someone who codes me a AI network as described above which handles the input values as categorical values.
Feel free to suggest some other ideas. May be a deep convolutional network may be better as a chessboard is 2D and not 1D. Finally I came to the conclusion that a CNN may not be a good idea because this case is different than image classification. In image classification a few pixels can be "wrong" but is't still clear enough that a cat is on a picture. Compared to chess a rook for example is on the field A2 or not. It cannot be 98% on field A2. But I can be wrong here and a CNN is the better choise.
Also there may be a more senseful general strategy than using an autoencoder. Feel free to suggest something else.
I can provide you with the two csv files with a lot of data. (I also can formate the content of the csv files in any other way to prefer. ) It is no must that your generated network is successful and indeed "understand" the chess rules. I am not very optimistical that this can work. Tuning at the layers and hyperparameters is my job afterwards.
Best regards
Marc
I tried to find out if a deep artificial neural networks is able to "understand" the rules of a chess game. So I built such a network and feed it with a chessboard piece assignment as the input and provided the "labeled" data in form of another chessboard piece assignment which is very similar to the input data but which contains a regular following move to the piece assignment of the input data. Example:
When the chess game starts the row in the first csv (input) is
r,n,b,q,k,b,n,r,p,p,p,p,p,p,p,p,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,P,P,P,P,P,P,P,P,R,N,B,Q,K,B,N,R
value description:
empty field: 0
white queen: Q
white rook: R
white king: K
white prawen: P
white bishop: B
white knight: N
black queen: q
black rook: r
black king: k
black prawen: p
black bishop: b
black knight: n
If then white does its move, let's say moves the king prawn from E2 to E4 the new data row would be
r,n,b,q,k,b,n,r,p,p,p,p,p,p,p,p,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,P,0,0,0,0,0,0,0,0,0,0,0,P,P,P,P,0,P,P,P,R,N,B,Q,K,B,N,R
That row is provided then from the second csv file as the target/labeled data.
The chessboard counts 8x8 fields. I did it simple and wrote the 64 positions in only one single row. Starting with the fields from A8 to H8, then A7 to H7 and so on.
I am not very experienced in Python and in AI programming so I got in trouble already with the basics. For example the values Q, K and so on are all categorical data but obviously I missed something and my network handeled them as float datatype.At least when I tried a prediction after the training I got for example
0.9473762864,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,P,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,P,0,0,0,0,0,0,0,0,0,0,0
So I have two csv files. One contains a million chessboard piece assignments (in 1 mio. rows) and the second csv file also contains one million chessboard piece assignments which are always the correct "answer" to the corresponding input row. So very similar but with one chess move done. As the output is very similar to the input I thought an Autoencoder could be a good idea. So I programmed one but, as I said, without success.
So I am looking for someone who codes me a AI network as described above which handles the input values as categorical values.
Feel free to suggest some other ideas. May be a deep convolutional network may be better as a chessboard is 2D and not 1D. Finally I came to the conclusion that a CNN may not be a good idea because this case is different than image classification. In image classification a few pixels can be "wrong" but is't still clear enough that a cat is on a picture. Compared to chess a rook for example is on the field A2 or not. It cannot be 98% on field A2. But I can be wrong here and a CNN is the better choise.
Also there may be a more senseful general strategy than using an autoencoder. Feel free to suggest something else.
I can provide you with the two csv files with a lot of data. (I also can formate the content of the csv files in any other way to prefer. ) It is no must that your generated network is successful and indeed "understand" the chess rules. I am not very optimistical that this can work. Tuning at the layers and hyperparameters is my job afterwards.
Best regards
Marc