Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

openai gym random action

# load gym envirolment
import gym
env = gym.make('CartPole-v0')

env.reset()
for _ in range(300):
    env.render()
    env.step(env.action_space.sample()) # take a random action
env.close()
 
PREVIOUS NEXT
Tagged: #openai #gym #random #action
ADD COMMENT
Topic
Name
3+7 =