当前位置:网站首页>Q-Learning笔记
Q-Learning笔记
2022-06-30 10:05:00 【显哥无敌】
emmmmm,被迫强化学习
强化学习的思想其实很好理解啦,通过不断和环境交互,来修正agent的行为,得到agent在不同state下应该采取什么action,来得到最大化的收益。
这里强推一下这个知乎博主
https://www.zhihu.com/column/c_1215667894253830144
真的是用大白话把我给讲懂了,搜别的动不动上来这个公式那个理论的,真的是一脸懵逼。。。。。。(理解流程之后你去看那些公式发现其实也没那么难懂)
先看一下Q-Learning的算法流程,然后一一解释,这里借用一下莫凡python的流程图:
首先要说的是你要有一个基础化的Q表的,否则你毛都没有,agent怎么给你下一状态s’的指导意见呢,是吧,这一步说明对应第一行Initialize
然后episode我搜了一下是step的集合,即从游戏开始到游戏结束的每一步集合,s是游戏的初始状态
下面是要说的就是off-policy和on-policy的问题了
关于这两者的定义,我是参考了这一篇文章:
所谓的off-policy和on-policy的区别其实就是生成数据和为了保证收益最大更新Q表阶段所采取的策略是否一致,以Q-Learning为例,你玩游戏的时候当然选的action是已经训练好的Q(s,a)里面值最大的那个是吧,这个叫做目标策略
目标策略(target policy):智能体要学习的策略
但是我们说了初期的Q-表是随机给的,他需要很多轮去训练,去收敛,于是要求我们在take-action的时候遍历某一个状态下所有可能的动作,于是这个就叫做
行为策略(behavior policy):智能体与环境交互的策略,即用于生成行为的策略
当这两者一致的时候就是on-policy,不一致就是off-policy
现在来考虑,在训练的时候,智能体选取的是eplison-greedy策略,即我有一定概率选取现在在我q表里action值最大的那个动作,但是不一定,我也可以选其他动作,那么包括后续过程包括状态和动作都会不一样,这样就实现了不同动作探索的可能性
通过不断地玩,Q表会不断收敛,到了玩的时候就会根据Q-table在目标策略下进行游戏,以获得较大的收益。
所以Q-Learning是一个off-policy算法,因为这两个阶段的policy完全不同
边栏推荐
- CVPR 2022 | 清华&字节&京东提出BrT:用于视觉和点云3D目标检测的桥接Transformer
- IPhone address book import into Excel
- 机器学习面试准备(一)KNN
- GeoffreyHinton:我的五十年深度学习生涯与研究心法
- [rust weekly database] num bigint - large integer
- The human agent of kDa, Jinbei kd6, takes you to explore the metauniverse
- Go -- maximum heap and minimum heap
- CSDN博客运营团队2022年H1总结
- 技能梳理[email protected]体感机械臂
- ArcGIS Pro + PS 矢量化用地规划图
猜你喜欢

ArcGIS Pro scripting tool (5) - delete duplicates after sorting

GeoffreyHinton:我的五十年深度学习生涯与研究心法

MySQL log management, backup and recovery of databases (2)

mysql数据库基础:约束、标识列

Oracle creates a stored procedure successfully, but the compilation fails

苹果5G芯片被曝研发失败,QQ密码bug引热议,蔚来回应做空传闻,今日更多大新闻在此...

go-zero微服务实战系列(八、如何处理每秒上万次的下单请求)
[email protected]基于51系列单片机的智能仪器教具"/>技能梳理[email protected]基于51系列单片机的智能仪器教具

今晚19:00知识赋能第2期直播丨OpenHarmony智能家居项目之控制面板界面设计

机器学习面试准备(一)KNN
随机推荐
& and - > priority
Ionic4 drag the ion reorder group component to change the item order
【Rust每周一库】num-bigint - 大整数
Yixian e-commerce released its first quarterly report: adhere to R & D and brand investment to achieve sustainable and high-quality development
Skill combing [email protected] control a dog's running on OLED
CSDN daily one practice 2021.11.06 question 1 (C language)
R language plot visualization: use plot to visualize the prediction confidence of the multi classification model, the prediction confidence of each data point of the model in the 2D grid, and the conf
19:00 p.m. tonight, knowledge empowerment phase 2 live broadcast - control panel interface design of openharmony smart home project
05_Node js 文件管理模块 fs
Compare the maximum computing power of the Cenozoic top ant s19xp and the existing s19pro in bitland
【Rust日报】2021-01-23 几个新库发布
机器学习面试准备(一)KNN
ArcGIS Pro scripting tool (5) - delete duplicates after sorting
CSDN博客运营团队2022年H1总结
The programmer was beaten.
【深度学习】深度学习检测小目标常用方法
Compétences Comb 27 @ Body sense Manipulator
吴恩达2022机器学习专项课测评来了!
MySQL log management, backup and recovery of databases (2)
Use keil5 software to simulate and debug gd32f305 from 0