Skip to content

FluxML/Gym.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gym.jl

Gym environments in Julia

Installation

julia> ] add https://github.com/tejank10/Gym.jl

Usage

env = CartPoleEnv()
ctx = Ctx(env)

display(ctx.s)

# using Blink # when not on Juno
# body!(Blink.Window(), ctx.s)

actions = rand(1:2, 1000)
i = 1
done = false
reset!(env)
while i <= length(actions) && !done
    global i, done
    a, b, done, d = step!(env, actions[i])
    render(env, ctx)
    i += 1
    # sleep(0.4) # to see an animation
end

About

Gym environments in Julia

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages