第17章強化学習
17.3.2. An Optimization Problem Underlying Q-Learning17.3.2 Q学習の背後にある最適化問題
Let us imagine that the robot uses a policy to take actions. Just like the previous chapter, it collects a dataset of trajectories of timesteps each . Recall that value iteration is really a set of constraints that ties together the action-value of different states and actions to each other. We can implement an approximate version of value iteration using the data that the robot has collected using as
英語のヒント
ロボットが方策を使って行動をとると想像しよう。前の章と同じように、ロボットは、それぞれ個の時間ステップからなる本の軌跡のデータセットを集める。価値反復は、実のところ、異なる状態と行動の行動価値を互いに結びつける制約の集合であることを思い出そう。ロボットがを使って集めたデータを使い、価値反復の近似版を次のように実装できる。
(17.3.2)
Let us first observe the similarities and differences between this expression and value iteration above. If the robot’s policy were equal to the optimal policy , and if it collected an infinite amount of data, then this optimization problem would be identical to the optimization problem underlying value iteration. But while value iteration requires us to know , the optimization objective does not have this term. We have not cheated: as the robot uses the policy to take an action at state , the next state is a sample drawn from the transition function. So the optimization objective also has access to the transition function, but implicitly in terms of the data collected by the robot.
英語のヒント
まず、この式と上の価値反復との類似点と相違点を見てみよう。ロボットの方策が最適方策に等しく、無限の量のデータを集めたとすれば、この最適化問題は価値反復の背後にある最適化問題と同一になるだろう。しかし、価値反復ではを知っている必要があるのに対して、この最適化の目的関数にはこの項がない。ずるをしたわけではない。ロボットが方策を使って状態で行動をとるので、次の状態は遷移関数から抜き出した標本である。したがって、最適化の目的関数も遷移関数にアクセスしているが、それはロボットが集めたデータを通じて暗黙のうちにである。
The variables of our optimization problem are for all and . We can minimize the objective using gradient descent. For every pair in our dataset, we can write
英語のヒント
この最適化問題の変数は、すべてのとについてのである。目的関数は勾配降下法で最小化できる。データセットの中のすべての組について、次のように書ける。
(17.3.3)
where is the learning rate. Typically in real problems, when the robot reaches the goal location, the trajectories end. The value of such a terminal state is zero because the robot does not take any further actions beyond this state. We should modify our update to handle such states as
英語のヒント
ここで、は学習率である。ふつう現実の問題では、ロボットが目標の場所に到達すると軌跡は終わる。そうした終端状態の価値は0である。ロボットはこの状態から先は何の行動もとらないからである。そうした状態を扱うため、更新を次のように変更すべきである。
(17.3.4)
where is an indicator variable that is one if is a terminal state and zero otherwise. The value of state-action tuples that are not a part of the dataset is set to . This algorithm is known as Q-Learning.
英語のヒント
ここで、は、が終端状態なら1、そうでなければ0になる指示変数である。データセットの一部でない状態と行動の組の価値はに設定する。このアルゴリズムはQ学習として知られている。
Given the solution of these updates , which is an approximation of the optimal value function , we can obtain the optimal deterministic policy corresponding to this value function easily using
英語のヒント
最適な価値関数の近似であるこれらの更新の解が与えられれば、この価値関数に対応する最適な決定的方策を、次の式を使って簡単に得られる。
(17.3.5)
There can be situations when there are multiple deterministic policies that correspond to the same optimal value function; such ties can be broken arbitrarily because they have the same value function.
英語のヒント
同じ最適な価値関数に対応する決定的方策が複数ある状況もありうる。そうした同点は、同じ価値関数をもつので、任意に決めてかまわない。