首页/新闻资讯/正文详情

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​+γ

相关推荐

高频扩容备件管理:固件兼容性与物理耦合失效应对指南
高频扩容备件管理:固件兼容性与物理耦合失效应对指南

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

多输出GBDT实战:C++核心与Python绑定下的向量残差训练与推理加速
多输出GBDT实战:C++核心与Python绑定下的向量残差训练与推理加速

简介:这份资源聚焦多输出梯度提升决策树(Multi-Output GBDT),面向具备一定机器学习基础、希望处理多目标预测任务的开发者与研究者,可用于多标签分类、推荐系统多目标优化、环境多变量预测及金融多维评分等场景。压缩包… · 2026/9/25 2:10:59

win10下yolox tensorrt模型部署
win10下yolox tensorrt模型部署

TensorRT系列之 Win10下yolov8 tensorrt模型加速部署 TensorRT系列之 Linux下 yolov8 tensorrt模型加速部署 TensorRT系列之 Linux下 yolov7 tensorrt模型加速部署 TensorRT系列之 Linux下 yolov6 tensorrt模型加速部署 TensorRT系列之 Linux下 yolov5 tensorrt模型加速部署… · 2026/9/25 2:10:59

SSM 图书管理系统
SSM 图书管理系统

🥂(❁◡❁)您的点赞👍➕评论📝➕收藏⭐是作者创作的最大动力🤞💖📕🎉🔥 支持我:点赞👍收藏⭐️留言📝欢迎留言讨论🔥🔥&am… · 2026/9/25 2:35:06

使用 PaddleSpeech 将 CC-CEDICT 中英词典解析为 JSON 格式的完整指南
使用 PaddleSpeech 将 CC-CEDICT 中英词典解析为 JSON 格式的完整指南

人工智能语音音频NLP媒体生成 【免费下载链接】PaddleSpeech Easy-to-use Speech Toolkit including Self-Supervised Learning model, SOTA/Streaming ASR with punctuation, Streaming TTS with text frontend, Speaker Verification System, End-to-End Speech Translation … · 2026/9/25 2:34:53

华为AP4050DN FIT转FAT实战:从瘦AP到胖AP的完整刷机指南
华为AP4050DN FIT转FAT实战:从瘦AP到胖AP的完整刷机指南

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

PaddleSeg PP-HumanSeg-Lite(ConnectNet)实时人像分割模型完全指南
PaddleSeg PP-HumanSeg-Lite(ConnectNet)实时人像分割模型完全指南

人工智能计算机视觉预训练 【免费下载链接】PaddleSeg Easy-to-use image segmentation library with awesome pre-trained model zoo, supporting wide-range of practical tasks in Semantic Segmentation, Interactive Segmentation, Panoptic Segmentation, Image Matting,… · 2026/9/25 2:34:47

Databasus 后端开发工作流:从 .env 配置、make 运行测试,到 goose 迁移与 Swagger 文档
Databasus 后端开发工作流:从 .env 配置、make 运行测试,到 goose 迁移与 Swagger 文档

数据库灾备 【免费下载链接】databasus PostgreSQL backup tool with Point-In-Time-Recovery and restore verification 项目地址: https://gitcode.com/gh_mirrors/po/databasus 点击查看 免费下载 本篇以 backend/README.md 为主线,讲解 Databasus 后… · 2026/9/25 2:34:47

PaddleSpeech audiotools 工具箱全解析:AudioSignal 音频信号处理、数据增强与模型训练一站式指南
PaddleSpeech audiotools 工具箱全解析:AudioSignal 音频信号处理、数据增强与模型训练一站式指南

人工智能语音音频NLP媒体生成 【免费下载链接】PaddleSpeech Easy-to-use Speech Toolkit including Self-Supervised Learning model, SOTA/Streaming ASR with punctuation, Streaming TTS with text frontend, Speaker Verification System, End-to-End Speech Translation … · 2026/9/25 2:34:47

数值优化(Numerical Optimization)学习系列-03-共轭梯度方法(Conjugate Gradient)
数值优化(Numerical Optimization)学习系列-03-共轭梯度方法(Conjugate Gradient)

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

创维E900V22D刷机全攻略:S905L3SB芯片兼容性解析与救砖实战
创维E900V22D刷机全攻略:S905L3SB芯片兼容性解析与救砖实战

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

MQTT协议原理与Broker服务器搭建实战:从Mosquitto到EMQX
MQTT协议原理与Broker服务器搭建实战:从Mosquitto到EMQX

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

了解更多?预约专属演示

我们的顾问将为您一对一讲解产品与方案

企业微信二维码