Created
January 4, 2019 22:50
-
-
Save olegsinavski/291fe311854f2870a180c8fb765eb891 to your computer and use it in GitHub Desktop.
Run RL wtih openai baselines
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import baselines.common.cmd_util as butils | |
import baselines.ppo2.ppo2 as ppo | |
import gym | |
import bc_gym_planning_env | |
if __name__ == '__main__': | |
# https://github.com/openai/baselines | |
env = butils.make_vec_env( | |
env_id='EgoCostmapAsImgRandomTurnRoboPlanning-v0', | |
env_type='robo_planning', | |
num_env=1, | |
seed=0, | |
flatten_dict_observations=True | |
) | |
env.reset() | |
env.step(env.action_space.sample()) | |
model = ppo.learn( | |
network='mlp', | |
env=env, | |
total_timesteps=20 | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment