From 3eb938e0de145ad9aed521dc3789e6a87845670a Mon Sep 17 00:00:00 2001 From: Marcel Date: Tue, 3 Aug 2021 16:51:54 +0200 Subject: [PATCH 1/2] Introduce short version of the continuous mountain car env --- alr_envs/__init__.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/alr_envs/__init__.py b/alr_envs/__init__.py index 5a92082..e9c09db 100644 --- a/alr_envs/__init__.py +++ b/alr_envs/__init__.py @@ -191,6 +191,14 @@ register( } ) +# Short Continuous Mountain Car +register( + id="MountainCarContinuous-v1", + entry_point="gym.envs.classic_control:Continuous_MountainCarEnv", + max_episode_steps=100, + reward_threshold=90.0, +) + # Motion Primitive Environments ## Simple Reacher @@ -817,10 +825,10 @@ register( ## Open AI register( - id='ContinuousMountainCarDetPMP-v0', + id='ContinuousMountainCarDetPMP-v1', entry_point='alr_envs.utils.make_env_helpers:make_detpmp_env_helper', kwargs={ - "name": "gym.envs.classic_control:MountainCarContinuous-v0", + "name": "alr_envs:MountainCarContinuous-v1", "wrappers": [open_ai.classic_control.continuous_mountain_car.MPWrapper], "mp_kwargs": { "num_dof": 1, From f54025406bfc5acf3bed9637fbe94b89969b0091 Mon Sep 17 00:00:00 2001 From: ottofabian Date: Wed, 25 Aug 2021 17:31:05 +0200 Subject: [PATCH 2/2] Added short mountain car --- alr_envs/open_ai/__init__.py | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/alr_envs/open_ai/__init__.py b/alr_envs/open_ai/__init__.py index b9e53b4..46fdbe6 100644 --- a/alr_envs/open_ai/__init__.py +++ b/alr_envs/open_ai/__init__.py @@ -5,8 +5,40 @@ from . import classic_control, mujoco, robotics ALL_GYM_MOTION_PRIMITIVE_ENVIRONMENTS = {"DMP": [], "DetPMP": []} +# Short Continuous Mountain Car +register( + id="MountainCarContinuous-v1", + entry_point="gym.envs.classic_control:Continuous_MountainCarEnv", + max_episode_steps=100, + reward_threshold=90.0, +) + # Open AI # Classic Control +register( + id='ContinuousMountainCarDetPMP-v1', + entry_point='alr_envs.utils.make_env_helpers:make_detpmp_env_helper', + kwargs={ + kwargs={ + "name": "alr_envs:MountainCarContinuous-v1", + "wrappers": [classic_control.continuous_mountain_car.MPWrapper], + "mp_kwargs": { + "num_dof": 1, + "num_basis": 4, + "duration": 2, + "post_traj_time": 0, + "width": 0.02, + "zero_start": True, + "policy_type": "motor", + "policy_kwargs": { + "p_gains": 1., + "d_gains": 1. + } + } + } +) +ALL_GYM_MOTION_PRIMITIVE_ENVIRONMENTS["DetPMP"].append("ContinuousMountainCarDetPMP-v1") + register( id='ContinuousMountainCarDetPMP-v0', entry_point='alr_envs.utils.make_env_helpers:make_detpmp_env_helper', @@ -16,7 +48,7 @@ register( "mp_kwargs": { "num_dof": 1, "num_basis": 4, - "duration": 2, + "duration": 19.98, "post_traj_time": 0, "width": 0.02, "zero_start": True,