https://github.com/fluxml/gym.jl
Gym environments in Julia
https://github.com/fluxml/gym.jl
Last synced: 7 months ago
JSON representation
Gym environments in Julia
- Host: GitHub
- URL: https://github.com/fluxml/gym.jl
- Owner: FluxML
- License: mit
- Created: 2019-01-30T17:39:57.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-04-30T12:43:20.000Z (about 6 years ago)
- Last Synced: 2025-11-21T22:02:13.894Z (7 months ago)
- Language: Julia
- Homepage:
- Size: 141 KB
- Stars: 54
- Watchers: 5
- Forks: 19
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Gym.jl
Gym environments in Julia
**`Gym.jl` is a work in progress and in active development. Expect breaking changes for some time.**
**`Gym.jl` requires Julia v1.1**
# Installation
```julia
julia> ] add https://github.com/FluxML/Gym.jl
```
## Usage
```julia
env = make("CartPole-v0", :human_pane)
actions = [sample(env._env.action_space) for i=1: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)
i += 1
end
```
## Currently available environments
* CartPole
* Pendulum
* Continuous_MountainCar