Skip to content

Commit

Permalink
chore: distance to direction
Browse files Browse the repository at this point in the history
  • Loading branch information
siddarthsingh1 committed Jan 8, 2024
1 parent 8b03169 commit 5aad4bd
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions jumanji/environments/routing/pacman/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,15 +433,14 @@ def col_fn() -> Tuple[chex.Array, chex.Numeric, chex.Numeric, chex.Numeric]:


def get_directions(pacman_position: Position, ghost_position: chex.Array) -> chex.Array:
"""Get the vector distance between thr ghost and the target position"""
distance = jnp.array(
"""Get the vector distance between the ghost and the target position"""
direction = jnp.array(
[
ghost_position[0] - pacman_position.y,
ghost_position[1] - pacman_position.x,
]
)

return distance
return direction


def player_step(
Expand Down

0 comments on commit 5aad4bd

Please sign in to comment.