指导性和评估性反馈 (Instructive and Evaluative Feedback)

In supervised learning, your algorithm/model gets instructive feedback. This means it is instructed what the correct choice it should have made was, it then updates itself to diminish its error and make its predictions more accurate. In reinforcement learning, you give an algorithm evaluative feedback. This tells your algorithm how good an action was, but not what the best action was. How good the action was is known as reward. The RL algorithm goes through a simulation where it learns how to maximize this reward.

在监督学习中,您的算法/模型会获得指导性反馈。 这意味着将指示其应做出的正确选择,然后进行自我更新以减少错误并使其预测更加准确。 在强化学习中,您会给算法提供评估反馈。 这告诉您的算法,一个动作有多好,但最好的动作却没有。 动作的效果如何被称为奖励。 RL算法经过仿真,在其中学习如何最大程度地提高奖励。

RL的最佳应用 (The Best Application for RL)

The best applications of RL are when you can simulate the environment it operates in well. If we wanted to teach a RL program to drive a car, we could just let it drive a car, this would be a perfect simulation. If we wanted to teach it to call plays in an American football game, we would let it play a bunch of games of Madden, this is not a perfect simulation since we are using a video game to represent the real world. Understanding how we design the feedback in the RL algorithm in either of these scenarios can be quite complex, so I will introduce some of the basic concepts of RL in a simple situation called the K-Armed Bandit.

RL的最佳应用是可以模拟它运行良好的环境。 如果我们想讲授RL程序来驾驶汽车,我们可以让它驾驶汽车,这将是一个完美的模拟。 如果我们想教它调用美式足球比赛中的比赛,我们会让它玩一系列Madden游戏,这并不是一个完美的模拟,因为我们正在使用视频游戏来代表真实世界。 了解这两种情况下我们在RL算法中如何设计反馈的过程可能会非常复杂,因此我将在称为K-Armed Bandit的简单情况下介绍RL的一些基本概念。

K武装匪徒的模拟 (The K-Armed Bandit’s Simulation)

Imagine you are in a room with 1000 slot machines, each of which is free for you to play (this makes you a bandit, since you can’t lose any money). In this situation, there are 1000 arms for you to pull, so in this case, you are a 1000-armed bandit. Each slot machine gives you a payout that is normally distributed, each with a different mean and variance. If you had an infinite number of times to pull the levers, you could get a massive sample from each slot machine, find the one that maximizes the expected value of your payout, then pull that lever over and over again. To make things interesting let’s say you have a limit of 5000 pulls of the lever. How would you optimize this your payout in this scenario? It’s hard to say, you would be slow to experiment and find out, since it would take time to pull every lever and record the information, this is a great application for a reinforcement learning bot.

想象一下,您所在的房间里有1000台老虎机,每台老虎机都是免费供您玩的(这使您成为强盗,因为您不会损失任何钱)。 在这种情况下,有1000臂供您拉动,因此,在这种情况下,您是1000臂的土匪。 每台老虎机都会为您提供正态分布的支出,每种均具有不同的均值和方差。 如果您有无数次拉动杠杆,则可以从每台老虎机上获取大量样本,找到可以最大程度地增加支出期望值的样本,然后反复拉动该杠杆。 为了使事情变得有趣,我们假设您最多只能拉动5000次拉杆。 在这种情况下,您将如何优化此支出? 很难说,您的实验和发现速度会很慢,因为拉动每个杠杆并记录信息会花费一些时间,这对于强化学习机器人来说是一个很好的应用程序。

探索诉剥削 (Exploration v. Exploitation)

The bot begins by pulling one of the levers. It turns up with $500, that’s great! The bot’s current belief about the machines is that they all pay out $0, except this one which pays out $500. The bot decides to stay on this machine for bot’s remaining 1999 pulls of the lever. This is known as an exploitative approach, since the bot exploits its current knowledge of the payouts. If the bot decided to switch to a new machine this would be known as explorative, since the bot is gathering information on how to maximize reward. An exploitative strategy is also known as a greedy strategy.

机器人首先拉动其中一个操纵杆。 总共有$ 500,真是太好了! 机器人目前对机器的信念是,它们都支付了$ 0,但该机器支付了$ 500。 机器人决定留在该机器上,以保持机器人在1999年剩余的拉力。 这是一种利用性方法,因为该漫游器会利用其当前的支出知识。 如果机器人决定切换到新机器,这将被称为探索性的,因为机器人正在收集有关如何最大化奖励的信息。 剥削策略也称为贪婪策略。

量化贪婪 (Quantifying Greed)

You could instead set up a system where the bot will always exploit its current knowledge (i.e. pick the current machine with the biggest payout) but some percentage of the time you randomly decide to select another machine to pull. This percentage of the time is usually denoted with the variable epsilon. A bot with an epsilon of .1 will explore 10% of the time, this bot is greedier than a bot that has an epsilon of .5, which explores half the time. You can then simulate your environment with many bots of different epsilons to find the optimal epsilon for maximizing reward. You can then mimic the best bot in the real world. When an individual slot machine has a large variance in payout, exploration is more helpful. When each machine pays out the exact same amount every time (it pays out with a variance of 0), a greedier epsilon is preferred. With perfect knowledge of all the machines before the first pull of the lever, the bot with an epsilon of 0 is best, since it already knows the best machine and there is no benefit to exploring.

相反,您可以设置一个系统,在该系统中,机器人将始终利用其当前知识(即,选择支出最高的当前机器),但是有一定百分比的时间是您随机决定选择另一台机器来拉动的。 该时间百分比通常用变量epsilon表示。 一个epsilon为.1的机器人将探索10%的时间,该机器人比一个epsilon为.5的机器人要探索一半的时间更为贪婪。 然后,您可以使用许多不同epsilon的机器人来模拟您的环境,以找到最佳的epsilon,以实现最大的回报。 然后,您可以模仿现实世界中最好的机器人。 当单个老虎机的支出差异很大时,探索会更有帮助。 当每台机器每次都支付完全相同的金额时(以0的方差支付),首选greedier epsilon。 机器人在第一次拉动操纵杆之前对所有机器都拥有完备的知识,因此ε为0的机器人是最好的,因为它已经知道最好的机器,因此探索毫无益处。

乐观的期望 (Optimistic Expectations)

A good way of encouraging exploration, even among greedy bots, is to change the bot’s expectations for machines it hasn’t tried. Earlier, I described our bot as having the expectation that a machine had a payout of $0 if it had no information on it. We could alter this so that the initial expectation is that a machine has a payout of $25. Now if on our first pull of the lever we have a payout of $5, even a greedy bot will want to switch to another machine, since another machine would maximize reward.

即使在贪婪的机器人中,鼓励探索的一个好方法是改变该机器人对未尝试过的机器的期望。 早些时候,我将我们的漫游器描述为希望一台机器上没有任何信息时其支出为$ 0。 我们可以更改此设置,以使最初的期望是一台机器的支出为25美元。 现在,如果在我们第一次拉动杠杆时,我们有5美元的支出,即使是贪婪的机器人也将想要切换到另一台机器,因为另一台机器将使报酬最大化。

支出漂移 (Payout Drift)

Previously our bot was keeping track of what the mean reward from each machine was and pulled that one unless it was randomly told to explore. If the payout that each machine gives over time begins to change, meaning that the mean of its normal distribution increases or decreases, there are two simple ways to adjust our bot. The first is just exploring more, so by just picking a greater epsilon we can improve the bot. This doesn’t require you to alter any code though, just to repeat the simulation and pick what the new best bot was. A better method is instead of keeping our information about the machines as just the mean and variance, we could make a linear regression model that shows how the machines payout changes over time. This would stop a greedy bot from exploiting a machine which no longer had the highest payout.

