-
Notifications
You must be signed in to change notification settings - Fork 77
creating new learning environments.md
Creating and adding a new environment to MACAD-Gym is easy.
Among other ways, the easiest way is to create a new environment is to simply copy and replicate an existing environment and change what you want and give it a new name. For example, to create a variation of this
UrbanSignalIntersection3Car
environment with continuous actions, you can copy this file, rename it (e.g.: urban_signal_intersection_3c_continuous.py
) and edit the following line:
and set "discrete_actions": False
.
That's it!
You can give this environment a new name (e.g.: UrbanSignalIntersection3CarContinuous
) by registering this new environment with it's name like the existing discrete environment shown below:
The last step is to add it to the list of available environments here:
You can then just use: gym.make("UrbanSignalIntersection3CarContinuous-v0")
in your code!