Skip to content

Commit

Permalink
fix atari incorrect trunc flag when episodic_life=True (#255)
Browse files Browse the repository at this point in the history
close #239
  • Loading branch information
Trinkle23897 committed Mar 28, 2023
1 parent 8616a6f commit f42b2e1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions envpool/atari/atari_env.h
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ class AtariEnv : public Env<AtariEnvSpec> {
void WriteState(float reward, float discount, float info_reward) {
State state = Allocate();
state["discount"_] = discount;
state["trunc"_] = done_ && (elapsed_step_ >= max_episode_steps_);
state["reward"_] = reward;
state["info:lives"_] = lives_;
state["info:reward"_] = info_reward;
Expand Down

0 comments on commit f42b2e1

Please sign in to comment.