以前,我们的机器人一直在跟踪每台机器的平均收益,并把它拉出来,除非被随机告知要探索。 如果每台机器随时间分配的支出开始改变,这意味着其正态分布的平均值增加或减少,则可以通过两种简单的方法来调整机器人。 第一个只是探索更多,因此只要选择更大的epsilon,我们就可以改进机器人。 但这并不需要您更改任何代码,只需重复模拟并选择最新的最佳bot。 更好的方法不是将我们的机器信息仅保留为均值和方差,而是可以建立一个线性回归模型来显示机器支出随时间的变化。 这将阻止贪婪的机器人利用不再具有最高支出的机器。

翻译自: https://towardsdatascience.com/the-k-armed-bandit-an-introductory-lesson-to-reinforcement-learning-4d51f5e71fdd


http://www.taodudu.cc/news/show-2908809.html

相关文章:

  • Seq2Seq模型中的贪心搜索(Greedy Search)
  • Scrapy 爬虫框架(基础)
  • Scrapy简明教程(一)
  • scrapy框架之shell
  • python scrapy 简单教程_python之scrapy入门教程
  • Scrapy Tutorial
  • Delphi 中资源文件使用详解
  • Python爬虫:和我一起学习scrapy(三)
  • Delphi中资源文件使用详解
  • Python爬虫11-Scrapy爬虫框架
  • Python框架篇:结构化的网页抓取框架-Scrapy
  • 使用DLL封装应用程序的资源
  • 使用Python的Scrapy框架编写web爬虫的简单示例
  • DELPHI资源文件使用
  • 学习爬虫之Scrapy框架学习(3)---豆瓣top250电影完整版信息获取及如何存储到mysql数据库;Scrapy shell和Scrapy选择器;使用到日志的学习!
  • 1-Scrapy Tutorial
  • 【Linux CentOS】 实用指令之帮助指令
  • 【爬虫】从零开始使用 Scrapy
  • 怎么应付薪资倒挂问题
  • 发现薪资被倒挂!跳槽还是等待?
  • 程序员“薪资被应届生倒挂“现象明显,跳槽还是等待?
  • 工资倒挂,IT 行业薪资潜规则如何规避?
  • 5.6月开始“薪资倒挂“严重
  • 老员工的工资为什么会倒挂?
  • 2019年数字IC校招薪酬火爆出炉,你被倒挂了吗_
  • 薪水被应届生倒挂了,很不爽,我应该跳槽吗?
  • 薪资倒挂要跳槽吗?
  • 你的工资被倒挂了吗
  • 程序员晒工资,工作 3 年被应届生倒挂!网友:工作 8 年被你倒挂!
  • 工资倒挂 你怎么看?工作三年薪资不如毕业生!

