DDPG Project「建议收藏」

DDPG Project「建议收藏」1.RememberthedifferencebetweentheDQNandDDPGintheQfunctionlearningisthattheTarget’snextMAXQvalueisestimatedbytheactor,notthecriticitself.(Incontinuousactionspace,the…

大家好,又见面了,我是你们的朋友全栈君。

1. Remember the difference between the DQN and DDPG in the Q function learning is that the Target’s next MAX Q value is estimated by the actor, not the critic itself. (In continuous action space, the critic cannot estimate the MAX Q value without optimization. So the best choice is to use actor directly gives the BEST action.)

 

The code of 1st pic is wrong:

71: the critic_target network is to output the maximum Q value based on the estimation of actor_target network, so there is no need once more max operation (But in DQN we do need that max operation because in DQN the next Max Q value is directly estimated by critic_target itself (Q value function).)

72. the critic (Q function) in DDPG can directly output the relative input action Q value, so there is not need to gather the action index relative Q value.

74. Because optimizer will accumulate the gradient values. so use optimizer.zero_grad() to clear it.(instead of network.zero_grad)

75. Optimizer should call the step() function for backward the error.

. Do not forget to add the determination of final state: 1- dones.

DDPG Project「建议收藏」

DDPG Project「建议收藏」

 

 

79. In the actor learning part, the input actions of the critic_local is not the sample action, is the action estimated by actor. (Be careful with that). Also, it should calculate the mean of it. Finally, we want to maximize the performance but the optimizer is used to minimize object, so we have to set the negative sign.

DDPG Project「建议收藏」

In the soft_update, remember to use the attributes of the data to copy. 

DDPG Project「建议收藏」

DDPG Project「建议收藏」

 

 

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/148618.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • C++和java的区别和联系「建议收藏」

    C++和java的区别和联系「建议收藏」最近在看C++和java的基础知识,对它们面向对象编程的概念还不是很了解,但觉得它们之间有很多相通的地方,现在java比较热门,觉得使用java的框架可以做很多很多事情,而对C++的认识只知道在游戏开发上面用的比较多,自己接触编程还是太少,想要一点一点地积累进步,需要向很多大神和牛人学习经验。

    2022年7月7日
    30
  • J2EE之ServletContext读取资源文件

    J2EE之ServletContext读取资源文件

    2022年2月3日
    50
  • java栈的使用_用java实现栈结构

    java栈的使用_用java实现栈结构Stack的基本使用初始化Stackstack=newStack判断是否为空stack.empty()取栈顶值(不出栈)stack.peek()进栈stack.push(Object);出栈stack.pop();实例:publicclassTest01{publicstaticvoidmain(String[]args){…

    2025年9月21日
    7
  • python画等边三角形_四边形的画法

    python画等边三角形_四边形的画法python是编程语言,学习它只是因为要搞深度学习,其实语言类只要精通一种即可,但一定是精通,像我就是啥都知道,啥都不精,到最终一事无成。在学Python的时候,无意间看到网上有小游戏开发,于是乎就想自己调试下。第一个接触的例程是画国旗的。画国旗必然要画框,画框也就是画四边形,要画五角星,而五角星就是也是由三角形组成的,因此画一面很完美的五星红旗,则基础需要画四边形和三角形。OK,让我们一起来玩

    2022年9月19日
    4
  • singleTask和startActivityResult「建议收藏」

    singleTask和startActivityResult「建议收藏」在稍微复杂点的项目中都有过singleTask、singleInstance,避免打开同一个Activity返回的时候A返回以后还是A吧,对A在AndroidManifest里面设置android:launchMode=”singleTask”即可避免这个问题,但是发现用startActivityResult的时候A跳转到B,在B里面setResult以后在A里面拿到的resultcode不是自己

    2022年6月26日
    21
  • laravel拓展validator验证

    laravel拓展validator验证

    2021年10月26日
    52

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号