Skip to content
This repository has been archived by the owner on May 21, 2022. It is now read-only.

Speed part 3 #13

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Prev Previous commit
Add PyNULL() for pytplres in GymEnv Constructor
oopsie daisy : D - was quite broken without this
  • Loading branch information
JobJob committed Oct 4, 2018
commit 7af1c05f8ed93b5c25eae2e5f0d8552c718a8622
7 changes: 3 additions & 4 deletions src/OpenAIGym.jl
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ import Reinforce:
KeyboardAction, KeyboardActionSet

export
gym,
pygym,
GymEnv,
test_env,
PyAny
@@ -37,9 +37,9 @@ mutable struct GymEnv{T} <: AbstractGymEnv
total_reward::Float64
actions::AbstractSet
done::Bool
function GymEnv{T}(name, pyenv, pystate, state) where T
function GymEnv{T}(name, pyenv, pystate, state::T) where T
env = new{T}(name, pyenv, pyenv["step"], pyenv["reset"],
pystate, PyNULL(), PyNULL(), state)
pystate, PyNULL(), PyNULL(), PyNULL(), state)
reset!(env)
env
end
@@ -54,7 +54,6 @@ function GymEnv(name; stateT=PyArray)
else
GymEnv(name, pygym[:make](name), stateT)
end
reset!(env)
env
end