k武装匪徒强化学习入门课相关推荐

  1. 强化学习入门知识与经典项目分析1.3

    Python微信订餐小程序课程视频 https://edu.csdn.net/course/detail/36074 Python实战量化交易理财系统 https://edu.csdn.net/cou ...

  2. 麻省、北大、清华等顶尖高校与企业 20 位强化学习专家齐聚,RLChina 2021 强化学习暑期课免费报名啦!

    2016 年,AlphaGo 宛然横空出世,凭借精湛的棋艺接连战胜韩国围棋九段棋手李世石.中国围棋九段棋手柯洁之后,更是以 60 局无败绩的成绩轰动整个科技圈,人工智能的新纪元也因此开启.站在技术角度 ...

  3. 麻省、北大、清华等顶尖高校与企业 20 位强化学习专家齐聚,RLChina 2021 强化学习暑期课免费报名啦!...

    2016 年,AlphaGo 宛然横空出世,凭借精湛的棋艺接连战胜韩国围棋九段棋手李世石.中国围棋九段棋手柯洁之后,更是以 60 局无败绩的成绩轰动整个科技圈,人工智能的新纪元也因此开启.站在技术角度 ...

  4. 【强化学习入门】梯度赌博机算法中,偏好函数更新:梯度上升公式是精确梯度上升的随机近似的证明

    本文证明强化学习入门问题:K摇臂赌博机的梯度赌博机算法中,偏好函数更新公式:Ht+1(At)=Ht(At)+α(Rt−Rt‾)(1−πt(At))H_{t+1}(A_t) = H_t(A_t) + \ ...

  5. 强化学习入门这一篇就够了!!!万字长文

    强化学习 强化学习入门这一篇就够了万字长文带你明明白白学习强化学习... 强化学习入门这一篇就够了 强化学习 前言 一.概率统计知识回顾 1.1 随机变量和观测值 1.2 概率密度函数 1.3 期望 ...

  6. 用深度强化学习玩atari游戏_(一)深度强化学习·入门从游戏开始

    1.在开始正式进入学习之前,有几个概念需要澄清,这样有利于我们对后续的学习有一个大致的框架感 监督型学习与无监督型学习 深度强化学习的范畴 监督型学习是基于已有的带有分类标签的数据集合,来拟合神经网络 ...

  7. 多智能体强化学习入门

    参考文章:万字长文:详解多智能体强化学习的基础和应用 .多智能体强化学习入门(一)--基础知识与博弈 推荐文章:多智能体强化学习路线图 (MARL Roadmap) 推荐综述论文:An Overvie ...

  8. 【ziuno】强化学习入门—超级马里奥

    强化学习入门-超级马里奥 对象抽取:马里奥.金币.板栗仔(蘑菇怪) 术语 智能体-Agent:马里奥 状态(S或s)-State:当前游戏画面 动作(A或a)-Action:智能体(马里奥)的,左.右 ...

  9. 强化学习入门8—深入理解DDPG

    文章目录 Deep Deterministic Policy Gradient 简介 网络结构 算法流程 小结 本文是强化学习入门系列的第八篇,前面我们讲Actor-Critic时提到了DDPG.DD ...

最新文章

  1. Xamarin Android项目运行失败
  2. 独家 | PyCaret 2.1横空出世-有什么新的内容?
  3. 教你打造千万用户的海量视频网站、保卫云端安全!
  4. JAVA——实现七牛云对象存储Region对象采用配置方式生成解决方案
  5. Oracle中PLSQL中一个例外的写法
  6. c语言中abc是什么类型,基金分为ABC三类,分别代表什么意思,哪一类适合普通投资者?...
  7. vscode 模糊部分代码_本周 GitHub 速览:您的代码有声儿吗?(Vol.38)
  8. python中urframe函数的用法_python类中的内置函数
  9. mysql无法启动修复_记一次MySQL无法启动及修复经历
  10. 该学Java或.NET?
  11. 替换过的mysql能找回来_MySQL 误操作后数据恢复(update,delete忘加where条件)
  12. java 64位调用32位dll文件_64位进程调用32位dll的解决方法疑问
  13. 用极大似然法估计因子载荷矩阵_关于因子分析|stata
  14. 电脑小手图标怎么去除_取消共享文件夹图标上的小手
  15. 怎么把录音变成文字?
  16. 借路人卡多刷4百 事情原因大曝光怎么还钱?
  17. PyCharm专业版安装教程
  18. 乐高java解魔方_【图片】乐高CubeSpinner解魔方成功_乐高吧_百度贴吧
  19. 配置ibatis操作数据库、需要的jar包
  20. 阿里云——手把手教你搭建个人网站(上云良心品,细致到想哭)

热门文章

  1. linux使用make命令编译错误,有关linux的make文件编译问题
  2. jqGrid参数整理
  3. Linux命令之实时监控系统进程状态top
  4. 开启子进程的两种方式、进程间内存空间隔离、进程对象的方法或属性详解
  5. 数仓治理:数据地图长什么样?
  6. python编写一个赛车游戏
  7. USB摄像头测试网址
  8. 接口调用正常却返回404
  9. 新一代光学工程仿真软件FRED MPC介绍
  10. Linux就这个范儿 第14章 身在江湖