Comments (6)
I've only been playing with the 'CartPole-v0' environment so far, and that has an action_space
of spaces.Discrete(2)
which led me to my comment.
I wonder if making Env.step()
have action=None
as a default could work, letting the environment complain if it can't accept it. The API would be more general this way, and the potential for API misuse by either environment users or environment authors seems low.
Alternatively, 'CartPole-v0' could just be changed to take a Box
action_space
instead of a Discrete
one, although it feels like this particular environment might have been purposefully made to not take variable force values.
Good to know about the mujoco environments utilizing a notion of "effort" through the reward
returned, thanks.
from gym.
This seems like it's mostly a semantic issue with env action spaces. In some envs, "not acting" is meaningless -- take board games like Chess or Go (the latter we have as an env already) for example: if it's your turn, you can't meaningfully choose to "not act".
Also, efficiency/effort are ill-defined concepts whose semantics depend on the env. In fact, what you propose is already implemented in some envs. For example, the mujoco envs penalize you (i.e. reduce reward) based on the joint torques that you specify, i.e. what could intuitively be described as the "effort".
So it seems like this is a per-env semantic issue. We're happy about proposals for definitions of efficiency for specific envs, though!
from gym.
In (I think) all the physics environments the actions are converted to torques, so a vector of 0s is a reasonable least-effort action. That might not be obvious from the action_space
, which usually is a Box
with low=[-1, ...]
and high=[+1, ...]
.
from gym.
The feedback makes sense; thanks for the input!
This isn't part of the standard formulation of RL, so I think for now we shouldn't add it (and I'm not sure if it'd make sense for every env). I'm going to close for now, but if we see more demand for something like this, we'll revisit!
from gym.
@gdb so you wanna say this issue was never resolved?
Yea 4 years later, please add option to stay still in 'CartPole-v1',
or just help to figure out how to make it possible, this also will be really appreciated.
This option really integral for development of Event-Triggered Control RL systems,
I would say this would help a lot making this Cart Pole a benchmark for those applications.
from gym.
@gdb I came across the same problem when I want to add additional actions for "Taxi" environment, I want to add diagonal movements to the grid world, however, it is not possible to perform such action when agent is on the edge of the grid, thus, whether I need to create my custom env or use a "NOOP" action and pass it to env.step() function to see the observation and etc.
from gym.
Related Issues (20)
- [Question] Question title
- [Bug Report] mujoco rendering is not deterministic HOT 1
- [Question] How can I install gym[classic_control] on Windows 11 pipenv? HOT 2
- [Proposal] Initial State Tracking - Bipedal Walker Hardcore
- [Question] Why are we allowing preset deterministic policies on the leaderboard? HOT 2
- [Bug Report] Env force_mag can not be changed in cartpole HOT 1
- I am using DDPG. I trained the agent successfully. Now, I need to specify all action using all_actions = np.array(history.history['action']). But, it looks like there is no action recorded in history object. Any help and advice would be much appreciated.
- [Question] Is it possible that I turn off the auto reset of `step_wait()` function? HOT 1
- setup.py in https://www.gymlibrary.dev/content/environment_creation/#make-your-own-custom-environment
- [Question] Open source code for Montezuma Revenge
- Juputer notebook Kernel Dead After running any gym method
- [Bug Report] Vector env return value HOT 1
- Deepcopy env not working as expected HOT 6
- Segmentation Fault while trying to run Rviz in a wsl enviorment using VcXsrv HOT 1
- Is there any tools for changing the hyperparameter of the mujoco environment? HOT 1
- [Question] Modifying and Analyzing mujoco's qpos and qvel HOT 1
- installing gym[toy_text] bug HOT 1
- Could not find platform dependent libraries and kernel always busy. Im waiting and kernel still busy but my energyplus was completed succesfully. HOT 4
- Env.reset () is error HOT 2
- [Bug Report] Getting Error from "D:\PongDQN_RL\venv\lib\site-packages\gym\wrappers\compatibility.py" HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gym.