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

undefined function in CartPole environment #45

Closed
felixchalumeau opened this issue May 7, 2020 · 4 comments
Closed

undefined function in CartPole environment #45

felixchalumeau opened this issue May 7, 2020 · 4 comments

Comments

@felixchalumeau
Copy link
Contributor

felixchalumeau commented May 7, 2020

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
Copy link
Member

iblislin commented May 7, 2020

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
Copy link
Contributor Author

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
Copy link
Member

iblislin commented May 7, 2020

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

@felixchalumeau
Copy link
Contributor Author

yes !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants