algorithm - 马尔可夫强化学习的拟合值迭代算法

标签 algorithm machine-learning reinforcement-learning model-fitting

在 Andrew Ng 的拟合值迭代算法中,我给出了如下详细步骤,它会在步骤 3 中尝试找到一个状态 s(i) 的最佳 Action 。当代理处于 s(i) 时,我们执行可能的 Action a(1),我们转移到 s(i)'。

我的问题是我们如何才能再次恢复到 s(i) 并执行第二个可能的操作 a(2)?假设,我们用这个算法来控制一架直升机,我认为我们不能轻易地恢复状态。

算法

1. Randomly sample m states s(1), s(2), . . . s(m) ∈ S.
2. Initialize θ := 0.
3. Repeat {
    For i = 1, . . . , m {
        For each action a ∈ A {
            Sample s′ 1, . . . , s′ k ∼ Ps(i)a (using a model of the MDP).
            Set q(a) = k1 Pk j=1 R(s(i)) + γV (s′ j)
            // Hence, q(a) is an estimate of R(s(i))+γEs′∼P
            s(i)a[V (s′)].
        }
        Set y(i) = maxa q(a).
        // Hence, y(i) is an estimate of R(s(i))+γ maxa Es′∼P
        s(i)a[V (s′)].
   }
   // In the original value iteration algorithm (over discrete states)
   // we updated the value function according to V (s(i)) := y(i).
   // In this algorithm, we want V (s(i)) ≈ y(i), which we’ll achieve
   // using supervised learning (linear regression).
   Set θ := arg minθ 1 2 Pm i=1 θT φ(s(i)) − y(i)2
}

最佳答案

请注意,您在第 4.2.2 节中描述的算法是 4.2“父”部分的一部分。值(value)函数近似。第一部分是4.2.1 使用模型或仿真

在第一节中,我们可以读到:

To develop a value function approximation algorithm, we will assume that we have a model, or simulator, for the MDP. Informally, a simulator is a black-box that takes as input any (continuous-valued) state s_t and action a_t, and outputs a next-state s_{t+1} sampled according to the state transition probabilities P_{s_t, a_t}

因此,该算法假设您可以使用 de 模型/模拟器来模拟您将所有可能的操作应用于同一状态。正如您所注意到的,如果您有一个真实的环境(即,既不是模型也不是模拟器),例如直升机,则不可能对同一状态应用多个 Action ,因为在应用 Action 之后状态会改变。

关于algorithm - 马尔可夫强化学习的拟合值迭代算法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55447787/

相关文章:

c - 通过 MPI 的并行、分支和绑定(bind)旅行推销员

algorithm - 设计用于 DDOS 预防的并行算法?

c++ - 给定邻接表有向图,如何仅获得 2 个节点之间的最短路径?

matlab - MATLAB 内置 Factoran() 出现“statsfminbx”错误

machine-learning - Q 学习代理的学习率

java - Baum-Welch 实现示例

python - 在 sklearn 中预测训练数据

R插入符火车glmnet最终模型lambda值不符合指定

python - OpenAI Gym 自定义环境 : Discrete observation space with real values

artificial-intelligence - Delphi/Pascal 中的 TD(λ)(时间差分学习)