Reinforcement learning Q-学习:奖励计算的正确状态是什么 Q学习-奖励

Reinforcement learning Q-学习:奖励计算的正确状态是什么 Q学习-奖励,reinforcement-learning,q-learning,Reinforcement Learning,Q Learning,我正在努力解释Q学习算法的伪代码: 1 For each s, a initialize table entry Q(a, s) = 0 2 Observe current state s 3 Do forever: 4 Select an action a and execute it 5 Receive immediate reward r 6 Observe the new state s′ ← δ(a, s) 7 Update the table e

我正在努力解释Q学习算法的伪代码:

1  For each s, a initialize table entry Q(a, s) = 0
2  Observe current state s
3  Do forever:
4     Select an action a and execute it
5     Receive immediate reward r
6     Observe the new state s′ ← δ(a, s)
7     Update the table entry for Q(a, s) as follows:
8        Q( a, s ) ← R( s ) + γ * max Q( a′, s′ )
9     s ← s′

是否应从后续状态
s'
或当前状态
s
收集奖励?

应从执行操作
a
后输入的后续状态收集奖励