Skip to content

Commit

Permalink
Merge pull request #74 from EdanToledo/main
Browse files Browse the repository at this point in the history
fix: non-jittable code for minatar freeway and asterix
  • Loading branch information
RobertTLange authored May 1, 2024
2 parents 88fef69 + 0096e0e commit aef77d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gymnax/environments/minatar/asterix.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ def step_entities(
return (
state.replace(entities=entities, move_timer=move_timer),
reward,
bool(done > 0),
jnp.bool_(done > 0),
)


Expand Down
2 changes: 1 addition & 1 deletion gymnax/environments/minatar/freeway.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def step_agent(
win_cond = pos == 0
reward = win_cond * 1.0
pos = jax.lax.select(win_cond, 9, pos)
return state.replace(pos=pos, move_timer=move_timer), reward, win_cond.item()
return state.replace(pos=pos, move_timer=move_timer), reward, win_cond


def step_cars(state: EnvState) -> EnvState:
Expand Down

0 comments on commit aef77d5

Please sign in to comment.