Skip to content

Commit

Permalink
chore: check if action is legal in GameEnv
Browse files Browse the repository at this point in the history
  • Loading branch information
jingruxie03 committed Oct 12, 2021
1 parent b941af3 commit f61606b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions douzero/env/game.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ def get_bomb_num(self):
def step(self):
action = self.players[self.acting_player_position].act(
self.game_infoset)
assert action in self.game_infoset.legal_actions

if len(action) > 0:
self.last_pid = self.acting_player_position
Expand Down

0 comments on commit f61606b

Please sign in to comment.