Closed goshawk22 closed 4 years ago
I have found a workaround although I think it's very inefficient. I take the two coordinates of the board and convert them to a value between 0 and 64. This gives me an list; (0-3, 0-64, 0-64). Then I convert this to a value between 0 and 16384 (64644). This is then the length of valids, as opposed to 64 in Othello. I haven't finished the code yet but I will report back as to whether it is very slow or not!
Yes, seems there are some problems. My computer is running out of ram before even 1 game of self play is finished (and I have 32gb). I'm not sure if its possible to make the valid moves array smaller but i can certainly work on it! Any ideas would be useful.
See the repo for a variant of Checkers. Number of moves is much less you mentioned above. https://github.com/evg-tyurin/alpha-nagibator
I am currently working on the code for the game Draughts. Draughts is different to the other games because, instead of placing a piece, you move an existing on on the board, and each piece might have multiple places to move to. There are also two types of piece for each player, men and kings. To work around this, the move variable has three values: the type of move (could be a standard move, standard capture, king move or king capture), the piece to be moved (tuple) and the destination (tuple). The problem is that this isn't going to work with the MCTS as it returns the probability for each square on the board, not which piece to move and where. Is there a better way of implementing the move variable, or should I try something else? Code is at https://github.com/goshawk22/alpha-zero-general/tree/draughts