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


相关推荐

  • linux查看网卡名称_linux网卡名字总是变化

    linux查看网卡名称_linux网卡名字总是变化网卡如果没有启动的话可以到/etc/sysconfig/network-scripts目录去看配置文件cd/etc/sysconfig/network-scripts进入目录后输入ls展示文件列表一般网卡名字都是ifcfg-开头如ifcfg-eth0ifcfg-ens32等…

    2022年10月18日
    6
  • 简单Web应用框架设计

    简单Web应用框架设计

    2021年7月21日
    52
  • pytorch实现resnet_如何搭建平台

    pytorch实现resnet_如何搭建平台ResNet34网络结构先上图参照ResNet18的搭建,由于34层和18层几乎相同,叠加卷积单元数即可,所以没有写注释,具体可以参考我的ResNet18搭建中的注释,ResNet34的训练部分也可以参照。importtorchimporttorch.nnasnnfromtorch.nnimportfunctionalasFclassCommonBlock(nn.Module):def__init__(self,in_channel,out_chann

    2022年10月5日
    4
  • origin柱状图显示具体数据值

    origin柱状图显示具体数据值1.双击需要显示数据的那一列比如双击蓝色这一列,所有的这一列数据都会选中2.打开绘图细节-绘图属性,选中标签3.点击启用4.选择标签形式’Y’5.选择数值显示格式*3*即可显示,然后调整位置即可…

    2022年9月30日
    5
  • QQ密码防盗十大建议

    QQ密码防盗十大建议1.去腾讯申请密码保护,这样如果密码被激活成功教程或自己忘记了还可以利用密码保护功能取回来。    2.QQ密码的位数一定要超过8位,而且最好包含数字、字母和特殊符号,否则以现代计算机的超强计算能力,要想暴力激活成功教程你的QQ密码简直是易如反掌。    3.不要在QQ中填入真实的年龄、E-mail等敏感消息,更不能告诉任何人,小心行得万年船。    4.不要随意运行别人发给你的文件,即便那些看起来很诱人的文件也

    2022年7月20日
    40
  • linux修改密码报错_linux修改其他用户密码

    linux修改密码报错_linux修改其他用户密码第一种:/usr/bin/passwd的权限中没有添加s即SUID特殊权限即:-rwxr-xr-x.1rootroot270008月222010/usr/bin/passwd解决方案:chmodu+s/usr/bin/passwdSUID的功能简单的说就是让组用户或其他用户在执行该文件是拥有文件所有者(own)权限,这里就是需要获取w(写)权限,这样才能将新密码写到/etc…

    2025年9月18日
    7

发表回复

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

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