Skip to content

Instantly share code, notes, and snippets.

@ntddk
Created May 9, 2016 10:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ntddk/a7d5bd9501c7d1d492cbe50d6560a9e1 to your computer and use it in GitHub Desktop.
Save ntddk/a7d5bd9501c7d1d492cbe50d6560a9e1 to your computer and use it in GitHub Desktop.
学習メカニズムの更新式と変数

学習メカニズムの更新式

Q学習

\begin{equation} Q(s,a) \leftarrow Q(s,a) + \alpha \Bigl(r + \gamma \max_{a'∈A(s')} Q(s',a') - Q(s,a) \Bigr) \end{equation}

Sarsa

\begin{equation} Q(s,a) \leftarrow Q(s,a) + \alpha \Bigl(r + \gamma Q(s',a') - Q(s,a) \Bigr) \end{equation}

TD学習

\begin{equation} V(s) \leftarrow V(s) + \alpha \Bigl( r + \gamma V(s')-V(S) \Bigr) \end{equation}

シンプルバケツリレー・アルゴリズム

\begin{equation} \begin{split} Q(s,a) \leftarrow Q(s,a) + \Bigl(r + bid(s',a') - bid(s,a) \Bigr) \ ( Q(s,a) \leftarrow Q(s,a) + C_{bid} \Bigl(r/C_{bid} + Q(s',a') - Q(s,a) \Bigr) ) \end{split} \end{equation}

モンテカルロ法

\begin{equation} \begin{split} SumReward(s_{t},a_{t}) := SumReward(s_{t},a_{t}) +r, \ where t = 0,...,episode-1; Q(s,a) \leftarrow SumReward(s,)/RewardCount, \ ∀s∈S,∀a∈A \end{split} \end{equation}

シンプルProfit Sharing

\begin{equation} \begin{split} Q(s,a) \leftarrow Q(s_{t},a_{t}) + C_{bid} \Bigl( r(t)-Q(s_{t},a_{t}) \Bigl), \ where t=0,...,episode-1; \end{split} \end{equation}

学習メカニズムにおける関数

  • $ ActionSelect(Q,s) $
    • 状態$s$で実行可能な行動を$Q$値に基いて$1$つ選択する関数
  • $ ActionSelect(\pi,s) $
    • 状態$s$で実行可能な行動を政策$\pi$から選択する関数
  • $ ActionSelect(bid,s) $
    • 状態$s$で実行可能な行動を$bid$値に基いて$1$つ選択する関数
  • $ RuleSerect(Q,m) $
    • ルールマッチ集合${m}$から$Q$値に基いて$1$つのルールを選択する関数
  • $ RuleSerect(bid,m) $
    • ルールマッチ集合${m}$から$bid$値に基いて$1$つのルールを選択する関数
  • $ r_{t} $
    • 時間(ルール実行回数)に関する報酬関数

学習メカニズムにおける変数

全般にかかわるもの

  • $s,s'$
    • 状態,次状態
  • $s_{0},s_{n}$
    • 初期状態,最終状態
  • $a,a'$
    • 行動,つぎの行動
  • $S$
    • 全状態の集合
  • $A$
    • 全行動の集合
  • $A(s)$
    • 状態$s$において実行可能な行動の集合
  • $R$
    • ルール集合
  • $r$
    • 報酬
  • $i,i'$
    • 選択ルール番号,つぎの選択ルール番号
  • $\pi(s,a)$
    • 政策(状態$s$で行動$a$をとる確率)
  • $Q(s,a),Q(i)$
    • 状態$s$で行動$a$をとる価値,ルール$i$の価値
  • $V(s)$
    • 状態$s$の価値
  • $episode$
    • 報酬を得た直後(ない場合は初期状態)からつぎの報酬を得る(ない場合は最終状態)までのルール実行回数
  • $cycle$
    • 初期状態から最終状態を繰り返すサイクル数
  • $MAX_CYCLE$
    • 最大$cycle$数(システム設計者が入力)

個別の学習にかかわるもの

  • $\alpha$
    • 学習率
  • $\gamma$
    • 割引率
  • $bid(s,a),bid(i)$
    • $Q(s,a)$のセリ値,ルール$i$のセリ値
  • $C_{bid}$
    • セリ値を計算するときの係数
  • $D_{i}$
    • ルール$i$の特殊性
  • $M(s)$
    • 状態$s$と他の要素にマッチしたルール集合
  • $m$
    • マッチしたルール番号
  • $RewardCount$
    • 報酬獲得回数
  • $SumReward(s,a)$
    • 状態$s$で行動$a$をとったときに得られた累積報酬
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment