Box2d initial, second attempt

This commit is contained in:
Oleg Klimov
2016-05-03 22:27:42 +03:00
parent 386096f60a
commit 3b19acdfce
7 changed files with 1009 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
import logging
import os
import os, sys
import gym
@@ -14,11 +14,11 @@ class RandomAgent(object):
if __name__ == '__main__':
# You can optionally set up the logger. Also fine to set the level
# to logging.DEBUG or logging.WARN if you want to change the
# amount of outut.
# amount of output.
logger = logging.getLogger()
logger.setLevel(logging.INFO)
env = gym.make('CartPole-v0')
env = gym.make('CartPole-v0' if len(sys.argv)<2 else sys.argv[1])
agent = RandomAgent(env.action_space)
# You provide the directory to write to (can be an existing