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)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • laravel 中配置文件.env解读

    laravel 中配置文件.env解读laravel 中配置文件.env解读

    2022年4月24日
    47
  • 我是如何从零开始 Web 前端自学之路的?

    我是如何从零开始 Web 前端自学之路的?作者|六小登登责编|屠敏从2013年专科毕业开始,一路跌跌撞撞走了很多弯路,做过餐厅服务员,进过工厂干过流水线,做过客服,干过电话销售可以说经历相当的“丰富”…

    2022年5月20日
    34
  • linux内存不足导致tomcat宕机

    linux内存不足导致tomcat宕机情况,正常运行的服务器,突然tomcat不能访问了因为服务器的内存是2g的,所以就怀疑是内存不够了,所导致开始排查ps-ef|greptomcat[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-TTLyQ5EC-1585835537446)(E:\Workspaces\Markdown\linux\记一次内存不够的情况.assets\image-…

    2022年7月23日
    6
  • python多任务—协程(一)

    python多任务—协程(一)写在前面:花了一周的时间,对协程做了一个简单的梳理,特别是异步编程asyncio库的使用,做了详细的说明。本文主要包括的知识点有:yield生成器的复习并实现协程的功能、greenlet库实现协程、gevent库实现协程、asyncio异步协程的介绍、异步协程的创建与运行、任务的创建与运行、并发运行gather/wait/as_complete/wait_for等方法的实现、异步协程的嵌套、aw…

    2022年7月12日
    15
  • 什么是泛型

    什么是泛型//泛型:就是一种不确定的数据类型。//比如:ArrayList<E>E就是泛型。这种不确定的数据类型需要在使用这个类的时候才能够确定出来。//泛型可以省略,如果省略,默认泛型是Object类型。//泛型的好处://1.省略了强转的代码。//2.可以把运行时的问题提前到编译时期。publicclassDemo01Generic{…

    2022年6月29日
    29
  • java 下对字符串的格式化

    java 下对字符串的格式化

    2021年5月6日
    150

发表回复

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

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