Add `reward` and `observation` arguments to env.reset()
See original GitHub issue🚀 Feature
The CompilerEnv constructor accepts a pair of arguments reward_space
and observation_space
. We should add those to env.reset()
, same as specifying the benchmark.
Motivation
Because this feels like a clumsy API:
env.reward_space = "Foobar"
env.reset(benchmark="benchmark://foo-v0/abc")
Pitch
Allow:
env.reset(benchmark="benchmark://foo-v0/abc", reward_space="Foobar")
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Passing arguments to env.reset() function without modifying ...
Hi, I need to pass some args when reseting my gym environment (wrapped by GymEnvWrapper) at the begin of the evaluation phase and...
Read more >Getting Started With OpenAI Gym: The Basic Building Blocks
The reset function returns four things: observation : The observation of the state of the environment. reward : The reward that you can...
Read more >Environments • reinforcelearn - markusdumke
reset() : Resets the environment, i.e. it sets the state attribute to a starting state and sets the done flag to FALSE ....
Read more >How to set a openai-gym environment start with a specific ...
How can I tell the gym.env that I want set the initial observation as ns and let the agent know the specific start...
Read more >Reinforcement Learning: Creating a Custom Environment
reset() : Resets all state-based environment variables to their initial state and returns the initial observation. step() : Defines what the ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This seems good to me. Alternatively, we could use python’s ellipsis
...
as this special placeholder, or just the string"same"
. Personally I prefer just"same"
because it’s simple, explicit, easy to understand, and immutable which makes it a good choice as the default value.I’m also not sure I like the default being the string
"same"
, as it doesn’t feel particularly self-documenting, and prevents the (unlikely) use of the name “same” with observation/reward spaces.I would suggest adding a new enum to compiler_gym/util/gym_type_hints.py
The
OptionalArgumentValue.UNCHANGED
could be used as the default value and checked for using:Cheers, Chris