强化学习

2020-04-13  本文已影响0人  ZhSong

Reinforcement Learning

什么是强化学习

RL is an agnet learning to interact with an environmnet based on feedback signal (reward) ie receives from the environment, in order to achieve a goal.

也就是通过环境的反馈来学习,最终达到目标,就像训练一只狗,当做了对的事情就给他好吃的,错的事情就打一巴掌。

强化学习是机器学习的一部分,他与监督学习和非监督学习并列,供同行组成机器学习

为什么要使用强化学习

机器学习的基础:奖励

为了获取最大奖励

机器代理,环境和状态

部分可观测环境(Partial observability)

强化学习代理内部(Inside an RL agent)

Policy

截屏2020-04-13下午8.58.18.png

Value Function

截屏2020-04-13下午8.58.23.png

不同的强化学习代理(Different RL agents)

Q-Learning

Q-Table

Bellman Equation

Q(s_t,a_t)=(1-\alpha)Q(s_t,a_t)+\alpha[R(s_t,a_t)+\gamma \mathop{max}\limits_{a}Q(s_{t+1},a)]

截屏2020-04-13下午9.00.58.png

Q-Learning Algorithm

  1. Initialise Q table

  2. For each episode
    a. Select a random initial state
    b. Do

End For

Summary:Q-Learning

Deep Q Network

用于解决有大量状态的问题,因为在Q-learning中无法更新Q-table

对于深度Q学习

深度Q学习缺点

Learn polilcy directly(直接学习策略)

Policy Gradient(策略下降)

Basic idea(基本思路)

  1. Start out with an arbitrary random policy(从一个任意的策略开始)

  2. Play game for a while and sample some actions(尝试一些动作)

  3. Increase probability of actions that lead to high reward, and decrease probability of actions that lead to low reward(增加导致高回报动作的可能性并减少低回报动作的可能性)

Find best policy: Two steps(找到最好的策略的两个步骤)

上一篇 下一篇

猜你喜欢

热点阅读