You can then inspect the resulting game state any way you want (e.g. game.state.player_state, game.state.actions, game.state.board.buildings, etc...).

bcollazo / catanatron

submited by
Style Pass
2021-08-05 16:30:06

You can then inspect the resulting game state any way you want (e.g. game.state.player_state, game.state.actions, game.state.board.buildings, etc...).

Cloning the repo and using directly will allow you to access additional tools not included in the core package. In particular, a web UI for watching games and a catanatron-play CLI script that provides a blueprint to run many games, collect summary statistics (avg vps, avg game length, etc...), save game for viewing in browser, and/or generate machine learning datasets.

We provide a docker-compose.yml with everything needed to watch games (useful for debugging). It contains all the web-server infrastructure needed to render a game in a browser.

In summary, Actions are tuples of enums like: (ActionType.PLAY_MONOPOLY, Resource.WHEAT) or (ActionType.BUILD_SETTLEMENT, 3) (i.e. build settlement on node 3).

State is currently represented by a simple data container class and is mutated by the functions in the state_functions module. This functional style allows us to create state copies (for bots that search through state space) faster. The closer we make this State class to an array of immutable primitives, the faster it will be to copy.

Leave a Comment
Related Posts