gpt4 book ai didi

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

转载 作者:塔克拉玛干 更新时间:2023-11-03 04:04:03 27 4
gpt4 key购买 nike

在 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/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com