Skip to content

Commit

Permalink
Update jumanji/environments/routing/pacman/env.py
Browse files Browse the repository at this point in the history
Co-authored-by: Sasha <[email protected]>
  • Loading branch information
siddarthsingh1 and sash-a authored Jan 8, 2024
1 parent 64687c9 commit 8d19d78
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jumanji/environments/routing/pacman/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,8 @@ def check_power_up(
ps = jnp.array([ps_y, ps_x])

# Check if player and power_up position are shared
valid = (ps == power_up_locations).all(axis=-1).any()
eat = 1 * valid
on_powerup = (ps == power_up_locations).all(axis=-1).any()
eat = on_powerup.astype(int)
mask = (ps == power_up_locations).all(axis=-1)
invert_mask = mask != True # type: ignore # noqa: E712
invert_mask = invert_mask.reshape(4, 1)
Expand Down

0 comments on commit 8d19d78

Please sign in to comment.