AlphaZeroIncubator / AlphaZero

Our implementation of AlphaZero for simple games such as Tic-Tac-Toe and Connect4.
0 stars 0 forks source link

Data storage format #6

Closed guidopetri closed 4 years ago

guidopetri commented 4 years ago

As discussed, we want to store the game data in some efficient way that doesn't require us to replay games. Since most games that we are playing are two-player games, this can probably be done with simple binary matrices; maybe some sort of class that has a data array, together with x/y sizes? That way we can reconstruct a numpy array out of it relatively easily by reshaping it using x/y.

If this proves too inefficient storage wise, we can also do something along the lines of chess moves, e.g. "piece on a2 moved to a4", stored as "a2a4" for instance. This would involve re-computing games, though, so it would definitely make our training pipeline a lot slower.

PhilipEkfeldt commented 4 years ago

I think we should start with just storing board states until we run into issues. Might be enough to just have either a NumPy array or a PyTorch tensor. For Connect4 that might simply be a 6x7x2 binary array/tensor.