:::info 强化学习智能体必须平衡环境探索与通过交互获得的知识利用
本章通过关注单一状态的问题,介绍了与权衡勘探-开发的相关挑战。还介绍了具有多状态的MDP中的探索。 :::

1. 赌博机问题 Bandit Problems

许多现实世界的问题可以被定义为多臂赌博机。赌博机问题可以被定义为一个具有单一状态15 探索与利用 Exploration and Exploitation - 图1种行动和未知随机的奖励函数15 探索与利用 Exploration and Exploitation - 图215 探索与利用 Exploration and Exploitation - 图3步MDP,通过采取不同的行动获得随机奖励。
image.png

2. 贝叶斯模型估计 Bayesian Model Estimation

beta分布来表示15 探索与利用 Exploration and Exploitation - 图5臂(动作15 探索与利用 Exploration and Exploitation - 图6)的获胜概率15 探索与利用 Exploration and Exploitation - 图7的信念。假设15 探索与利用 Exploration and Exploitation - 图8的先验一致,15 探索与利用 Exploration and Exploitation - 图9次赢和15 探索与利用 Exploration and Exploitation - 图10次输之后的15 探索与利用 Exploration and Exploitation - 图11的后验为15 探索与利用 Exploration and Exploitation - 图12,获胜的后验概率为:(beta分布计算公式)
15 探索与利用 Exploration and Exploitation - 图13
贪心动作greedy action:使预期即时回报最大化的行为,即,使在二元赌博机问题中获胜的后验概率最大的行为。

3. 无向探索策略 Undirected Exploration Strategies

无向探索undirected exploration:一种特殊探索类型,不使用来自先前结果的信息来指导非贪婪行动的探索
最常见的无向探索策略之一是15 探索与利用 Exploration and Exploitation - 图14贪婪探索。该策略以15 探索与利用 Exploration and Exploitation - 图15的概率随机选择一个臂,以15 探索与利用 Exploration and Exploitation - 图16的概率选择贪婪的臂15 探索与利用 Exploration and Exploitation - 图17,其中,15 探索与利用 Exploration and Exploitation - 图18是使用上一节给出的贝叶斯模型通过动作15 探索与利用 Exploration and Exploitation - 图19获胜的后验概率。一种常见的调整是15 探索与利用 Exploration and Exploitation - 图20随时间衰减,例如使用指数衰减:15 探索与利用 Exploration and Exploitation - 图21,其中15 探索与利用 Exploration and Exploitation - 图22
另一种策略是explore-then-commit exploration,在前15 探索与利用 Exploration and Exploitation - 图23个时间步长中均匀地随机选择动作。在此之后,选择贪婪的动作。

4. 定向探索策略 Directed Exploration Strategies

定向探索directed exploration:使用从之前收集的信息来指导非贪心动作的探索,例如softmax探索策略。

  • softmax探索策略:以与15 探索与利用 Exploration and Exploitation - 图24成比例的概率选择动作15 探索与利用 Exploration and Exploitation - 图25精度参数15 探索与利用 Exploration and Exploitation - 图26在每一步都按系数15 探索与利用 Exploration and Exploitation - 图27进行缩放,以控制探索量。

各种探索策略都基于不确定性下的乐观主义思想。?

  • 分位数探索quantile exploration:选择15 探索与利用 Exploration and Exploitation - 图28分位数最高的臂作为收益概率。15 探索与利用 Exploration and Exploitation - 图29的值在不确定性下导致乐观,激励探索没有被尝试过的行动。15 探索与利用 Exploration and Exploitation - 图30值越大,探索越多。
  • UCB1探索 UCB1 exploration:选择能使15 探索与利用 Exploration and Exploitation - 图31最大化的行动15 探索与利用 Exploration and Exploitation - 图32,其中15 探索与利用 Exploration and Exploitation - 图33为采取行动15 探索与利用 Exploration and Exploitation - 图34的次数,且15 探索与利用 Exploration and Exploitation - 图3515 探索与利用 Exploration and Exploitation - 图36的值越大,需要进行更多的探索。
  • 后验采样posterior sampling/随机概率匹配randomized probability matching/Thompson sampling:实现简单,不需要仔细的参数调优。从与各种动作相关的奖励的后验分布中采样,选择具有最大采样值的动作。

    5. 最优探索策略 Optimal Exploration Strategies

    与臂15 探索与利用 Exploration and Exploitation - 图37相关的beta分布通过计数15 探索与利用 Exploration and Exploitation - 图38参数化。15 探索与利用 Exploration and Exploitation - 图39代表了对回报的信念,因此代表了一种信念状态belief state
    构造一个MDP,其状态是长度为15 探索与利用 Exploration and Exploitation - 图40的向量,表示智能体在15 探索与利用 Exploration and Exploitation - 图41臂赌博机问题上的信念。动态规划可以用来解决这个MDP,以获得一个最优的策略15 探索与利用 Exploration and Exploitation - 图42,指定要拉动的臂。
    15 探索与利用 Exploration and Exploitation - 图43表示拉动臂15 探索与利用 Exploration and Exploitation - 图44后的预期收益,然后找到最佳动作。最优效用函数和最优策略可以用15 探索与利用 Exploration and Exploitation - 图45表示:
    15 探索与利用 Exploration and Exploitation - 图46
    15 探索与利用 Exploration and Exploitation - 图47进行分解:
    15 探索与利用 Exploration and Exploitation - 图48
    15 探索与利用 Exploration and Exploitation - 图49更一般地表示为:
    15 探索与利用 Exploration and Exploitation - 图50
    其中,第一项和第二项分别与15 探索与利用 Exploration and Exploitation - 图51臂的胜利和失败相关。15 探索与利用 Exploration and Exploitation - 图52的值是获胜的后验概率(可调)。上式中的第一个15 探索与利用 Exploration and Exploitation - 图53记录一次胜利,而第二个15 探索与利用 Exploration and Exploitation - 图54记录一次失败。15 探索与利用 Exploration and Exploitation - 图5515 探索与利用 Exploration and Exploitation - 图56臂胜利的回报。
    虽然这个动态规划解是最优的,但信念状态的数目是15 探索与利用 Exploration and Exploitation - 图57,但计算成本很高

    6. 多状态探索 Exploration with Multiple States

    在具有多状态的一般强化学习环境中,必须使用有关状态转移的观测来为决策提供信息。
    将在接下来的几章中讨论很多方法来模拟问题和执行探索。