Comments (12)
Could you provide a minimal working example to test with?
It is unclear from your stack trace what the issue is
from gym.
PongDQN_RL.zip
This is the code (02_dqn_pong.py) to train (where the error occured)
from gym.
BTW, pytorch with version 2.2.0 cuda 11.8 is also installed in the same env. IDK if it can cause any problem.
from gym.
If you using gym v0.26.2 and the latest atari version then you shouldn't be using apply_api_compatibility
from gym.
If you using gym v0.26.2 and the latest atari version then you shouldn't be using
apply_api_compatibility
Didn't work after removing it
from gym.
The error changed to:
E:\PongDQN_RL\venv\lib\site-packages\gym\utils\passive_env_checker.py:233: DeprecationWarning: np.bool8
is a deprecated alias for np.bool_
. (Deprecated NumPy 1.24)
if not isinstance(terminated, (bool, np.bool8)):
Traceback (most recent call last):
File "E:\PongDQN_RL\02_dqn_pong.py", line 141, in
agent = Agent(env, buffer)
File "E:\PongDQN_RL\02_dqn_pong.py", line 63, in init
self._reset()
File "E:\PongDQN_RL\02_dqn_pong.py", line 66, in _reset
self.state, _ = self.env.reset()
File "E:\PongDQN_RL\venv\lib\site-packages\gym\core.py", line 379, in reset
obs, info = self.env.reset(**kwargs)
File "E:\PongDQN_RL\lib\wrappers.py", line 117, in reset
return self.observation(self.env.reset())
File "E:\PongDQN_RL\venv\lib\site-packages\gym\core.py", line 379, in reset
obs, info = self.env.reset(**kwargs)
File "E:\PongDQN_RL\venv\lib\site-packages\gym\core.py", line 379, in reset
obs, info = self.env.reset(**kwargs)
File "E:\PongDQN_RL\lib\wrappers.py", line 20, in reset
(obs, reward, terminated, truncated, info) = self.env.step(1)
ValueError: not enough values to unpack (expected 5, got 4)
from gym.
Have you got the error replicated with the code. Or else i can share name and versions of all the libraries for you to try in an venv.
from gym.
Can you make a minimal working example of the code with the bug, there is too much for me to look through.
Try testing commenting out a wrapper each time to see which one causes the issue
from gym.
I managed to fix this error but now the input format is not approving, to the model.
from gym.
Could you kindly provide me with an latest code with dqn which can solve pong. As there are no updates online, plus no available latest code.
from gym.
There are a host of projects that implement DQN for you to see: CleanRL, Stablebaselines3, Tianshou, etc
from gym.
CleanRL docs was very helpful, thanks: https://docs.cleanrl.dev/rl-algorithms/dqn/
from gym.
Related Issues (20)
- [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
- [Question] Custom dtype in observation space
- [Bug Report] pusher-v4 in the environment doesn't collide the object for the fork HOT 1
- [Question] How to verify who is the winner of a game? HOT 3
- [bug] OpenAI gym set_level(50) not disabling logs HOT 1
- [Bug Report] Humanoidv4 doesnt include contact_cost in code, but still present in documentation HOT 4
- [Question] I am implementing a DQN on Atari. I have some shape related problems. HOT 1
- [Question] MUJOCO environment info ERROR in the gym documentation website HOT 2
- [Question] How do I edit the leaderboard? HOT 1
- [Question] AsyncVectorEnv getting hung up as `pip.recv()` not returning anything for `_check_observation_spaces` HOT 4
- [Question] Question title
- gym.error.UnregisteredEnv: No registered env with id: meme-v0 HOT 1
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.