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)
上一篇 2022年6月28日 下午10:36
下一篇 2022年6月28日 下午10:46


相关推荐

  • 【python】画折线图

    【python】画折线图一个简单的折线图 画折线图至少需要 2 个列表 横坐标列表和纵坐标列表 两个坐标的位置一一对应 frompylabimp mpl rcParams font sans serif SimHei x axis data 1 2 3 4 5 y axis data 1 2 3 4 5 plot 中参数的含义分别是横轴值 纵轴值 颜色

    2026年3月16日
    2
  • python字符串匹配开头_对python 匹配字符串开头和结尾的方法详解

    python字符串匹配开头_对python 匹配字符串开头和结尾的方法详解1、你需要通过指定的文本模式去检查字符串的开头或者结尾,比如文件名后缀,URLScheme等等。检查字符串开头或结尾的一个简单方法是使用str.startswith()或者是str.endswith()方法。比如:>>>filename=’spam.txt’>>>filename.endswith(‘.tx…

    2022年7月15日
    20
  • Java基础算法详解

    Java基础算法详解查找和排序算法是算法的入门知识,其经典思想可以用于很多算法当中。因为其实现代码较短,应用较常见。所以在面试中经常会问到排序算法及其相关的问题。但万变不离其宗,只要熟悉了思想,灵活运用也不是难事。一般在面试中最常考的是快速排序和归并排序,并且经常有面试官要求现场写出这两种排序的代码。对这两种排序的代码一定要信手拈来才行。还有插入排序、冒泡排序、堆排序、基数排序、桶排序等。面试官对于这些排序可能会…

    2022年7月8日
    19
  • 开箱即用的AI Agent!国内首个OpenClaw中文版 Molili大更新

    开箱即用的AI Agent!国内首个OpenClaw中文版 Molili大更新

    2026年3月16日
    2
  • 服务器网络io性能_服务器热备份方案

    服务器网络io性能_服务器热备份方案介质(HDD/SSD)接口sata/scsicontroller,raid卡or南桥,是否有缓存文件系统xfs,或其他brtfs之类的磁盘队列算法deadlinecfqnoopdm内存缓存设置RAID形式性能RAID0磁盘空间使用率:100%,故成本最低。读性能:N单块磁盘的读性能。写性能:N单块磁盘的写性能。冗余:无,任何一块磁盘损坏都将导致数据不可用…

    2026年2月1日
    3
  • Sql Prompt安装图文教程「建议收藏」

    Sql Prompt安装图文教程「建议收藏」一、概念SQLPrompt是一款拥有SQL智能提示功能的SQLServer和VS插件。SQLPrompt能根据数据库的对象名称,语法和用户编写的代码片段自动进行检索,智能的为用户提供唯一合适的代码选择。自动脚本设置为用户提供了简单的代码易读性–这在开发者使用的是不大熟悉的脚本时尤其有用。SQLPrompt是立即可用的且能极大的提高生产率。…

    2022年7月14日
    101

发表回复

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

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