Skip to content

Commit

Permalink
fix: four rooms now constructs goal correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
epignatelli committed Jun 6, 2024
1 parent 2cf6cc9 commit a42bbb3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions navix/environments/four_rooms.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def _reset(self, key: Array, cache: Union[RenderingCache, None] = None) -> Times
pocket=EMPTY_POCKET_ID,
)
# goal
goal = Goal(position=goal_pos, probability=jnp.asarray(1.0))
goal = Goal.create(position=goal_pos, probability=jnp.asarray(1.0))

entities = {
Entities.PLAYER: player[None],
Expand Down Expand Up @@ -112,7 +112,7 @@ def _reset(self, key: Array, cache: Union[RenderingCache, None] = None) -> Times
width=19,
observation_fn=kwargs.pop("observation_fn", observations.symbolic),
reward_fn=kwargs.pop("reward_fn", rewards.on_goal_reached),
termination_fn=kwargs.pop("termination_fn", terminations.on_goal_reached),
termination_fn=kwargs.pop("termination_fn", terminations.on_goal_reached),
*args,
**kwargs,
),
Expand Down

0 comments on commit a42bbb3

Please sign in to comment.