プリンキピア

第17章強化学習

17.3.3. Exploration in Q-Learning17.3.3 Q学習での探索

The policy used by the robot to collect data πe is critical to ensure that Q-Learning works well. Afterall, we have replaced the expectation over s′ using the transition function P(s′∣s,a) using the data collected by the robot. If the policy πe does not reach diverse parts of the state-action space, then it is easy to imagine our estimate Qˆ will be a poor approximation of the optimal Q∗. It is also important to note that in such a situation, the estimate of Q∗ at all states s∈𝒮 will be bad, not just the ones visited by πe. This is because the Q-Learning objective (or value iteration) is a constraint that ties together the value of all state-action pairs. It is therefore critical to pick the correct policy πe to collect data.
英語のヒント
ロボットがデータを集めるのに使う方策πeは、Q学習がうまく働くことを確かにするうえで決定的に重要である。結局のところ、遷移関数P(s′∣s,a)を使ったs′についての期待値を、ロボットが集めたデータを使って置き換えたのである。方策πeが状態と行動の空間のさまざまな部分に到達しなければ、推定値Qˆが最適なQ∗の貧弱な近似になることは容易に想像できる。そうした状況では、πeが訪れた状態だけでなく、すべての状態s∈𝒮でQ∗の推定値が悪くなることにも注意することが大切である。これは、Q学習の目的関数(あるいは価値反復)が、すべての状態と行動の組の価値を互いに結びつける制約だからである。したがって、データを集めるために正しい方策πeを選ぶことは決定的に重要である。
We can mitigate this concern by picking a completely random policy πe that samples actions uniformly randomly from 𝒜. Such a policy would visit all states, but it will take a large number of trajectories before it does so.
英語のヒント
𝒜から一様にランダムに行動を抜き出す完全にランダムな方策πeを選べば、この懸念を和らげられる。そうした方策はすべての状態を訪れるだろうが、そうなるまでに多数の軌跡が必要になる。
We thus arrive at the second key idea in Q-Learning, namely exploration. Typical implementations of Q-Learning tie together the current estimate of Q and the policy πe to set
英語のヒント
こうして、Q学習の2番目の鍵となる考え方、つまり探索にたどり着く。Q学習の典型的な実装では、Qの現在の推定値と方策πeを結びつけて、次のように設定する。
πe(a∣s)={argmaxa′Qˆ(s,a′)with prob. 1−ϵuniform(𝒜)with prob. ϵ,(17.3.6)
where ϵ is called the “exploration parameter” and is chosen by the user. The policy πe is called an exploration policy. This particular πe is called an ϵ-greedy exploration policy because it chooses the optimal action (under the current estimate Qˆ) with probability 1−ϵ but explores randomly with the remainder probability ϵ. We can also use the so-called softmax exploration policy
英語のヒント
ここで、ϵは「探索パラメータ」と呼ばれ、利用者が選ぶ。方策πeは探索方策と呼ばれる。この特定のπeはϵグリーディ探索方策と呼ばれる。確率1−ϵで(現在の推定値Qˆのもとでの)最適な行動を選ぶが、残りの確率ϵでランダムに探索するからである。いわゆるソフトマックス探索方策を使うこともできる。
πe(a∣s)=eQˆ(s,a)/T∑a′eQˆ(s,a′)/T;(17.3.7)
where the hyper-parameter T is called temperature. A large value of ϵ in ϵ-greedy policy functions similarly to a large value of temperature T for the softmax policy.
英語のヒント
ここで、ハイパーパラメータTは温度と呼ばれる。ϵグリーディ方策でのϵの大きな値は、ソフトマックス方策での温度Tの大きな値と同じように働く。
It is important to note that when we pick an exploration that depends upon the current estimate of the action-value function Qˆ, we need to resolve the optimization problem periodically. Typical implementations of Q-Learning make one mini-batch update using a few state-action pairs in the collected dataset (typically the ones collected from the previous timestep of the robot) after taking every action using πe.
英語のヒント
行動価値関数Qˆの現在の推定値に依存する探索を選ぶときは、最適化問題を定期的に解き直す必要があることに注意することが大切である。Q学習の典型的な実装では、πeを使って行動をとるたびに、集めたデータセットの中のいくつかの状態と行動の組(ふつうはロボットの前の時間ステップで集めたもの)を使って、ミニバッチの更新を1回行う。