Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Reinforcement Learning: An Introduction second ...

Avatar for S. Ota S. Ota
September 10, 2019

Reinforcement Learning: An Introduction second edition, Chapter 12 Eligibility Traces

Reinforcement Learning: An Introduction second edition
Chapter 12 Eligibility Traces

Sutton輪読会
太⽥ 晋
2019-09-10

Avatar for S. Ota

S. Ota

September 10, 2019
Tweet

More Decks by S. Ota

Other Decks in Research

Transcript

  1. Reinforcement Learning: An Introduction second edition Richard S. Sutton and

    Andrew G. Barto Sutton輪読会 第12章 Eligibility Traces 2019/9/10 太⽥ 晋
  2. ⽬次 • 12 Eligibility Traces • 12.1 The λ-return •

    12.2 TD(λ) • 12.3 n-step Truncated λ-return Methods • 12.4 Redoing Updates: Online λ-return Algorithm • 12.5 True Online TD(λ) • 12.6 *Dutch Traces in Monte Carlo Learning • 12.7 Sarsa(λ) • 12.8 Variable λ and γ • 12.9 *Off-policy Traces with Control Variates • 12.10 Watkinsʼs Q(λ) to Tree-Backup(λ) • 12.11 Stable Off-policy Methods with Traces • 12.12 Implementation Issues • 12.13 Conclusions
  3. 今回紹介する範囲 • 12 Eligibility Traces • 12.1 The λ-return •

    12.2 TD(λ) • 12.3 n-step Truncated λ-return Methods • 12.4 Redoing Updates: Online λ-return Algorithm • 12.5 True Online TD(λ) • 12.6 *Dutch Traces in Monte Carlo Learning • 12.7 Sarsa(λ) • 12.8 Variable λ and γ • 12.9 *Off-policy Traces with Control Variates • 12.10 Watkinsʼs Q(λ) to Tree-Backup(λ) • 12.11 Stable Off-policy Methods with Traces • 12.12 Implementation Issues • 12.13 Conclusions
  4. 適格度トレース(eligibility traces)とは • MC法とTD法を統⼀的にとらえる別の⽅法 • nステップブートストラッピング(7章)とは違う • 複合λリターン(compound λ-return)の実装⽅法 •

    基本的な考え⽅ • 短時間に徐々に薄れる記憶(short-term, fading memory) • 新しいスタイルのアルゴリズム • 前⽅視点 ⇔ 後⽅視点 の変換 • 前⽅視点(forward view) • 概念としては単純 → 理論や直感にはよい • 後⽅視点(backward view) • 計算論的に適した実装(computationally congenial implementation)
  5. 複合アップデートターゲット • 例: 2ステップを半分、4ステップを半分 • 複合バックアップ • 各項を導出 • 各項に重みをかける

    • 重みは正の数かつ合計が1 • nステップリターンと類似の誤差低減性?(error reduction property)を持ち収束が保証されている • nステップリターンだけではなく、異なるnに対するnス テップリターンの平均値(any average of n-step returns for different ns)も妥当なアップデートターゲットになり うる
  6. ランダムウォーク タスク (p. 125) • 中央のCから開始 • 左右の終端に達したらエピソード終了 • 右

    or 左 に等確率で移動 • 報酬: 右の終端で+1 • ディスカウントなし γ=1 • AからEまでの真の状態価値: 1/6, 2/6, 3/6, 4/6, 5/6 • 今回の実験では状態数19
  7. n-ステップ 切り捨てλ-リターン⼿法 n-step Truncated λ-return Methods • 理想はオフラインλ-リターンアルゴリズム • 問題点:

    エピソードが終了するまでλ-リターン がわからない • → 継続タスクでは事実上永遠にわからない • ただし、⻑く遅れてくる報酬の影響は γλ 倍で 毎ステップ弱くなる • → ⾃然な近似としていくつかのステップ以降を 切り捨てる • 切り捨て(truncated)λ-リターン
  8. TrueオンラインTD(λ) • オンライン λ-リターン アルゴ リズムが最良のパフォーマンス • しかし計算論的複雑性も⼤きい • 適格度トレースを使って前⽅視

    点のアルゴリズムを効率的な後 ⽅視点のアルゴリズムに転換 • 基本的な考え⽅はシンプル • 証明は⼤変 (12.6節) TrueオンラインTD(λ)は 対⾓成分だけを安価に計算
  9. 3つの適格度トレース • 累積トレース(accumulating traces) • ダッチトレースが使えない⾮線形関数近似で使われる • ダッチトレース(dutch traces, 割り勘?,

    累積と置換の間) • 多くの場合置換トレースより優れる。明確な理論的基盤がある • 置換トレース(replacing traces) • ダッチトレースの荒い近似
  10. 適格度トレース(eligibility traces)のまとめ • MC法とTD法を統⼀する効率的で逐次的(incremental)な⽅法 • MC法の利点 (⾮マルコフ性の問題に対して強い) • TD法の利点 (⾼速、計算論的に適している)

    • True オンライン TD(λ) が新しく、かつ、最適 • オンライン λ-リターン アルゴリズムと全く等価(exactly equivalent) • True オンライン Sarsa(λ) も同様に良いパフォーマンス • 3種類の適格度トレース • 累積(accumulating)・ダッチ(dutch)・置換(replacing) • 予測(prediction)とon-policy制御(control)の両⽅に使える • off-policy制御と予測にも使える • トレース⼿法は多くの場合nステップ⼿法より良い • トレースは計算コストが⼩さい (〜2倍)
  11. 参考資料 • Suttonの授業スライド • https://drive.google.com/drive/folders/0B3w765rOKuKAeVZIWmFa ZW1FTW8 • Suttonの授業ビデオ • https://drive.google.com/drive/folders/0B-

    WvrETGtkesN29sV1g3aXZ1Z0U • Pythonコード • https://github.com/ShangtongZhang/reinforcement-learning-an- introduction/tree/master/chapter12 • マウンテンカーとランダムウォークのコードがある