JuliaML / Reinforce.jl

Abstractions, algorithms, and utilities for reinforcement learning in Julia
Other
201 stars 35 forks source link

undefined function in CartPole environment #45

Closed felixchalumeau closed 4 years ago

felixchalumeau commented 4 years ago

Not sure that the function state(env) is defined in line 50 & 70 of the CartPoleEnv module. It should probably replaced by env.state ! Am I wrong ?

Reinforce.jl/src/envs/cartpole.jl

iblislin commented 4 years ago

https://github.com/JuliaML/Reinforce.jl#environment-interface The state function is the standard interface of a AbstractEvnironment, so you do not need to replace them.

felixchalumeau commented 4 years ago

It raises ERROR: LoadError: UndefVarError: state not defined

We should then consider adding state in the imports at the beginning of the module: At this point, we have: import Reinforce: reset!, actions, finished, step! and we should move to: import Reinforce: reset!, actions, finished, step!, state

iblislin commented 4 years ago

Ah, you're right. Could you send a PR about this issue?

felixchalumeau commented 4 years ago

yes !