keon / deep-q-learning

Minimal Deep Q Learning (DQN & DDQN) implementations in Keras
https://keon.io/deep-q-learning
MIT License
1.28k stars 454 forks source link

Batch updates and huber loss def #19

Closed pskrunner14 closed 6 years ago

pskrunner14 commented 6 years ago

Implemented training on batches in dqn.py as it results in less training time. Fixes #18. Although degrades performance in ddqn.py not sure why.

Fixed Huber Loss def in ddqn.py as described in TensorFlow docs: https://www.tensorflow.org/api_docs/python/tf/losses/huber_loss

pskrunner14 commented 6 years ago

@keon I'd appreciate any feedback on the PR. Thanks :)

keon commented 6 years ago

Sorry for the late review. @pskrunner14 I am a little hesitant to merge this PR because I wanted to keep the example at its simplest form, not the most efficient form - for the efficient implementation ppl can take a look at the OpenAI's baseline. Could you add one more file called dqn_batch.py for this?

pskrunner14 commented 6 years ago

@keon added dqn_batch.py