项目作者: sash-a

项目描述 :
Locomotion HRL envs in pybullet
高级语言: Python
项目地址: git://github.com/sash-a/hrl_pybullet_envs.git
创建时间: 2021-02-21T12:40:26Z
项目社区:https://github.com/sash-a/hrl_pybullet_envs

开源协议:GNU General Public License v3.0

下载


Hierarchical Reinforcement envs in pybullet

This package was created because all of the HRL locomotion envs are only available in mujoco. This is an implementation of as many as possible in pybullet.

Install

pip install pybullet hrl_pybullet_envs
This project requires pybullet-gym which must be installed along side this package.

Envs:

  • AntGatherBulletEnv-v0
  • AntMazeBulletEnv-v0
  • AntMjBulletEnv-0
  • AntFlagrunBulletEnv-v0
  • PointGatherBulletEnv-v0

Example

Also see this notebook

  1. import hrl_pybullet_envs
  2. import gym
  3. import numpy as np
  4. env = gym.make('AntGatherBulletEnv-v0')
  5. env.render()
  6. ob = env.reset()
  7. tot_rew = 0
  8. for i in range(1000):
  9. # Take random actions
  10. ob, rew, done, _ = env.step(np.random.uniform(-1, 1, env.action_space.shape))
  11. tot_rew += rew
  12. if done: break
  13. print(f'Achieved total reward of: {tot_rew}')