tambetm / simple_dqn

Simple deep Q-learning agent.
MIT License
692 stars 184 forks source link

targets are not really copied when using cpu backend #30

Closed loofahcus closed 8 years ago

loofahcus commented 8 years ago

deepqnetwork.py#L133 should be: targets = preq.asnumpyarray().copy()

Since for cpu backend, asnumpyarray() seems just get the reference of numpy array, which causes the modifications of targets impacting preq.

tambetm commented 8 years ago

Thanks @loofahcus! I was aware of this, but forgot to include the fix in this repo.