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


相关推荐

  • undefined pthread_create_android studio has stopped

    undefined pthread_create_android studio has stopped最近在DebugAndroid工程时,发现真机直接崩溃闪退,但直接run则没问题,debug闪退日志报错:Dumpingallthreadswithoutappropriatelocksheld:threadlistlockmutatorlock,之前调试还是好好的,为什么突然就不行了呢?具体日志如下:12-0710:37:05.736:I/System

    2025年11月3日
    5
  • IDEA惊天bug:进程已结束,退出代码-1073741819 (0xC0000005)[通俗易懂]

    IDEA惊天bug:进程已结束,退出代码-1073741819 (0xC0000005)[通俗易懂]由于昨天要写的文章没有写完,于是今天早上我四点半就“自然醒”了,心里面有事,睡觉也不安稳。洗漱完毕后,我打开电脑,正襟危坐,摆出一副要干架的态势,不能再拖了。要写的文章中涉及到一串代码,关于Undertow的一个入门示例,贴出来大家看一下。publicclassUndertowTest{publicstaticvoidmain(finalString[]args)…

    2022年10月3日
    4
  • python 高中信息技术 会考_今年9月,8年级将新增Python课程,3-9年级以及新高一的信息技术课都有变化···…[通俗易懂]

    python 高中信息技术 会考_今年9月,8年级将新增Python课程,3-9年级以及新高一的信息技术课都有变化···…[通俗易懂]原标题:今年9月,8年级将新增Python课程,3-9年级以及新高一的信息技术课都有变化···浙江省中小学信息技术课9月换新教材,新增PPT、H5、Python、大数据……等内容。浙江消息,今年9月份开始的新学期,三到九年级信息技术课将同步替换新器材。其中,新初二将新增Python编程课程内容。新高一信息技术编程语言由VB替换为Python,大数据、人工智能、程序设计与算法按照教材规划五六…

    2022年5月17日
    114
  • html+JavaScript登陆注册界面

    html+JavaScript登陆注册界面最近刚刚学习了一些关于JavaScript的知识,便在之前学习的html前端的基础上做了一些简单的修改,本身还存在着很多的缺陷,希望大家多多指正。githu下载地址:https://github.com/pengxiang1998/login[登陆界面2在线预览]:https://pengxiang1998.github.io/login/index/denglu.html[注…

    2022年6月9日
    43
  • 手机的屏幕分辨率_手机屏幕分辨率尺寸

    手机的屏幕分辨率_手机屏幕分辨率尺寸  什么是分辨率?说白了,分辫率高,屏幕显示就更清晰、更细腻。分辨率不高,屏幕显示就会有颗粒感,粗糙感。一句话:分辨率是屏幕显示清晰度的一个指标。现在手机常用的分辫率有:128*160、176*220、240*320。128*160多用在低档的手机。中档的手机一般分辨率为176*220。中高档手机分辨率多为:240*320。夏普现在有一款手机分辨率达到了480*640。比电脑显示屏还清晰

    2022年8月13日
    13
  • Mysql增删改查sql语句练习

    Mysql增删改查sql语句练习关于数据库的一些操作:进入mysql命令行:mysql-uroot–p查看所有数据库:showdatabases;创建数据库:createdatabasewgcharsetutf8;删除数据库:dropdatabasewg;选择数据库:usedatabases;查看所有表:showtables;查看创建数据库的语句…

    2022年4月10日
    44

发表回复

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

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