Q学习教程混淆
Q Learning tutorial confuse
我对任何机器学习方法都很陌生,我想我会尝试一下 Q-Learning。所以我一直在阅读这篇文章:
http://mnemstudio.org/path-finding-q-learning-tutorial.htm
令我困惑的是这个等式:
Q(1, 5) = R(1, 5) + 0.8 * Max[Q(5, 1), Q(5, 4), Q(5, 5)] = 100 + 0.8 * 0 = 100
这个 R(1, 5)
在教程中不断变化,从 100
到 0
然后又回到 100
,什么! R矩阵是静态的。
我认为一个错误是在第二个等式中使用 R(1, 5)
。如果你阅读文本,你会发现你当前处于状态 3
,你随机选择状态 1
去:
For the next episode, we start with a randomly chosen initial state. This time, we have state 3 as our initial state.
Look at the fourth row of matrix R; it has 3 possible actions: go to state 1, 2 or 4. By random selection, we select to go to state 1 as our action.
R(3, 1)
是0
,文章后面更新的Q
矩阵也有Q(3, 1)
.
的值填充
那么,公式应该是:
Q(3, 1) = R(3, 1) + 0.8 * Max[Q(1, 3), Q(1, 5)] = 0 + 0.8 * 100 = 80
(1, 2)
是 -1
,所以我认为使用它是错误的。文字甚至说:
Now we imagine that we are in state 1. Look at the second row of reward matrix R (i.e. state 1). It has 2 possible actions: go to state 3 or state 5
所以 R(1, 5)
没有改变:它总是 100
。它有时会与 R(3, 1)
混淆。
更新
这是本教程的另一部分,我认为为了清晰和正确以及我认为它应该按顺序说的内容应该进行更改。我将所做的更改加粗了。
The updated entries of matrix Q, Q(5, 1), Q(5, 4), Q(5, 5), are all zero. The result of this computation for Q(1, 5) is 100 because of the instant reward from R(5, 1). This result does not change the Q matrix.
更改为:
矩阵 Q、Q(5, 1)、Q(5, 4)、Q(5, 5) 的更新条目( 如前所述,从之前的操作中更新), 均为零。由于 R(1, 5) 的即时奖励,Q(1, 5) 的计算结果为 100。此结果不会改变 Q 矩阵。
我对任何机器学习方法都很陌生,我想我会尝试一下 Q-Learning。所以我一直在阅读这篇文章:
http://mnemstudio.org/path-finding-q-learning-tutorial.htm
令我困惑的是这个等式:
Q(1, 5) = R(1, 5) + 0.8 * Max[Q(5, 1), Q(5, 4), Q(5, 5)] = 100 + 0.8 * 0 = 100
这个 R(1, 5)
在教程中不断变化,从 100
到 0
然后又回到 100
,什么! R矩阵是静态的。
我认为一个错误是在第二个等式中使用 R(1, 5)
。如果你阅读文本,你会发现你当前处于状态 3
,你随机选择状态 1
去:
For the next episode, we start with a randomly chosen initial state. This time, we have state 3 as our initial state.
Look at the fourth row of matrix R; it has 3 possible actions: go to state 1, 2 or 4. By random selection, we select to go to state 1 as our action.
R(3, 1)
是0
,文章后面更新的Q
矩阵也有Q(3, 1)
.
那么,公式应该是:
Q(3, 1) = R(3, 1) + 0.8 * Max[Q(1, 3), Q(1, 5)] = 0 + 0.8 * 100 = 80
(1, 2)
是 -1
,所以我认为使用它是错误的。文字甚至说:
Now we imagine that we are in state 1. Look at the second row of reward matrix R (i.e. state 1). It has 2 possible actions: go to state 3 or state 5
所以 R(1, 5)
没有改变:它总是 100
。它有时会与 R(3, 1)
混淆。
更新
这是本教程的另一部分,我认为为了清晰和正确以及我认为它应该按顺序说的内容应该进行更改。我将所做的更改加粗了。
The updated entries of matrix Q, Q(5, 1), Q(5, 4), Q(5, 5), are all zero. The result of this computation for Q(1, 5) is 100 because of the instant reward from R(5, 1). This result does not change the Q matrix.
更改为:
矩阵 Q、Q(5, 1)、Q(5, 4)、Q(5, 5) 的更新条目( 如前所述,从之前的操作中更新), 均为零。由于 R(1, 5) 的即时奖励,Q(1, 5) 的计算结果为 100。此结果不会改变 Q 矩阵。