Skip to content

Randomly change the dynamic parameter in mujoco environment

Notifications You must be signed in to change notification settings

Hansooworld/mujoco-random-env

Repository files navigation

mujoco-random-env

Required Version

gym == 0.23.1
mujoco_py == 2.1.2.14
mujoco == 2.2.2

You can randomly change model's parameter (e.g. agent's mass, friction, ...) without any library.

You just need to insert randomness properties when you called the envrionment.

To randomly change the agent's mass,

  env = AntRandomEnvClass(rand_mass=[1,5], rand_fric=None, render_mode=None, VERBOSE=True)

To randomly change the friction together,

  env = AntRandomEnvClass(rand_mass=[1,5], rand_fric=[0.2, 1.0], render_mode=None, VERBOSE=True)

I also added the environment with the box to make available to apply meta reinforcement learning conveniently.
  env = AntRandomEnvClassWithBox(rand_mass_box=[1,5], rand_fric=None, render_mode=None, VERBOSE=True)

The agent with the box looks like the following image.

image

About

Randomly change the dynamic parameter in mujoco environment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published