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

"ep_len_mean" and "ep_rew_mean" are inconsistent for Atari environments #873

Closed
semihtasbas opened this issue Apr 19, 2022 · 1 comment
Closed
Labels
duplicate This issue or pull request already exists question Further information is requested

Comments

@semihtasbas
Copy link

Hi,

I want to calculate ep_rew_mean on custom Atari environment. But while calculating this, I encounter a problem. I used following code.

env = make_atari_env('BreakoutNoFrameskip-v4', n_envs=16)
env = VecFrameStack(env, n_stack=4)
model = A2C("CnnPolicy", env, verbose=0)
model.learn(total_timesteps=int(5e6))

I debug this code and checked line 175 in "on_policy_algorithm.py":

new_obs, rewards, dones, infos = env.step(clipped_actions)

I count done condition with my hand, and it is around 30, while ep_len_mean is around 600. And there is also difference between ep_rew_mean and hand counted reward.
What is reason and how can I implement "ep_rew_mean" to my custom algorithm while using your Atari wrapper?

Thank you.

@semihtasbas semihtasbas added the bug Something isn't working label Apr 19, 2022
@araffin araffin added question Further information is requested duplicate This issue or pull request already exists and removed bug Something isn't working labels Apr 19, 2022
@araffin
Copy link
Member

araffin commented Apr 19, 2022

Duplicate of #181

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants