1 / 16

強化学習

強化学習. RT. 強化学習とは …. きっかけ A に対して行動 B をおこす. ごほうびをあたえる. 上記を繰り返しすることで、きっかけ A に対し 行動 B を起こしやすくなる. 強化学習の枠組み. 強化信号(報酬)r. 行動a. 状態 S. 環境. 環境. 学習者. 学習者は強化信号(報酬)が よりたくさんもらえるように行動を最適化していく. Monkey and Banana Problem.

hope
Download Presentation

強化学習

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 強化学習 RT

  2. 強化学習とは… きっかけAに対して行動Bをおこす ごほうびをあたえる 上記を繰り返しすることで、きっかけAに対し 行動Bを起こしやすくなる

  3. 強化学習の枠組み 強化信号(報酬)r 行動a 状態S 環境 環境 学習者 学習者は強化信号(報酬)が よりたくさんもらえるように行動を最適化していく

  4. Monkey and Banana Problem • Initial Situation: at(monkey,a) at(bananas,b) at(box,C) height(monkey,low) height(banana,high) height(box,low) !grasp(monkey,bananas) path(a,b) path(b,a) path(a,c) path(c,a) path(b,c) path(c,b) • Final Situation: has(monkey,bananas). • Four Actions • GO monkey from location x to location yIF at(monkey,x) path(x,y) • ADD go(monkey,y) at(monkey,y) • DELETE at(monkey,x) • GRASP monkey bananasIF at(monkey,x) at(bananas,x) height(monkey,y) height(bananas,y) ADD grasp(monkey,bananas) has(monkey,bananas) • CLIMB monkey on top of boxIF at(monkey,x) at(box,x) height(monkey,low) height(box,low) ADD climb(monkey,box) height(monkey,high) • DELETE height(monkey,low) • PUSH monkey box from location x to location yIF at(monkey,x) at(box,x) height(monkey,low) height(box,low) path(x,y) • ADD push(monkey,box,y) at(monkey,y) at(box,y) • DELETE at(monkey,x) at(box,x)

  5. Monkey and Banana Problem • Initial Situation: at(monkey,a) at(bananas,b) at(box,c) height(monkey,low) height(banana,high) height(box,low) !grasp(monkey,bananas) path(a,b) path(b,a) path(a,c) path(c,a) path(b,c) path(c,b) • Final Situation: has(monkey,bananas)

  6. Four Actions • GO monkey from location x to location y IF at(monkey,x) path(x,y) ADD go(monkey,y) at(monkey,y) DELETE at(monkey,x) • GRASP monkey bananas IF at(monkey,x) at(bananas,x) height(monkey,y) height(bananas,y) ADD grasp(monkey,bananas) has(monkey,bananas) • CLIMB monkey on top of box IF at(monkey,x) at(box,x) height(monkey,low) height(box,low) ADD climb(monkey,box) height(monkey,high) DELETE height(monkey,low) • PUSH monkey box from location x to location y IF at(monkey,x) at(box,x) height(monkey,low) height(box,low) path(x,y) ADD push(monkey,box,y) at(monkey,y) at(box,y) DELETE at(monkey,x) at(box,x)

  7. 強化学習の枠組み(その2) エージェント 観測入力 状態の同定 状態 環 境 ルール集合 ルール ルール候補の選択 強化 ルール候補 行為の実行 行為選択 学習器 報酬

  8. 補足 • 環境認識の際、十分な情報を認識できる 1.が十分でないと、同じ状態のものを 違う状態と誤認し、学習してしまう、 エイリアシンと呼ばれる問題生じる

  9. マルコフ決定過程 1 報酬 0.8 b 0.2 S1 S2 S3 a 0.4 0.6 c 遷移確率 行為 状態遷移図であらわす 報酬、状態、行為を示す 状態遷移確率は現在の状態のみに依存する 状態遷移確率は時間的に変動しない

  10. 行動決定 行為 b d a 状態S c e 状態sは政策πに従って将来得られるだろう報酬 を割り引いた割引期待報酬によって評価される 行動a V(s,π)= r(s, π(s))+ γ∑P(s,π(s),s´)V(s´,π) 各状態から行為を選ぶことを政策(Policy )という 環境 Vを最大にする政策πを最適政策という

  11. ただ、マルコフ決定過程があらかじめ、 完全に記述できるとは限らない。 多くの場合、状態空間や取りえる行動は 既知だが、遷移確率は未知 Q学習

  12. Q学習 • 遷移確率がわからなくても、   学習可能 • 評価値としてQ値を用いる • 実際の試行探索過程を通して  学習 • 状態と行為をペアとして考える

  13. 現在の状況をsとする 状態がs´になる 選択したルールのQ値の変更 Q学習法のながれ Q値の初期化 政策に従い行動決定 Q値の最大ルールの選択

  14. Q値の更新式 Q(s,a) (1-α) Q(s,a) + α (r(s,a)+γmaxQ(s´,a´)) a´ αは学習率(0≦α≦1) r(s,a)は報酬 γは割引率(0≦γ≦1)

  15. やってみようQ学習 S 1 2 3 4 5 6 7 8 9 10 G Q(1,down) Q(2,down) Q(1,right) Q(8,right) Q(7,right) Q(9,right) Q(6,right) 0 + 0.5(0 + 0.1 × 0.5 - 0) 0 + 0.5(0 + 0.1 × 0 - 0) 0 + 0.5(1 + 0.1 × 0 - 0) 0 + 0.5(0 + 0.1 × 0 - 0) 0 + 0.5(0 + 0.1 × 0 - 0) 0 + 0.5(0 + 0.1 × 0 - 0) 0 + 0.5(0 + 0.1 × 0 - 0) Q(9,right) 0.5 + 0.5(1 + 0.1 × 0 – 0.5) Q(s,a) Q(s,a) + α(r + γmaxQ(s´,a´) – Q(s,a)) a´ 行動はup,down,left,right r = 1か0 α = 0.5 γ = 0.1

  16. 参考文献 • 「インテリジェントシステム」  福田敏男編著 • 「人工知能の基礎」       馬場口登、山田誠二 共著 • 「強化学習」           三上貞旁、皆川雅章 共訳

More Related