Code Monkey home page Code Monkey logo

Comments (1)

deshpandeshrinath avatar deshpandeshrinath commented on August 31, 2024

Hi lgplatero,

Thanks for the comments.
In DDPG, the actor-network tries to maximize the Q value with respect to action it takes.
Which means minimizing (- Q), i.e. negative of Q value predicted on the predicted action.
Thus, I have defined actor loss as,

self.actor_loss = -tf.reduce_mean(self.predicted_Q_on_predicted_current_action)

Here, we take the mean Q value of the batch and maximize it by minimizing (- Q_mean).
for each update, we calculate the actor gradients, which is dQ/du (partial diff of Q w.r.t. actor params) given by,

self.actor_grads = tf.gradients(self.actor_loss, self.actor.trainable_vars).

For more details, I have written a blog that you can refer; https://deshpandeshrinath.github.io/blog/2018/05/05/DDPG.

Also, I have some better results after tuning the params for half-cheetah (https://www.youtube.com/watch?v=qU8Nd9lyxlw) and post on medium about it.
(https://medium.com/@deshpandeshrinath/how-to-train-your-cheetah-with-deep-reinforcement-learning-14855518f916)

Feel free to ask questions or to suggest the feedback.
Thanks

from deepdgp.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.