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)