Tensorforce Problems
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
## tensorforce_agent.py | |
# This code breaks immediately here with "Unknown Gym Environment" | |
env = gym.make("my_gm:level-v0") | |
environment = Environment.create(environment='gym', level=env, max_episode_timesteps=1000) | |
## it works fine as shown int his file. :/ | |
class RandomAgent(object): | |
"""The world's simplest agent!""" | |
def __init__(self, action_space): | |
self.action_space = action_space | |
def act(self, observation, reward, done): | |
return self.action_space.sample() | |
if __name__ == '__main__': | |
logger.set_level(logger.INFO) | |
env = gym.make("my_gym:level-v0") | |
outdir = '/tmp/random-agent-results' | |
env = wrappers.Monitor(env, directory=outdir, force=True) | |
agent = RandomAgent(env.action_space) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment