devsisters / DQN-tensorflow

Tensorflow implementation of Human-Level Control through Deep Reinforcement Learning
MIT License
2.48k stars 764 forks source link

AttributeError: 'TimeLimit' object has no attribute 'ale' #25

Closed minimok7 closed 7 years ago

minimok7 commented 7 years ago

Hi, I downloaded the codes, and then test it as it described here. However, I got this error as follows, I think, all requirements are installed except opencv2 and openAI gym was tested. I would appreciate that someone finds the cause and the solution.

Traceback (most recent call last): File "/DQN-tensorflow-master/main.py", line 69, in tf.app.run() File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 43, in run sys.exit(main(sys.argv[:1] + flags_passthrough)) File "/DQN-tensorflow-master/main.py", line 64, in main agent.train() File "/DQN-tensorflow-master/dqn/agent.py", line 40, in train screen, reward, action, terminal = self.env.new_random_game() File /DQN-tensorflow-master/dqn/environment.py", line 28, in new_random_game self.new_game(True) File "/DQN-tensorflow-master/dqn/environment.py", line 21, in new_game if self.lives == 0: File "/DQN-tensorflow-master/dqn/environment.py", line 52, in lives return self.env.ale.lives() AttributeError: 'TimeLimit' object has no attribute 'ale'

KingAndQueen commented 7 years ago

Could you share how did you solve this problem? I face the same error.

yulequan commented 7 years ago

I face the same error too.

Lan1991Xu commented 7 years ago

HI guys, just change the old gym 0.7.0

amrqura commented 7 years ago

pip install gym==0.7.0

Solve the problem.