新闻详情

新闻详情

首页 / 资讯中心 / 详情

RL-赵-(七)-不基于模型2-时序差分/TD算法04-计算ActionValue:n-step Sarsa【折中①one-step Sarsa与②∞-step MC:采样n步然后更新π】

发布时间:2026/9/25 2:11:05来源:尧图网络
RL-赵-(七)-不基于模型2-时序差分/TD算法04-计算ActionValue:n-step Sarsa【折中①one-step Sarsa与②∞-step MC:采样n步然后更新π】
RL-赵-(七)-不基于模型4:n-step Sarsa【TD算法】【Sarsa与MC的折中形式:采样n步就更新π】【Sarsa只需要一步的数据就更新;MC需等到一个episode数据搜集结束再更新】n-Step Sarsa是Sarsa的一个变型或者是一个推广,因为n-step Sarsa包含了Sarsa和蒙特卡洛两种方法,也就是can unify Sarsa and Monte Carlo learning。Action Value的定义如下:q π ( s , a ) = E [ G t ∣ S t = s , A t = a ] q_\pi(s,a)=\mathbb{E}[G_t|S_t=s,A_t=a]qπ​(s,a)=E[Gt​∣St​=s,At​=a]其中的 discounted returnG t G_tGt​有很多种写法【G t ( 1 ) G_t^{(1)}Gt(1)​表示第一种写法,G t ( n ) G_t^{(n)}Gt(n)​表示第n nn中写法】:Sarsa ⟵ G t ( 1 ) = R t + 1 + γ q π ( S t + 1 , A t + 1 ) , 【第 t + 1 时间步后的所有 r e w a r d 都汇总到 q π ( S t + 1 , A t + 1 ) 】 G t ( 2 ) = R t + 1 + γ R t + 2 + γ 2 q π ( S t + 2 , A t + 2 ) , 【第 t + 2 时间步后的所有 r e w a r d 都汇总到 q π ( S t + 2 , A t + 2 ) 】 : n -stepSarsa ⟵ G t ( n ) = R t + 1 + γ R t + 2 + ⋯ + γ n q π ( S t + n , A t + n ) , 【第 t + n 时间步后的所有 r e w a r d 都汇总到 q π ( S t + n , A t + n ) 】 MC ⟵ G t ( ∞ ) = R t + 1 + γ R t + 2 + γ 2 R t + 3 + … \begin{aligned} \text{Sarsa}\longleftarrow G_t^{(1)} =R_{t+1}+\gamma q_{\pi}(S_{t+1},A_{t+1}), 【第t+1时间步后的所有reward都汇总到q_{\pi}(S_{t+1},A_{t+1})】\\ G_{t}^{(2)} =R_{t+1}+\gamma R_{t+2}+\gamma^2q_\pi(S_{t+2},A_{t+2}), 【第t+2时间步后的所有reward都汇总到q_{\pi}(S_{t+2},A_{t+2})】\\ \text{:} \\ n\text{-step Sarsa}\longleftarrow G_t^{(n)} =R_{t+1}+\gamma R_{t+2}+\cdots+\gamma^nq_\pi(S_{t+n},A_{t+n}), 【第t+n时间步后的所有reward都汇总到q_{\pi}(S_{t+n},A_{t+n})】 \\ \text{MC}\longleftarrow G_t^{(\infty)} =R_{t+1}+\gamma R_{t+2}+\gamma^{2}R_{t+3}+\ldots \end{aligned}Sarsa⟵Gt(1)​Gt(2)​:n-stepSarsa⟵Gt(n)​MC⟵Gt(∞)​​=Rt+1​+γqπ​(St+1​,At+1​),【第t+1时间步后的所有reward都汇总到qπ​(St+1​,At+1​)】=Rt+1​+γRt+2​+γ
网站建设高端定制企业官网
RELATED

相关资讯

更多精彩内容,欢迎继续阅读

较早相关资讯

最新相关资讯

从 AsyncStorage 平滑迁移到 react-native-mmkv:完整迁移脚本与实战指南 2026/9/25 2:53:14

从 AsyncStorage 平滑迁移到 react-native-mmkv:完整迁移脚本与实战指南

【免费下载链接】react-native-mmkv ⚡️ The fastest key/value storage for React Native. ~30x faster than AsyncStorage! 项目地址: https://gitcode.com/gh_mirrors/re/react-native-mmkv 点击查看 免费下载 本文基于 react-native-mmkv 官方迁移指南&#x…

阅读更多 →
QuantsPlaybook ICIR 因子评估:从零看懂因子“稳不稳“ 2026/9/25 2:53:14

QuantsPlaybook ICIR 因子评估:从零看懂因子“稳不稳“

QuantsPlaybook ICIR 因子评估:从零看懂因子"稳不稳" 【免费下载链接】QuantsPlaybook 量化研究-券商金工研报复现 项目地址: https://gitcode.com/GitHub_Trending/qu/QuantsPlaybook 在 QuantsPlaybook ICIR 是判断一个因子能不能用的第一把尺子…

阅读更多 →
DiceBear Critters 头像样式预设指南:12 套开箱即用的渲染参数与 Playground 调优实战 2026/9/25 2:53:08

DiceBear Critters 头像样式预设指南:12 套开箱即用的渲染参数与 Playground 调优实战

UI组件后端 【免费下载链接】dicebear DiceBear is an avatar library for designers and developers. 🌍 项目地址: https://gitcode.com/gh_mirrors/di/dicebear 点击查看 免费下载 本文以 DiceBear 文档站中 Critters 样式的 Presets 页面 为骨架&am…

阅读更多 →
GD32开发环境搭建:SEGGER Embedded Studio从入门到点灯 2026/9/25 2:53:08

GD32开发环境搭建:SEGGER Embedded Studio从入门到点灯

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

阅读更多 →
使用 Meshery Catalog 部署 HAProxy Ingress Controller:从 Design 组件拆解到 mesheryctl 导入实战 2026/9/25 2:53:08

使用 Meshery Catalog 部署 HAProxy Ingress Controller:从 Design 组件拆解到 mesheryctl 导入实战

云原生微服务运维DevOps 【免费下载链接】meshery Meshery, the cloud native manager 项目地址: https://gitcode.com/GitHub_Trending/me/meshery 点击查看 免费下载 导读 本文围绕 Meshery Catalog 中收录的 HAProxy Ingress Controller 流量管理模式&#xff…

阅读更多 →
基于 ANTLR v4 的 YINI 语言文法指南:语法特性、词法实现与示例解析 2026/9/25 2:53:08

基于 ANTLR v4 的 YINI 语言文法指南:语法特性、词法实现与示例解析

编程语言编译器开发工具 【免费下载链接】grammars-v4 Grammars written for ANTLR v4; expectation that the grammars are free of actions. 项目地址: https://gitcode.com/gh_mirrors/gr/grammars-v4 点击查看 免费下载 YINI(Yet another INI&#…

阅读更多 →

今日资讯

本周资讯

本月资讯

看完文章仍有疑问?

联系尧图顾问,获取一对一建站咨询

立即免费咨询 📞 400-888-8888
📞 ✉