Giter Site home page Giter Site logo

Comments (12)

pseudo-rnd-thoughts avatar pseudo-rnd-thoughts commented on June 3, 2024

Could you provide a minimal working example to test with?
It is unclear from your stack trace what the issue is

from gym.

creativekids11 avatar creativekids11 commented on June 3, 2024

PongDQN_RL.zip
This is the code (02_dqn_pong.py) to train (where the error occured)

from gym.

creativekids11 avatar creativekids11 commented on June 3, 2024

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.

pseudo-rnd-thoughts avatar pseudo-rnd-thoughts commented on June 3, 2024

If you using gym v0.26.2 and the latest atari version then you shouldn't be using apply_api_compatibility

from gym.

creativekids11 avatar creativekids11 commented on June 3, 2024

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.

creativekids11 avatar creativekids11 commented on June 3, 2024

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.

creativekids11 avatar creativekids11 commented on June 3, 2024

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.

pseudo-rnd-thoughts avatar pseudo-rnd-thoughts commented on June 3, 2024

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.

creativekids11 avatar creativekids11 commented on June 3, 2024

I managed to fix this error but now the input format is not approving, to the model.

from gym.

creativekids11 avatar creativekids11 commented on June 3, 2024

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.

pseudo-rnd-thoughts avatar pseudo-rnd-thoughts commented on June 3, 2024

There are a host of projects that implement DQN for you to see: CleanRL, Stablebaselines3, Tianshou, etc

from gym.

creativekids11 avatar creativekids11 commented on June 3, 2024

CleanRL docs was very helpful, thanks: https://docs.cleanrl.dev/rl-algorithms/dqn/

from gym.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.