Closed guidopetri closed 4 years ago
Looks good. Only question, does the game object here represent a game rule set or an game instance state?
It should be an instance of a game, so a specific game. Otherwise there couldn't be a board state for it :P
It should be an instance of a game, so a specific game. Otherwise there couldn't be a board state for it :P
Right, I was just thinking it could be a starting state. :P
Ah, I see what you mean. I'm mostly styling this along the lines of the python-chess
library because I think it has some great things about it. Here's a link to the docs. In my mind, we should be working off of Game
subclass instances, which then have things like the list of moves so far, the legal moves, the current board state, etc.
Ah, I see what you mean. I'm mostly styling this along the lines of the
python-chess
library because I think it has some great things about it. Here's a link to the docs. In my mind, we should be working off ofGame
subclass instances, which then have things like the list of moves so far, the legal moves, the current board state, etc.
Ah nice, I'll check it out! See my other comment #12 for how I imagined it. I'm flexible, just want to avoid unnecessary boilerplate in the mcts implementation.
I just decided to save as JSON for now. It also saves the board width/height. The tensor in
board_state
should be binary.It also abuses some (hopeful) API for the
Game
class that haswidth
,height
,board_state
as properties and a constructorfrom_json
that can read the json dict and create a game of that kind with the appropriate params.