carpedm20 / deep-rl-tensorflow

TensorFlow implementation of Deep Reinforcement Learning papers
MIT License
1.6k stars 396 forks source link

can't run in my pc #25

Closed dave-yxw closed 7 years ago

dave-yxw commented 7 years ago
Traceback (most recent call last):
  File "main.py", line 168, in 
    tf.app.run()
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 48, in run
    _sys.exit(main(_sys.argv[:1] + flags_passthrough))
  File "main.py", line 163, in main
    agent.train(conf.t_train_max)
  File "/home/ddy/workspace/deep-rl-tensorflow/agents/agent.py", line 67, in train
    observation, reward, terminal = self.new_game()
  File "/home/ddy/workspace/deep-rl-tensorflow/environments/environment.py", line 87, in new_random_game
    self.lives = self.env.ale.lives()
AttributeError: 'TimeLimit' object has no attribute 'ale'
dave-yxw commented 7 years ago

the command is : python main.py --double_q=True --network_output_type=dueling --env_name=Breakout-v0

I have installed scipy opencv tensorflow_1.0 gym[all]

dave-yxw commented 7 years ago

It seems TimeLimit object is a wrapper of AtariEvn,

change line 22 in file environment.py:

self.env = gym.make(env_name).env  # self.env = gym.make(env_name)

and it works