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

Max running time for one iteration #102

Open
joistick11 opened this issue Mar 27, 2017 · 3 comments
Open

Max running time for one iteration #102

joistick11 opened this issue Mar 27, 2017 · 3 comments

Comments

@joistick11
Copy link

Hi

I am using env = normalize(GymEnv("CartPole-v0")) to create an environment. It works well, but all the visualizations lasts maximum for 5 seconds and after that they stop even if the pole was in the vertical state.
Can I change this behaviour somehow?

Thanks.

@dementrock
Copy link
Member

By default, visualization only happens when video is being recorded. What behavior do you want to change it to? Always showing video or never?

@joistick11
Copy link
Author

I think my question is deeper. I am okay that video is being shown every "perfect cube number". I actually want to change the maximum reward the agent may achieve (by default it is only 200). So in that way the episodes will be longer.
It would be perfect if I can set the goal of balancing for 20 seconds to complete the learning. Please note that I am using gym environment.

@dementrock
Copy link
Member

@joistick11 In that case, you will probably need to modify attributes of the constructed gym environment. By default it's the cartpole env wrapped in a TimeLimit class (see https://github.com/openai/gym/blob/d337f4e5719bb8b49f2f9fba1501fe7749fa4d5c/gym/wrappers/time_limit.py)

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

No branches or pull requests

2 participants