Skip to content

Add hidden states for games #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Counterfeiter
Copy link

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...

- change game state to dict to carry also hidden game states like gym env's
- fix trainer and predict to work with new game states
TODO: fix other two example games to work with
- change two other game examples as well
- hash function is now part of the game class because hidden states should be considered in the hash
@Counterfeiter
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant