fixed hole width for HoleReacher-v1

This commit is contained in:
ottofabian
2021-06-24 11:39:59 +02:00
parent 4c334b1129
commit ed75d565e2
2 changed files with 19 additions and 3 deletions
+18
View File
@@ -86,3 +86,21 @@ class ALRReacherEnv(MujocoEnv, utils.EzPickle):
# self.get_body_com("target"), # only return target to make problem harder
[self._steps],
])
if __name__ == '__main__':
nl = 5
render_mode = "human" # "human" or "partial" or "final"
env = ALRReacherEnv(n_links=nl)
obs = env.reset()
for i in range(2000):
# objective.load_result("/tmp/cma")
# test with random actions
ac = env.action_space.sample()
obs, rew, d, info = env.step(ac)
if i % 10 == 0:
env.render(mode=render_mode)
if d:
env.reset()
env.close()