Skip to content

Latest commit

 

History

History
29 lines (23 loc) · 1.03 KB

README.md

File metadata and controls

29 lines (23 loc) · 1.03 KB

Gym

Build Status

Julia wrapper for OpenAI Gym. Similar to this implementation, but using the DeepRL interface to make it easy to interact with deep reinforcement learning algorithms.

You can run an simulation, and save the results using the following:

step = 1
done = false
r_tot = 0.0

env = GymEnvironment("Breakout-v0") # initialize the environment
start_monitor(env, string("exp-", env.name)) # saves the results in exp-Breakout-v0/
o = reset(env) # reset the environment
na = n_actions(env)                                                  
dims = obs_dimensions(env)
while !done && step <= nsteps                                       
    action = sample_action(env)                                     
    obs, rew, done, info = step!(env, action)                       
    r_tot += rew
    step += 1
end 
close_monitor(env)