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

[Question] The actual training timesteps don't correspond with the hyper-parameters for Atari #367

Closed
5 tasks done
cx441000319 opened this issue Mar 14, 2023 · 2 comments
Closed
5 tasks done
Labels
question Further information is requested

Comments

@cx441000319
Copy link

cx441000319 commented Mar 14, 2023

❓ Question

Hi,

As the title says, it seems the issue only occurs in Atari. Here are some commands and images for reference:

Experiment Command:
python train.py --algo ppo --env PongNoFrameskip-v4
image

Training Plotting Command:
python scripts/plot_train.py -a ppo -e PongNoFrameskip-v4 -f logs
image

Evaluation Plotting Command:
python scripts/all_plots.py -a ppo -e PongNoFrameskip-v4 -f logs --no-million -max 10000000
image

We can tell the number of the training timesteps is about 4e7 instead of 1e7 (n_timesteps in the hyper-parameters). The issue doesn't exist in the environments except for Atari based on my experiment results. If you want to reproduce the same issue, you can simply replace the hyper-parameter n_timesteps with a small number like 1e4 and you will find there are much more than 1e4 samples according to the episodic lengths in the logs.

Thank you so much in advance!

Checklist

@cx441000319 cx441000319 added the question Further information is requested label Mar 14, 2023
@araffin
Copy link
Member

araffin commented Mar 14, 2023

Hello,
this is expected because of preprocessing for Atari games (the action repeat, aka frameskip, is set to 4 by default).

Related: DLR-RM/stable-baselines3#181

@cx441000319
Copy link
Author

Oh, that totally makes sense. I tried my best to check if there were any details I ignored, but I didn't realize it before. It's all clear now. Thank you so much for your quick reply!

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

No branches or pull requests

2 participants