OPENAI GYM

What ?

  • An open-source toolkit for:
    • Developing
    • Comparing reinforcement learning algorithms
  • Teach your agents everything
    • Walking
    • Balance
    • Playing games like Pong or Go!

What else ?

  • Provides the environment
  • You provide the algorithm
  • Simple interface to reinforcement learning tasks
  • Use it from Python
  • Use libraries: TensorFlow & Theano

Agent-Environment Loop

SHOW ME THE CODE!

import gym                                                   # Library
    
env = gym.make('CartPole-v0')                                # Environment
for i_episode in range(20):                                  # Loop 
    observation = env.reset()                                # Get observation
    for t in range(100):
        env.render()
        action = env.action_space.sample()                   # Select an action
        observation, reward, done, info = env.step(action)   # Do it and get observation, reward
        if done:                                             # Is it over
            print("Episode finished")    
            break

gym.openai.com

Made with Slides.com