强化学习---笔记

The idea behind Reinforcement Learning is that an agent will learn from the environment by interacting with it and receiving rewards for performing actions.


1. 强化学习的过程

强化学习过程可以看做是如下的循环:

1. Agent从Environment接受到state S0(例如从游戏(environment)中获得了第一帧(state))

2. 根据S0,agent进行action A0操作

3. Environment转换到新的state S1(new frame)

4. Environment给Agent一个reward R1(not dead: +1)

RL loop输出state,action和reward的序列,agent的目的是最大化预计累计奖励(expected cumulative reward)


2. Reward Hypothesis

强化学习是基于reward hypothesis的,所有的目标都是最大化预计累计奖励。每一步的累计奖励如下:

cumulative reward

然而实际中,越到后面可能得到reward的概率减少,因为难度的增加,因此增加discount rate gamma,值在0到1之间。gamma值越大,discount越少,代表learning agent更关注长期reward,然而如果gamma值越小,discount越大,表示agent更关注短期reward。

cumulative reward with discount rate gamma


3. 两类任务:Episodic or Continuing tasks

1. Episodic

有开始和结束(a starting point and an ending point(a terminal state)),产生an episode:a list of States, Actions, Rewards, and New States.

2. Continuous tasks

没有结束(no terminal state), 一直持续的任务,例如一个agent做自动的股票交易,直到我们手动停止它,agent才会停下来。


4. Monte Carlo vs TD Learning methods

有两种学习的方式:

一种是在episode的结束点收集rewards然后计算maximum expected future reward: Monte carlo Approach

另一种是在每一步估计reward:Temporal Difference Learning

1) Monte Carlo

在蒙特卡洛方法中,reward只在游戏结束的时候获得,在一次游戏结束后进行下一次时,会加入一些新的知识,agent可以在每次迭代过程中做出更优的决定。


2)Temporal Difference Learning:learning at each time step



5. Exploration/Exploitation trade off

Exploration is finding more information about the environment. 探索

Exploitation is exploiting known information to maximum the reward. 开发


6. Three approaches to Reinforcement learning

6.1 Value Based

目标是优化value function V(s),value function是一个函数,会告诉我们最大的expected future reward,agent在每一步都会获得。


6.2 Policy Based

直接优化policy function 

action = policy(state)

有两类policy:

Deterministic: a policy at a given state will always return the same action.

Stochastic: output a distribution probability over actions.



6.3 Model Based

模拟环境,意味着我们创建了一个环境行为模型,问题是每个环境都需要一个不同的模型表示




©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • 强化学习(Reinforcement Learing),机器学习重要分支,解决连续决策问题。强化学习问题三概念,环...
    利炳根阅读 9,175评论 0 4
  • 一. 增强学习简介 1.1 什么是增强学习? 机器学习的算法可以分为三类:监督学习,非监督学习和增强学习。 增强学...
    阿阿阿阿毛阅读 31,607评论 0 25
  • 每个人在做一件事的时候,都需要先进行思考。清醒的思考,才能避免昨天那样,被外界因素影响导致非理智决策。那么,决策的...
    宵汀阅读 2,047评论 0 1
  • 敬畏—进入—体验—交给—持续 1,缺啥补啥,怕啥练啥; 2,一切为我所用,所用为团队家; 3,我想变,我要变,我...
    京心达阅读 1,103评论 0 0
  • 找到自己最适合的方法和节奏最重要。最近在参加李参老师的《21天时间管理训练营》课程,虽然之前也已经跟随老师学了...
    博子阅读 1,373评论 0 0

友情链接更多精彩内容