Skip to content

sisl/Gym.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

Releases

No releases published

Packages

 
 
 

Languages