openai / gym

A toolkit for developing and comparing reinforcement learning algorithms.
https://www.gymlibrary.dev
Other
34.52k stars 8.59k forks source link

How to modify the reward function for mountaincar-v0? #1468

Closed FassyGit closed 5 years ago

FassyGit commented 5 years ago

Hi, I want to modify the MountainCar-v0 env, and change the reward for every time step to 0. Is there any way to do this? Thanks!

christopherhesse commented 5 years ago

Yep, just change this line to have reward 0: https://github.com/openai/gym/blob/master/gym/envs/classic_control/mountain_car.py#L54

You'll want to clone the gym repo, do pip install -e gym and then make your changes locally.