devsisters / DQN-tensorflow

Tensorflow implementation of Human-Level Control through Deep Reinforcement Learning
MIT License
2.48k stars 763 forks source link

Agent.learning_rate is never set? #28

Closed halflings closed 7 years ago

halflings commented 7 years ago

I was reading through the code and couldn't figure out where Agent.learning_rate is being set. It's used here:

https://github.com/devsisters/DQN-tensorflow/blob/master/dqn/agent.py#L299

But it's only set on the Config object, not the Agent.

carpedm20 commented 7 years ago

It's quite weird but it is set here.

halflings commented 7 years ago

Thanks! Overall, this implementation is extremely useful to understand DQN, but one thing I don't like is that it's overly complex, with too many abstractions and abusing dynamic features of Python.

Having your config in a dict instead of explicit class attributes only makes the code harder to understand unfortunately.

carpedm20 commented 7 years ago

Yes, I agree on that. That's why I didn't used it in the more recent RL code https://github.com/carpedm20/deep-rl-tensorflow/blob/master/main.py and I never used those code style again.