spragunr / deep_q_rl

Theano-based implementation of Deep Q-learning
BSD 3-Clause "New" or "Revised" License
1.08k stars 348 forks source link

What is the memory requirement for this program #20

Closed gaoyuankidult closed 9 years ago

gaoyuankidult commented 9 years ago

I had an error while running python ale_run.py.
python ale_run.py However I encountered a memory error. I think the problem is because I don't have enough memory. So could you tell what is memory requirement for me to run this program ?

Traceback (most recent call last):
  File "./rl_glue_ale_agent.py", line 454, in <module>
    main()
  File "./rl_glue_ale_agent.py", line 450, in main
    AgentLoader.loadAgent(NeuralAgent())
  File "/usr/local/lib/python2.7/dist-packages/rlglue/agent/AgentLoader.py", line 58, in loadAgent
    client.runAgentEventLoop()
  File "/usr/local/lib/python2.7/dist-packages/rlglue/agent/ClientAgent.py", line 144, in runAgentEventLoop
    switch[agentState](self)
  File "/usr/local/lib/python2.7/dist-packages/rlglue/agent/ClientAgent.py", line 137, in <lambda>
    Network.kAgentInit: lambda self: self.onAgentInit(),
  File "/usr/local/lib/python2.7/dist-packages/rlglue/agent/ClientAgent.py", line 43, in onAgentInit
    self.agent.agent_init(taskSpec)
  File "./rl_glue_ale_agent.py", line 150, in agent_init
    phi_length=self.phi_length)
  File "/home/gao/Desktop/dqn/deep_q_rl/deep_q_rl/ale_data_set.py", line 38, in __init__
    self.states = np.zeros((self.capacity, height, width), dtype='uint8')
MemoryError
ashudeep commented 9 years ago

Quite evidently, your RAM is fully filled with the history the code is preserving. You can set the "max_history" argument while running ale_run to be lesser than the default value (=1000000) set in rl_glue_ale_agent.py

gaoyuankidult commented 9 years ago

@ashudeep thanks !

spragunr commented 9 years ago

The program uses around 10gigs of ram under the default settings.