How to represent a game of chess in mathematics/array of numbers?

Hello, of course, in this respect, I am not the first, but I want to try to write a neural network plays chess, but I can't figure out how to represent the rules of chess to her. The location of chess pieces I thought I'd make, as an array with the first element or zero or unit, where zero is white, the next element is the number of the figure, where 0 pawn, 1 rook, etc., However, I can't figure out how to submit the program rules for the movement of the figures or the options which in the game is a draw. Can be you something will prompt?
March 23rd 20 at 19:13
1 answer
March 23rd 20 at 19:15
You can try:
Let the neural network plays the role of the evaluation function.
I.e. the input of the network serves as the Board and the output is a numerical score position.
The tree of possible moves is formed not by the network, and the external function.
In fact to build the tree of moves from the current position for each move is obtained a valuation using a neural network, and then selects the move with the best evaluation.
In this implementation of chess with neural network must run faster than the search depth.

For training, you can try to calculate the position of the classic Robin, and then to give her a neural network and train while estimates from the neural network will not coincide with the estimates obtained by enumeration.

Similar question here understands:
Thanks, I never thought about the rating by the neural network. But I guess for the running time to calculate all the options of the event tree to the Mat unrealistic (or not?) what will happen to rate of neural network? - otilia_Turcot commented on March 23rd 20 at 19:18
@otilia_Turcot, need to read at the time of the study. Currently, the network should assess. Well, until the end of the game no need to count. It is possible to calculate for example 5 moves to calculate a score and to teach the network to at least that. - johathan_Yundt commented on March 23rd 20 at 19:21
The somehow still make the competition between the two (albeit identical) models, it will be faster to work - erich.Dickens94 commented on March 23rd 20 at 19:24
@erich.Dickens94, alpha and coached, but it requires a lot of resources and implementation much more difficult.
Here the question of purpose, if just to play with NS, it is enough for the simple option too much, and if you want Carson to do it, then you need to complete to bother. - johathan_Yundt commented on March 23rd 20 at 19:27

Find more questions by tags Python