multiplayer-alphazero
multiplayer-alphazero copied to clipboard
Add hidden states for games
With this change games with hidden information per player could be implemented. The hash function that represents the game state is now part of the game to add also hidden states.
It feels a bit hacky to keep the game class stateless but its a non invasive change.
Also the action mask is now part of the recorded training data. So the loss functions needs no game class and could focus an recorded data...
There is a drawback with this pull request... In large MCTS searches the RAM could be eaten with the extra env data, because in your hash based search the take_action step is done multiple times for the still taken search paths. That's only CPU intensive with your "observation == complete game state" game variants but with this pull request it's also memory extensive.