samre12 / deep-trading-agent

Deep Reinforcement Learning based Trading Agent for Bitcoin
MIT License
749 stars 211 forks source link

TypeError: unhashable type: 'numpy.ndarray' #3

Closed trungtv closed 6 years ago

trungtv commented 6 years ago

Hello, I am running main.py and got the following error:

Traceback (most recent call last):
  File "main.py", line 36, in <module>
    main(vars(args)['file_path'])
  File "main.py", line 27, in main
    agent.train()
  File "deep-trading-agent/code/model/agent.py", line 70, in train
    screen, reward, terminal = self.env.act(action)
  File "deep-trading-agent/code/model/environment.py", line 62, in act
    if self.action_dict[action] is LONG:
TypeError: unhashable type: 'numpy.ndarray'

Could you tell me what goes wrong? Thanks

samre12 commented 6 years ago

Please clone the latest version of the repository. I have made the necessary changes. Hope it works now! 😄 Please ⭐️ the repository to show support if you like this work.

trungtv commented 6 years ago

Dear Samre, It works. Thanks very much. I am now waiting for "starting index and timestamp point selected..." quite a long way to go on my CPU only computer. How long does it take usually to finish training?

samre12 commented 6 years ago

There is currently an issue with the network and its training that results in the average q value for an action to converge to 0. I have also included this into ToDo tasks for the repository. I am currently working on improving this. However, convergence is reached within 50,000 steps. Any help provided over this issue is appreciated.