プリンキピア

第17章強化学習

17.2.2. Value Function17.2.2 価値関数

Imagine now that the robot starts at a state s0 and at each time instant, it first samples an action from the policy at∼π(st) and takes this action to result in the next state st+1. The trajectory τ=(s0,a0,r0,s1,a1,r1,…), can be different depending upon which particular action at is sampled at intermediate instants. We define the average return R(τ)=∑t=0∞γtr(st,at) of all such trajectories
英語のヒント
では、ロボットが状態s0から出発し、各時点で、まず方策から行動at∼π(st)を抜き出し、この行動をとって次の状態st+1に至ると想像しよう。軌跡τ=(s0,a0,r0,s1,a1,r1,…)は、途中の時点でどの特定の行動atが抜き出されるかによって異なりうる。そうしたすべての軌跡の平均の収益R(τ)=∑t=0∞γtr(st,at)を次のように定義する。
Vπ(s0)=Eat∼π(st)[R(τ)]=Eat∼π(st)[∑t=0∞γtr(st,at)],(17.2.1)
where st+1∼P(st+1∣st,at) is the next state of the robot and r(st,at) is the instantaneous reward obtained by taking action at in state st at time t. This is called the “value function” for the policy π. In simple words, the value of a state s0 for a policy π, denoted by Vπ(s0), is the expected γ-discounted return obtained by the robot if it begins at state s0 and takes actions from the policy π at each time instant.
英語のヒント
ここで、st+1∼P(st+1∣st,at)はロボットの次の状態、r(st,at)は時刻tに状態stで行動atをとって得られる即時の報酬である。これは方策πの「価値関数」と呼ばれる。簡単に言えば、Vπ(s0)で表される、方策πについての状態s0の価値は、ロボットが状態s0から出発し、各時点で方策πから行動をとったときに得られる、γで割り引いた収益の期待値である。
We next break down the trajectory into two stages (i) the first stage which corresponds to s0→s1 upon taking the action a0, and (ii) a second stage which is the trajectory τ′=(s1,a1,r1,…) thereafter. The key idea behind all algorithms in reinforcement learning is that the value of state s0 can be written as the average reward obtained in the first stage and the value function averaged over all possible next states s1. This is quite intuitive and arises from our Markov assumption: the average return from the current state is the sum of the average return from the next state and the average reward of going to the next state. Mathematically, we write the two stages as
英語のヒント
次に、軌跡を二つの段階に分ける。(i) 行動a0をとってs0→s1に移る最初の段階と、(ii) その後の軌跡τ′=(s1,a1,r1,…)である2番目の段階である。強化学習のすべてのアルゴリズムの背後にある鍵となる考え方は、状態s0の価値は、最初の段階で得られる平均の報酬と、ありうるすべての次の状態s1について平均した価値関数とで書けるということである。これはかなり直観的で、マルコフ性の仮定から生じる。現在の状態からの平均の収益は、次の状態からの平均の収益と、次の状態に行く平均の報酬との和である。数学的には、二つの段階を次のように書く。
Vπ(s0)=r(s0,a0)+γ Ea0∼π(s0)[Es1∼P(s1∣s0,a0)[Vπ(s1)]].(17.2.2)
This decomposition is very powerful: it is the foundation of the principle of dynamic programming upon which all reinforcement learning algorithms are based. Notice that the second stage gets two expectations, one over the choices of the action a0 taken in the first stage using the stochastic policy and another over the possible states s1 obtained from the chosen action. We can write (17.2.2) using the transition probabilities in the Markov decision process (MDP) as
英語のヒント
この分解はとても強力である。これは、すべての強化学習のアルゴリズムがもとづいている動的計画法の原理の基礎である。2番目の段階には二つの期待値がかかることに注意しよう。一つは、確率的方策を使って最初の段階でとる行動a0の選択についての期待値であり、もう一つは、選んだ行動から得られるありうる状態s1についての期待値である。マルコフ決定過程(MDP)の遷移確率を使って、(17.2.2)を次のように書ける。
Vπ(s)=∑a∈𝒜π(a∣s)[r(s,a)+γ ∑s′∈𝒮P(s′∣s,a)Vπ(s′)]; for all s∈𝒮.(17.2.3)
An important thing to notice here is that the above identity holds for all states s∈𝒮 because we can think of any trajectory that begins at that state and break down the trajectory into two stages.
英語のヒント
ここで注意すべき大切なことは、上の恒等式がすべての状態s∈𝒮について成り立つということである。その状態から始まる任意の軌跡を考え、その軌跡を二つの段階に分けられるからである。