当前位置:网站首页>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完全不同
边栏推荐
- 【Proteus仿真】Arduino UNO LED模拟交通灯
- Go -- standard library sort package
- 技能梳理[email protected]体感机械臂
- Get through the supply chain Shenzhen gift show helps cross-border e-commerce find ways to break the situation
- 最新SCI影响因子公布:国产期刊最高破46分!网友:算是把IF玩明白了
- 历史上的今天:微软收购 PowerPoint 开发商;SGI 和 MIPS 合并
- ArcGIS Pro脚本工具(6)——修复CAD图层数据源
- Anhui "requirements for design depth of Hefei fabricated building construction drawing review" was printed and distributed; Hebei Hengshui city adjusts the pre-sale license standard for prefabricated
- mysql数据库基础:约束、标识列
- Ionic4 drag the ion reorder group component to change the item order
猜你喜欢

我在鹅厂淘到了一波“炼丹神器”,开发者快打包

Auto SEG loss: automatic loss function design

腾讯云数据库工程师能力认证重磅推出,各界共话人才培养难题

逸仙電商發布一季報:堅持研發及品牌投入,實現可持續高質量發展
[email protected]體感機械臂"/>技能梳理[email protected]體感機械臂

从0使用keil5软件仿真调试GD32F305
[email protected]+阿里云+nbiot+dht11+bh1750+土壤湿度传感器+oled"/>技能梳理[email protected]+阿里云+nbiot+dht11+bh1750+土壤湿度传感器+oled

Use keil5 software to simulate and debug gd32f305 from 0

mysql数据库基础:视图、变量

RobotFramework学习笔记:环境安装以及robotframework-browser插件的安装
随机推荐
The performance of arm's new CPU has been improved by 22%, up to 12 cores can be combined, and the GPU is first equipped with hardware optical tracking. Netizen: the gap with apple is growing
Skill combing [email protected] intelligent instrument teaching aids based on 51 series single chip microcomputer
马斯克推特粉丝过亿了,但他在线失联已一周
Questions about cookies and sessions
Compare the maximum computing power of the Cenozoic top ant s19xp and the existing s19pro in bitland
技能梳理[email protected]+adxl345+电机震动+串口输出
Ionic4 drag the ion reorder group component to change the item order
MySQL log management, backup and recovery of databases (2)
ionic4 ion-reorder-group组件拖拽改变item顺序
The latest SCI impact factor release: the highest score of domestic journals is 46! Netizen: I understand if
ArcGIS Pro脚本工具(6)——修复CAD图层数据源
Node environment configuration
Tooltips in the era of touch
Kernel linked list (general linked list) "list.h" simple version and individual comments
文件共享服务器
Foster design method
js常见问题
逸仙電商發布一季報:堅持研發及品牌投入,實現可持續高質量發展
Yixian e - commerce publie un rapport trimestriel: adhérer à la R & D et à l’investissement de la marque, réaliser un développement durable et de haute qualité
技能梳理[email protected]语音模块+stm32+nfc