Add openmanipulator simulation environment agent (#50)

This commit is contained in:
Whi Kwon
2019-05-03 21:25:15 +09:00
committed by GitHub
parent 16ae4375c9
commit c1f348775e
32 changed files with 1187 additions and 173 deletions
+9 -6
View File
@@ -56,16 +56,19 @@ def main():
"""Main."""
# env initialization
env = gym.make("LunarLanderContinuous-v2")
state_dim = env.observation_space.shape[0]
action_dim = env.action_space.shape[0]
# set a random seed
common_utils.set_random_seed(args.seed, env)
# run
module_path = "examples.lunarlander_continuous_v2." + args.algo
example = importlib.import_module(module_path)
example.run(env, args, state_dim, action_dim)
module_path = "config.agent.lunarlander_continuous_v2." + args.algo
agent = importlib.import_module(module_path)
agent = agent.get(env, args)
# run
if args.test:
agent.test()
else:
agent.train()
if __name__ == "__main__":