Git Product home page Git Product logo

Comments (7)

cteckwee avatar cteckwee commented on June 19, 2024 16

Try to unwrap the env
env = env.unwrapped

from dqn-tensorflow.

Lan1991Xu avatar Lan1991Xu commented on June 19, 2024 12

Hi, you can just pip install gym==0.7.0 solve this problem. This is because new gym 0.8.0 released and it is hard to use for this code.

from dqn-tensorflow.

scratch314 avatar scratch314 commented on June 19, 2024 3

Only Breakout can be applied.
Try the following code.

def init(self, config):
self.step_info = None

def _step(self, action):
self._screen, self.reward, self.terminal, self.step_info = self.env.step(action)

def lives(self):
if self.step_info is None:
return 0
else:
return self.step_info['ale.lives']

from dqn-tensorflow.

tangyudi avatar tangyudi commented on June 19, 2024

@Lan1991Xu Thanky you!
Can I test with this check point? When I use python main.py --is_train=False --display=True,it occur a load failed error.

from dqn-tensorflow.

DanielTakeshi avatar DanielTakeshi commented on June 19, 2024

I'm also running into this problem. How would we use this for the latest version of gym?

from dqn-tensorflow.

fanyuzeng avatar fanyuzeng commented on June 19, 2024

How to solve this problem? I try pip install gym==0.7.0, but it failed. In addition, I try the following code in main.py , it also failed.

def init(self, config):
self.step_info = None

def _step(self, action):
self._screen, self.reward, self.terminal, self.step_info = self.env.step(action)

def lives(self):
if self.step_info is None:
return 0
else:
return self.step_info['ale.lives']

from dqn-tensorflow.

mumbho avatar mumbho commented on June 19, 2024

I have the same issue; tried to revert gym to 0.7.4 and 0.7.3 (from repo) but then atari games will render as text. I've tried with other gym versions as well. I can only render atari envs using the latest version, but then dqn breaks. Any solution is greatly appreciated.
When using latest gym version, tried to unwrap env as suggested, got into another issue:
in /home/me/work/bitbucket/NeuralNetworks/My/dependencies/gym/gym/wrappers/time_limit.py
error: Cannot call env.step() before calling reset()

from dqn-tensorflow.

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.