Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix atari incorrect trunc flag when episodic_life=True #255

Merged
merged 1 commit into from
Mar 28, 2023

Conversation

Trinkle23897
Copy link
Collaborator

close #239

@Trinkle23897 Trinkle23897 merged commit f42b2e1 into sail-sg:main Mar 28, 2023
@Trinkle23897 Trinkle23897 deleted the main branch March 28, 2023 06:01
Copy link
Collaborator

@vwxyzjn vwxyzjn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey sorry for the late review.

@@ -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_);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be the same if you do state["trunc"_] = (elapsed_step_ >= max_episode_steps_);?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That will break a lot of thing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] done=True, but infos['TimeLimit.truncated'] and infos["terminated"] are False
2 participants