Skip to content

Commit

Permalink
Board is always copied when returned as an observation to avoid in-pl…
Browse files Browse the repository at this point in the history
…ace modification of the observation when state of the environment changes
  • Loading branch information
PBarde authored and cinjon committed Feb 14, 2020
1 parent 69da607 commit 4ba44f6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pommerman/forward_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,9 +546,8 @@ def in_view_range(position, v_row, v_col):
observations = []
for agent in agents:
agent_obs = {'alive': alive_agents}
board = curr_board
board = curr_board.copy()
if is_partially_observable:
board = board.copy()
for row in range(board_size):
for col in range(board_size):
if not in_view_range(agent.position, row, col):
Expand Down

0 comments on commit 4ba44f6

Please sign in to comment.