init
Wingspan Environment is meant to simulate board game Wingspan in compute-friendly way.
StepResult
Bases: Enum
Internal enum describing result of the action.
WingspanEnv()
Bases: Env
gym Environment representing a game of Wingspan.
It is single-threaded, but efficient offloading vast majority of operations to native implementation.
cur_player_idx()
Returns index of current player
Returns:
Name | Type | Description |
---|---|---|
int |
int
|
Index of current player |
cur_round()
Returns index of current round.
Round index can be -1, which means that game is still in setup phase (i.e. players are choosing which resource to discard). It is 0-indexed, so first round is 0. If it is equal to number of round in the game, this means that game is finished and in terminated state.
Returns:
Name | Type | Description |
---|---|---|
int |
int
|
Index of current round [-1, num_rounds] |
next_action()
What is the next action to be taken by current player
Returns:
Type | Description |
---|---|
Optional[PyAction]
|
Optional[PyAction]: Next action to be performed. None, if game is in terminated state. |
points()
Current point tally for each of the players.
This is calculated as if the game finished right now (although end of game/end of round abilities are not triggered).
Returns:
Type | Description |
---|---|
list[int]
|
list[int]: Current point tally for each of the players. |
reset(*, seed=None)
Resets environment to initial state.
If specified, seed can be used for reproducibility.