JP2006309519A - Reinforcement learning system and reinforcement learning program - Google Patents
Reinforcement learning system and reinforcement learning program Download PDFInfo
- Publication number
- JP2006309519A JP2006309519A JP2005131570A JP2005131570A JP2006309519A JP 2006309519 A JP2006309519 A JP 2006309519A JP 2005131570 A JP2005131570 A JP 2005131570A JP 2005131570 A JP2005131570 A JP 2005131570A JP 2006309519 A JP2006309519 A JP 2006309519A
- Authority
- JP
- Japan
- Prior art keywords
- value
- state
- determination
- reward
- learning
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Feedback Control In General (AREA)
Abstract
Description
本発明は、強化学習システム、及び強化学習プログラムに関するものであり、特に、二足歩行型ロボットや惑星探査に利用される探査装置等のように、周囲環境の変化や発生する種々の事象を体験または経験し、ロボット等が学習によって自律的に行動を決定することが可能な強化学習を実施するための強化学習システム、及び強化学習プログラムに関するものである。 The present invention relates to a reinforcement learning system and a reinforcement learning program. In particular, the present invention experiences changes in the surrounding environment and various events that occur, such as a biped robot and a search device used for planetary exploration. The present invention also relates to a reinforcement learning system and a reinforcement learning program for performing reinforcement learning that can be experienced and a robot or the like can determine an action autonomously by learning.
従来からロボット等の自律的な制御を可能とするために、所謂「強化学習」と呼ばれる学習手法が用いられることがある(例えば、非特許文献1参照)。ここで、「強化学習」は、一般に学習対象(エージェント)が、ある環境の中を無作為的に行動し、その結果として目標に到達することによって初めて報酬を得るものである。そして、次エピソードの際に、エージェントが以前に経験したエピソードと同一の状況に遭遇した場合、以前の経験に基づいて報酬を得る可能性の高い行動を選択する可能性が高くなる。そして、エージェントが報酬を得るエピソードを繰返すことにより、最終的に全ての状態(場面)において、報酬を得ることが可能な最適な行動を選択するように学習をすることができる。 Conventionally, a learning method called “reinforcement learning” is sometimes used to enable autonomous control of a robot or the like (see, for example, Non-Patent Document 1). Here, “reinforcement learning” is a method in which a learning object (agent) generally obtains a reward only when a user randomly acts in a certain environment and reaches a target as a result. In the next episode, if the agent encounters the same situation as the previous episode, the possibility of selecting an action with a high possibility of obtaining a reward based on the previous experience increases. Then, by repeating episodes in which the agent obtains rewards, it is possible to learn to finally select an optimal action that can obtain rewards in all states (scenes).
ここで、強化学習において、最も代表的な例として「Q学習(Q−Learning)」と呼ばれる学習手法が知られている。Q学習は、予め初期値が与えられた最適行動価値関数を示すQ値を直接的に近似するものであり、強化学習が実施される環境における全状態数と全可能行動数とを掛け合わせた積によって示されるものである。 Here, in reinforcement learning, a learning method called “Q-learning” is known as the most typical example. Q-learning is a direct approximation of the Q-value indicating an optimal action value function that is given an initial value in advance, and is multiplied by the total number of states and the total number of possible actions in the environment in which reinforcement learning is performed. It is indicated by the product.
このとき、エージェントの学習(換言すれば、Q値の更新)は、下記に示す式(5)によって行われる。ここで、Q(s,a)(Q値に相当)は、状態sにおける行動aの価値を示し、αは学習のステップサイズ、γは割引率、rは報酬、Tは目標値を表している。具体的に示すと、Q学習システムは、図7に示すように、最適行動価値関数を示すQ値の全てを所定の値に初期化(例えば、全てのテーブルに対し、Q=0を与える等)し(ステップT1)、その後、学習対象となるエージェントの状態sを観測する(ステップT2)。さらに、当該エージェントの状態sからの行動aを出力する(ステップT3)。そして、行動aの結果に基づく次状態s’を観測し(ステップT4)、報酬rを獲得する(ステップT5)。その後、下記の式(5)を利用し、学習(Q値の更新)がなされる(ステップT6)。そして、次状態s’を状態sに置換する処理を行う(ステップT7)。そして、再びステップT3の処理に戻り、エージェントの学習を継続する。その結果、個々の行動aに対して、Q値が更新され、エージェントが目標に到達し、報酬rを得るまでの過程(エピソードに相当)を複数回に亘って繰り返すことにより、ステップサイズαに基づいて徐々に最適なQ値に近似するようになる。これにより、Q値の更新によって、学習初期の段階に比べ、目標に到達するまでの所要時間や所要行動数等を短縮することができる。 At this time, learning of the agent (in other words, updating of the Q value) is performed by the following equation (5). Here, Q (s, a) (corresponding to the Q value) indicates the value of the action a in the state s, α is the learning step size, γ is the discount rate, r is the reward, and T is the target value. Yes. Specifically, as shown in FIG. 7, the Q learning system initializes all the Q values indicating the optimum action value function to predetermined values (for example, assigns Q = 0 to all the tables, etc.) (Step T1), and then the state s of the agent to be learned is observed (Step T2). Furthermore, the action a from the state s of the agent is output (step T3). Then, the next state s ′ based on the result of the action a is observed (step T4), and the reward r is acquired (step T5). Thereafter, learning (update of Q value) is performed using the following equation (5) (step T6). Then, a process of replacing the next state s' with the state s is performed (step T7). And it returns to the process of step T3 again and continues learning of an agent. As a result, for each action a, the Q value is updated, and the process until the agent reaches the target and obtains the reward r (corresponding to an episode) is repeated a plurality of times. Based on this, the optimum Q value is gradually approximated. Thereby, by updating the Q value, the time required to reach the target, the number of required actions, and the like can be shortened as compared with the initial stage of learning.
しかしながら、上述したQ学習を用いた強化学習の場合、その学習速度の遅さ、特に学習初期の段階における学習効率が悪いことが問題であった。すなわち、上述の式(5)によるQ学習の基本式によれば、ステップサイズα(0<α<1)は、学習の速度を決定するためのパラメータであり、Q値の更新の効率を決定するものである。ところが、ステップサイズαは、0<α<1の範囲で与えられる数値であり、第1式右辺第1項に比べ、Q値全体に対する右辺第2項の値は極めて小さくなる。そのため、Q値全体において、第1式右辺第1項は支配的となり、得られた報酬がQ値全体に反映することは非常に小さかった。その結果、近似されたQ値を得ようとする場合、エージェントは非常に多くの経験(エピソード)を繰返す必要があった。特に、Q値から大幅に離れた初期値が設定された場合には、学習に要する時間が多くなり、特にエージェントの状態数が増加することによって、必要となる学習時間は指数関数的に増大する結果となった。 However, in the case of reinforcement learning using Q-learning described above, there is a problem that the learning speed is slow, in particular, the learning efficiency is low in the initial learning stage. That is, according to the basic equation of Q learning by the above equation (5), the step size α (0 <α <1) is a parameter for determining the learning speed, and determines the update efficiency of the Q value. To do. However, the step size α is a numerical value given in the range of 0 <α <1, and the value of the second term on the right side with respect to the entire Q value is extremely small compared to the first term on the right side of the first equation. Therefore, in the entire Q value, the first term on the right side of the first expression is dominant, and the obtained reward is very little reflected in the entire Q value. As a result, when trying to obtain an approximated Q value, the agent had to repeat a great number of experiences (episodes). In particular, when an initial value that is significantly different from the Q value is set, the time required for learning increases. In particular, the required learning time increases exponentially as the number of agent states increases. As a result.
また、式(5)における目標値Tを算出するための第2式では、右辺第2項(ステップサイズαを除く)の値も、学習開始の段階では任意の初期値が与えられることがあった。そのため、仮に与えれる初期値が正確である保証はなく、目標値Tに到達させるために、エージェントを繰返し行動させることに何の意味を伴わないケースもあった。 In the second equation for calculating the target value T in equation (5), the value of the second term on the right side (excluding the step size α) may be given an arbitrary initial value at the start of learning. It was. For this reason, there is no guarantee that the initial value given is accurate, and there is a case where there is no meaning in causing the agent to repeatedly act in order to reach the target value T.
そこで、本発明は、上記実情に鑑み、学習初期の段階におけるエージェントの学習速度を飛躍的に向上させることが可能な強化学習システム、及び強化学習プログラムを提供することを課題とするものである。 Therefore, in view of the above circumstances, an object of the present invention is to provide a reinforcement learning system and a reinforcement learning program capable of dramatically improving the learning speed of an agent in an early stage of learning.
上記の課題を解決するため、本発明にかかる強化学習システムは、「行動価値関数または状態価値関数を含む価値関数を示す価値Vの初期値を未定義に設定する未定義設定手段と、強化学習を行う学習対象のエージェントの状態を観測する状態観測手段と、前記状態における前記エージェントの行動を出力する行動出力手段と、出力された前記行動によって遷移する前記エージェントの次状態を観測する次状態観測手段と、前記次状態に遷移した前記エージェントに報酬rを提供する報酬提供手段と、前記報酬、及び前記次状態における前記価値関数を示す次価値V’を、予め規定された判定基準に従って判定する判定手段と、前記判定手段の前記判定基準に従って、前記報酬が零及び前記次価値V’が未定義であると判定されると、前記の学習処理または初期化処理をキャンセルする未学習手段と、前記状態における前記価値Vを第二判定基準に従って判定する第二判定手段と、前記第二判定手段の前記第二判定基準に従って、前記価値Vが定義済みであると判定されると、次式:
に基づいて、前記価値Vを更新し、学習する学習手段と、前記第二判定手段の前記第二判定基準に従って、前記価値Vが未定義であると判定されると、次式:
If it is determined that the value V is undefined according to learning means for updating and learning the value V and the second determination criterion of the second determination means based on
なお、本発明の強化学習システムを「TD学習」に適用する場合には、上記式(6)を下記の式(8)に置換して用い、式(7)を式(9)に置換して用いることが可能である。また、「Sarsa」に適用する場合には、式(6)を下記の式(10)に置換して用い、式(7)を式(11)に置換して用いることが可能である。さらに、「Q学習」に適用する場合には、式(6)を下記の式(12)に置換して用い、式(7)を式(13)に置換して用いることが可能である。すなわち、本発明は、価値関数(行動価値関数及び状態価値関数等を含む)を最適価値関数へ漸近する学習方式を採用する強化学習に適用することが可能である。なお、TD学習の場合、状態価値関数V(s)が価値関数に相当し、次価値は「状態価値」に相当する。また、Sarsaの場合、次価値は「実際に行動した行動価値」に相当し、Q学習の場合、次価値は「最大の行動価値」に相当する。なお、請求項及び式(6)及び式(7)において便宜上、行動価値関数を示すQ値によって表現しているが、状態価値関数V(s)で上記式(6)及び式(7)を表すものであっても構わない(式(8)及び式(9)参照)。なお、説明を簡略化するため、以下はQ学習に適用した場合について説明を行うものとする。
したがって、本発明の強化学習システムによれば、Q値の初期値が予め定義された任意の値(例えば、Q=0等)に設定されるものではなく、未定義の状態に設定される。そして、係る設定条件に基づいて、エージェントの現在の状態を観測し、行動を出力する。さらに、当該行動の結果として遷移したエージェントの次状態を観測し、係る行動による報酬をエージェントに提供する。なお、現在の状態の観測から報酬を提供するまでの一連の処理は、従来のQ学習において実施されるものと同様である。その後、判定手段の判定基準によってそれまでの処理が判定される。 Therefore, according to the reinforcement learning system of the present invention, the initial value of the Q value is not set to a predetermined value (for example, Q = 0, etc.) but is set to an undefined state. Based on the set condition, the current state of the agent is observed and the action is output. Furthermore, the next state of the agent that has transitioned as a result of the action is observed, and a reward for the action is provided to the agent. Note that a series of processing from observation of the current state to provision of reward is the same as that performed in conventional Q-learning. Thereafter, the processing so far is determined according to the determination criteria of the determination means.
ここで、判定手段では、獲得した報酬が零以外の値を有するか否か、及び次Q値が定義済み若しくは未定義かの判定が行われる。このとき、従来のQ学習においては、報酬はエージェントが目標(ゴール)に到達した際に初めて供与されるように設定されていることが多い。すなわち、報酬が零の場合、エージェントは目標に未到達の状態を示すことになり、かつ、次状態の次Q値が未定義の場合は、式(6)における右辺第2項は、”目標値が問題の解に対する情報を含んでいない”こととなる。そのため、係る状況が判定手段によって判定されると、学習しない(未学習)の処理が行われる。すなわち、双方の基準のいずれか一方でも条件をクリアすることにより、事後の学習処理または初期化処理のいずれかが行われる。 Here, in the determination means, it is determined whether the acquired reward has a value other than zero and whether the next Q value is already defined or not defined. At this time, in the conventional Q-learning, the reward is often set to be provided only when the agent reaches the goal (goal). That is, when the reward is zero, the agent indicates a state where the goal has not been reached, and when the next Q value of the next state is undefined, the second term on the right side in Equation (6) is “target The value does not contain information about the solution to the problem. Therefore, when such a situation is determined by the determination unit, a process of not learning (unlearned) is performed. In other words, either the post-learning process or the initialization process is performed by clearing the condition of either one of the two criteria.
そして、判定手段の判定基準に従って、”報酬が零以外の値を有する”及び/または”次Q値が定義済みである”のいずれか一方の条件でも満たす場合、第二判定手段によって現在の状態におけるQ値を対象とした判定が行われる。このとき、現在の状態の価値(Q値)が未定義であると判定される場合、式(7)に基づいてQ値の初期化が行われる。すなわち、式(6)における右辺第1項は、Q値が未定義であるため、無意味となる。そこで、式(7)に示すように、獲得した報酬の値と、Q値が最大となる値を利用して初期化が図られる。これにより、Q値が定義された状態となる。一方、Q値が定義済みの場合、式(6)における右辺第1項及び右辺第2項のいずれもが意味を有する、換言すれば、”目標値が問題の解に対する情報を含んでいる”こととなる。 Then, according to the determination criteria of the determination means, if any one of the conditions “reward has a value other than zero” and / or “next Q value is already defined” is satisfied, the second determination means The determination for the Q value at is performed. At this time, when it is determined that the value (Q value) of the current state is undefined, the Q value is initialized based on Expression (7). That is, the first term on the right side in Equation (6) is meaningless because the Q value is undefined. Therefore, as shown in Expression (7), initialization is achieved using the value of the acquired reward and the value that maximizes the Q value. As a result, the Q value is defined. On the other hand, when the Q value has been defined, both the first term on the right side and the second term on the right side in Equation (6) have meaning, in other words, “the target value includes information about the solution of the problem”. It will be.
そのため、式(6)を利用して、Q値の更新(=学習)する処理が行われる。その後、遷移した次状態を新たな状態に更新し、状態の観測→行動の出力→次状態の観測→報酬の獲得→判定(判定手段及び/または第二判定手段)→未学習・初期化・学習処理がエピソード毎に繰返し実施される。これにより、エージェントの学習が進行する。このとき、Q値を更新する際に意味を有しないケースの場合(報酬=0、かつ次Q値が未定義)、学習がキャンセルされる。そのため、最適なQ値に徐々に近似する際に、任意に設定された初期値によって学習回数を無駄にすることがなくなる。さらに、報酬が零以外の値を有し、Q値が未定義の状態にのみ初期値が与えられることにより、与えられる初期値は従来のものと比べ、有意な値である。その結果、最適なQ値に近似し、収束する可能性が高くなり、学習効率が向上する。特に、学習初期の段階における初期値の設定が、意味を成さない場合は省略されるため、近似されるQ値との間に大きな差異を生じることがなくなる。 For this reason, a process of updating (= learning) the Q value is performed using Expression (6). After that, the transitioned next state is updated to a new state, state observation → action output → next state observation → reward acquisition → determination (determination means and / or second determination means) → unlearned / initialized / The learning process is repeated for each episode. Thereby, learning of the agent proceeds. At this time, in the case where there is no meaning in updating the Q value (reward = 0 and the next Q value is undefined), the learning is canceled. For this reason, when gradually approximating the optimum Q value, the number of learnings is not wasted by an arbitrarily set initial value. Furthermore, since the reward has a value other than zero and the initial value is given only to the state where the Q value is undefined, the given initial value is a significant value compared to the conventional one. As a result, the possibility of approximating the optimum Q value and convergence is increased, and learning efficiency is improved. In particular, since the setting of the initial value at the initial stage of learning is omitted when it does not make sense, there is no significant difference from the approximated Q value.
さらに、本発明にかかる強化学習システムは、上記構成に加え、「前記判定手段は、前記報酬が零以外の値を有するか否かを判定する報酬判定基準に従って判定する報酬判定手段と、前記次価値V’が定義済みか否かを判定する次価値判定基準に従って判定する次価値判定手段と」を具備するものであっても構わない。 Further, the reinforcement learning system according to the present invention includes, in addition to the above-described configuration, “the determination unit determines a reward according to a determination criterion for determining whether the reward has a value other than zero, and the next And “next value determination means for determining according to a next value determination criterion for determining whether or not the value V ′ has been defined”.
したがって、本発明の強化学習システムによれば、報酬判定手段及び次Q値判定手段を個々に有して形成されている。これにより、双方の基準に基づく判定によって、強化学習のアルゴリズムを、未学習、初期化、及び学習のそれぞれの処理に的確に分類することが可能となり、特に、学習初期の段階における学習効率を飛躍的に向上させることができる。 Therefore, according to the reinforcement learning system of the present invention, the reward determination means and the next Q value determination means are individually provided. This makes it possible to accurately classify the reinforcement learning algorithm into unlearned, initialized, and learned processes based on the determination based on both criteria, and in particular, leap in learning efficiency at the initial stage of learning. Can be improved.
一方、本発明にかかる強化学習プログラムは、「行動価値関数または状態価値関数を含む価値関数を示す価値Vの初期値を未定義に設定する未定義設定手段、強化学習を行う学習対象のエージェントの状態を観測する状態観測手段、前記状態における前記エージェントの行動を出力する行動出力手段、出力された前記行動によって遷移する前記エージェントの次状態を観測する次状態観測手段、前記次状態に遷移した前記エージェントに報酬rを提供する報酬提供手段、前記報酬、及び前記次状態における前記価値関数を示す次価値V’を、予め規定された判定基準に従って判定する判定手段、前記判定手段の前記判定基準に従って、前記報酬が零及び前記次価値V’が未定義であると判定されると、前記の学習処理または初期化処理をキャンセルする未学習手段、前記状態における前記価値Vを第二判定基準に従って判定する第二判定手段、前記第二判定手段の前記第二判定基準に従って、前記価値Vが定義済みであると判定されると、次式:
に基づいて、前記価値Vを更新し、学習する学習手段、前記第二判定手段の前記第二判定基準に従って、前記価値Vが未定義であると判定されると、次式:
If the value V is determined to be undefined according to the second determination criterion of the learning means that updates and learns the value V, and the second determination means based on:
さらに、本発明にかかる強化学習プログラムは、上記構成に加え、「前記報酬が零以外の値を有するか否かを判定する報酬判定基準に従って判定する報酬判定手段、及び、前記次価値V’が定義済みか否かを判定する次価値判定基準に従って判定する次価値判定手段を有する前記判定手段として、前記強化学習コンピュータをさらに機能させる」ものであっても構わない。 Furthermore, the reinforcement learning program according to the present invention includes, in addition to the above configuration, “a reward determination means for determining according to a reward determination criterion for determining whether or not the reward has a value other than zero, and the next value V ′. The reinforcement learning computer may be further functioned as the determination means having the next value determination means for determining according to the next value determination criterion for determining whether or not it has been defined.
したがって、本発明の強化学習プログラムによれば、プログラムを実行することにより、強化学習コンピュータは、上述した強化学習システムにおける優れた作用を奏することが可能となる。 Therefore, according to the reinforcement learning program of the present invention, by executing the program, the reinforcement learning computer can exhibit an excellent action in the above-described reinforcement learning system.
本発明の効果として、最初に価値関数を示すQ値を未定義に設定することにより、従来のように近似された価値からの学習初期段階における初期値の大幅な逸脱を防ぐことができる。その結果、学習初期における学習時間を短縮し、エージェントの学習効率を大幅に増大することができる。さらに、判定手段及び第二判定手段によって、それぞれの状態(状況)に応じて、強化処理を未学習、初期化、及び学習の三態様の処理を実施することが可能となり、価値の更新が従来と比して効率的に行われるようになる。その結果、学習効率が向上し、従来のQ学習等の価値関数を最適価値関数へ漸近する学習方式に比してQ値を最適な値に近似し、収束させるための時間を大幅に短縮することができる。 As an effect of the present invention, by initially setting the Q value indicating the value function to be undefined, it is possible to prevent a significant deviation of the initial value in the initial stage of learning from the value approximated as in the past. As a result, the learning time at the initial learning stage can be shortened and the learning efficiency of the agent can be greatly increased. Furthermore, according to each state (situation), the determination unit and the second determination unit can perform the three types of processing of unlearning, initialization, and learning according to each state (situation). It will be performed more efficiently than As a result, the learning efficiency is improved, and the time for approximating the Q value to the optimum value and converging is greatly reduced as compared with the learning method in which the value function such as conventional Q learning is asymptotic to the optimum value function. be able to.
以下、本発明の一実施形態である強化学習システム1について、図1乃至図7に基づいて説明する。ここで、図1は本実施形態の強化学習システム1に使用される強化学習コンピュータ2の機能的構成を示すブロック図であり、図2は強化学習システム1における学習手順3(学習アルゴリズム)を表現した説明図であり、図3は判定手段20及び第二判定手段23の判定に基づいて実施される処理を一覧表形式に分類した説明図であり、図4は強化学習コンピュータ2の処理の流れを示すフローチャートであり、図5は(a)100×100のグリッドワールド4、及び(b)Q値データ29の一例を示す説明図であり、図6は強化学習システム1及びQ学習システム5のシミュレーション結果を比較したグラフである。
Hereinafter, a
ここで、本実施形態の強化学習システム1は、従来のQ学習を基にして適用されたものについて例示している。そして、強化学習コンピュータ2は、予めハードディスク等の記憶媒体(記憶手段32等)に記憶された強化学習プログラム6を実行し、機能させるが過可能に構築されている。また、強化学習プログラム6は、図2に示す学習手順3及び図3に示す判定基準19,23aに従って強化学習システム1を機能させるようにプログラムされている。加えて、図1乃至図6の一部において、Q値11をQ(s,a)、次Q値18をQ(s’,a)と便宜的に示している。
Here, the
さらに、詳細に説明すると、本実施形態の強化学習システム1は、図1に示されるように、種々の演算処理及び記憶処理等を実行可能な強化学習コンピュータ2によって構成されている。ここで、強化学習コンピュータ2は、周囲の環境Eの状態sを観測し、該観測結果に応じて所定の行動aを出力するように制御可能なエージェント13と接続している。なお、本実施形態では、該エージェント13はコンピュータ上に仮想的に構築されたグリッドワールド4内を移動可能な仮想体として存在している。ここで、係るエージェント13は、例えば、複数のセンサ(例えば、視覚センサ等)を備え、駆動走行手段によって自律的に移動可能な自律移動型ロボットのような実体物を利用し、周囲の環境Eに対する行動を適宜出力するものを用いるものであっても構わない。
More specifically, as shown in FIG. 1, the
さらに、強化学習コンピュータ2は、その他の機能的構成として、図1に主に示すように、最適行動価値関数Q値11の初期値を未定義に設定する未定義設定手段12と、強化学習の行われるエージェント13の周囲の環境Eに対する状態s(ここでは、後述するグリッドワールド4における位置)を観測(認識)する状態観測手段14と、状態sにおけるエージェント13の行動を予め規定された複数の行動基準の中から選択し、該行動aを出力する行動出力手段15と、行動aによって状態sから遷移するエージェント13の次状態s’を観測する次状態観測手段16と、次状態s’に遷移したエージェント13に報酬rを提供する報酬提供手段17と、報酬r及び次状態s’に従って判定をする判定手段20と、判定基準19に従って、報酬rの値が零及び次Q値18が未定義状態であると判定手段20によって判定がされると、Q値11の更新による学習処理及びQ値11の初期化処理のいずれもをキャンセルし、”学習しない状態にする”未学習処理を行う未学習手段21と、状態sにおけるQ値11を第二判定基準23aに従って判定する第二判定手段23と、第二判定手段23の第二判定基準23aに従って、Q値11が定義済みと判定されると、式A(図4及び式(1)等参照)に基づいて、Q値を更新する処理を行い、学習を実施する学習手段24と、Q値が未定義と判定されると、式B(図4及び式(2)等参照)に基づいて、Q値11を初期化する初期化手段25と、未学習、学習、及び初期化のいずれか一つの処理が実行された後、前出の次状態s’を状態sに更新する状態更新手段26とを具備して主に構成されている。
Further, the
なお、判定手段20は、報酬判定基準27aに従って、報酬rが零以外の値を有するか否かを判定する報酬判定手段27と、次Q値判定基準28aに従って、次Q値18が定義済みか否かを判定する次Q値判定手段28とを含んで構成されている。加えて、強化学習コンピュータ2は、その他の機能的構成として、定義済み、未定義、初期化、及び更新されたQ値11及び次Q値18を記憶し、テーブル化した状態で保持するQ値データ29(図5(b)参照)、観測された状態s及び次状態s’を記憶し、エージェント13の状態s及び行動の履歴を蓄積し、保持する状態データ30、及び報酬rを記憶し、保持する報酬データ31をまとめて記憶する記憶手段32とを具備している。ここで、記憶手段32には、強化学習コンピュータ2を強化学習システム1として機能させるための強化学習プログラム6が併せて記憶され、プログラム実行手段33に基づいて実行可能となっている。ここで、次Q値判定基準28aが本発明の次価値判定基準に相当し、次Q値判定手段28が本発明の次価値判定手段に相当する。
Note that the
ここで、本実施形態の強化学習システム1に使用される強化学習コンピュータ2は、本実施形態においては、市販の汎用コンピュータが利用され、上述した、各々の手段は各CPUを主として構成する演算処理回路に基づいて、係る機能を発揮することが可能に形成されている。なお、記憶手段32は、ハードディスク等の固定記憶媒体、或いは半導体メモリ等の不揮発性の記憶媒体を用いることが可能であり、エージェント13の行動a等の種々の情報を逐次、記憶することができる。なお、上述した自律移動型ロボットの場合、上記強化学習コンピュータ2の構成を、該自律移動型ロボットの内部の制御回路に構築するようにしたものであってもよい。
Here, as the
次に、強化学習コンピュータ2によってシミュレートされる強化学習システム1の一例を主に図4及び図5に基づいて説明する。ここで、図5(a)に示すように、本実施形態の強化学習システム1のために、”100×100”に上下左右が仕切られた仮想的な空間(グリッドワールド4に相当)を想定する。すなわち、グリッドワールド4には、グリッド位置M1(スタート地点Sに相当)からグリッド位置M10000(ゴール地点Gに相当)までの10000個のグリッドが存在している。このとき、エージェント13が左下角のスタート地点Sから右上角のゴール地点Gに到達するまでの最短のステップ数は、<上>方向に99ステップ、<右方向>に99ステップ移動するものであり、198ステップである。また、エージェント13は、スタート地点Sから出発し、ゴール地点Gに到達した時に、初めて”0”以外の実数値の報酬rを獲得することができ、それ以外の場合、報酬rとして”0”を獲得するものと、本実施形態では規定する。そして、スタート地点Sからゴール地点Gに到達するまでのエージェント13が採る行動aに基づいて、Q値の更新及び初期化等の処理を繰り返すことにより、上述した198ステップの最短数に収束するように学習することができる。なお、本実施形態では、スタート地点Sからゴール地点Gまでを1エピソードとしている。また、図4におけるステップS1からステップS10の処理が本発明の強化学習プログラムに相当する。
Next, an example of the
まず、記憶手段32に格納された強化学習プログラム6をプログラム実行手段33によって実行し、強化学習コンピュータ2を機能させ、グリッドワールド4上に強化学習システム1を構築させる。そして、まず記憶手段32のQ値データ29にテーブル化して記憶されるQ値11の初期値を未定義の状態に設定する(ステップS1)。これにより、エージェント13のおかれた状態sにおける価値を示す最適行動価値関数の値が定義されない状態となる。その後、エージェント13の状態sを観測する(ステップS2)。ここで、本実施形態の強化学習システム1では、状態sとしてエージェント13が存在するグリッドワールド4上の位置が観測される。さらに、エージェント13が当該状態sから遷移する行動aを出力する(ステップS3)。このとき、図5(a)に示すように、仮想的に構築されたグリッドワールド4内では、エージェント13は、現在の状態sの位置を示すグリッドから上下左右の四方向の中からいずれか一方向に進むことが可能に定義されている。
First, the
すなわち、図5(a)の状態では、エージェント13はグリッドM303に位置し(状態sに相当)、上方向(グリッドM403)、下方向(グリッドM203)、左方向(グリッドM302)、及び右方向(グリッドM304)に移動可能(行動a)となっている。このとき、初期の状態ではQ値11が未定義に設定されるため、どの方向に進むことによって最も速くゴール地点Gに到達することができるかを示す価値を有するQ値11は有していない。係る場合は、四方向の中から一方向(ここでは、「上方向:グリッドM403方向に相当)に、任意に行動aによって移動することができる。そして、行動aによって遷移した新たな位置(グリッドM403)における次状態s’を観測する(ステップS4)。その後、行動aに対し、次状態s’に遷移したことにより、報酬rをエージェント13は獲得し(ステップS5)、記憶手段32の報酬データ31に記憶される。
That is, in the state of FIG. 5A, the
さらに、強化学習コンピュータ2は、観測された状態s、次状態s’、及び報酬rの値を利用して適宜判定の処理を行う(ステップS6、またはステップS7)。ここで、判定手段20によって、報酬rが零以外の値を有する、または遷移した次状態s’における次Q値18が定義済みのいずれか一方である場合(ステップS6においてYES)、第二判定手段23に基づいた判定を実施する(ステップS71)。一方、報酬rが零、かつ、次Q値18が未定義の状態の双方の条件に合致する場合(ステップS6においてNO)、後述する学習処理または初期化処理を実施することなく、ステップS7乃至ステップS8の処理をキャンセルし、ステップS10の処理に移行する。すなわち、”ステップS6におけるNOの処理”が、本発明における未学習手段21に相当する。
Further, the
さらに、強化学習コンピュータ2は、報酬rが零以外の値、または遷移した次状態s’における次Q値18が定義済みのいずれか一方の条件に合致する場合(ステップS6においてYES)、状態sにおけるQ値11の判定を第二判定基準23aに従って判定する。ここで、Q値11が定義済みである場合(ステップS7においてYES)、図4の式Aに従ってQ値11を更新する(ステップS8)。係る場合、右辺第1項の現在の状態sにおけるQ値11を示すQ(s,a)と、右辺第2項の報酬rまたは次Q値18を示すQ(s’,a)のいずれか一方とが有意性をなし、問題に対する解を有することになる。その結果、Q値を更新し、学習が行われる。一方、Q値11が未定義の場合(ステップS7においてNO)、式Aにおける右辺第1項が有意性を持たないため、式Bに従ってQ値11を初期化する(ステップS9)。これにより、有意性を持つ値がQ値の初期値として設定される。そして、学習処理(ステップS8)、初期化処理(ステップS9)、または未学習処理(ステップS6におけるNO)を経た後、次状態s’を状態sに更新する処理が行われる(ステップS10)。その後、ステップS3の処理に戻り、行動aの出力(ステップS3)、次状態s’の観測(ステップS4)、及び報酬rの獲得(ステップS5)の処理を繰返し行う。
Further, the
これにより、エージェント13は、複数回のエピソードを経験することにより、未定義の状態に設定された各グリッド毎(グリッドM1〜グリッドM10000)に対応するQ値11を徐々に更新し、テーブル化されたQ値データ29(図5(b)参照)に逐次記憶することができる。これにより、エージェント13は、Q値11に基づいて最適な行動aを決定し、スタート地点Sからゴール地点Gに到達するのに適する状態s’に遷移することができる。
Thereby, the
ここで、本実施形態の強化学習システム1における効果を、従来のQ学習システム5と比較したものを示す。図6は上述した100×100のグリッドワールド4を利用して、スタート地点Sからゴール地点Gに到達するまでのシミュレーションを行った結果を比較したグラフである。ここで、グラフ縦軸がスタート地点Sからゴール地点Gに到達するまでに要した各エピソードに対するステップ数を示し、グラフ横軸がエピソード数を示している。このグラフにより、本実施形態の強化学習システム1を採用した場合、約500エピソードを越えると、ほぼ最短ステップ数の198ステップに値が収束することが示された。一方、従来のQ学習システム5の場合、徐々に198ステップに収束するようにステップ数が減少する傾向は見られるものの、1000エピソードを越えても、本発明の強化学習システム1のように198ステップに収束することがない。特に、学習初期の段階では、その学習効率の速さは著しく、約100エピソードの場合、本システム1は約3000ステップ以下であるのに対し、Q学習システム5では約15000ステップを必要としている。このため、本発明の強化学習システム1の有用性を示すことができる。
Here, what compares the effect in the
以上、本発明について好適な実施形態を挙げて説明したが、本発明はこれらの実施形態に限定されるものではなく、以下に示すように、本発明の要旨を逸脱しない範囲において、種々の改良及び設計の変更が可能である。 The present invention has been described with reference to preferred embodiments. However, the present invention is not limited to these embodiments, and various modifications can be made without departing from the spirit of the present invention as described below. And design changes are possible.
すなわち、本実施形態において、強化学習システム1の効果を確認するために、仮想的に構築されたグリッドワールド4を用いるものを示したが、これに限定されるものではなく、前述した自律移動型ロボットに強化学習システム1を適用するものであっても構わない。これにより、周囲の環境Eの状況に応じて各行動aを出力する自律移動型ロボットは、初期の段階で速やかに学習が進行し、従来のQ学習システム5に比べ、短いエピソード数で最適の行動aを採るような制御を行うことができるようになる。
That is, in this embodiment, in order to confirm the effect of the
1 強化学習システム
2 強化学習コンピュータ
6 強化学習プログラム
11 Q値(Q(s,a)、価値)
12 未定義設定手段
13 エージェント
14 状態観測手段
15 行動出力手段
16 次状態観測手段
17 報酬提供手段
18 次Q値(Q(s’,a)、次価値)
19 判定基準
20 判定手段
21 未学習手段
23 第二判定手段
23a 第二判定基準
24 学習手段
25 初期化手段
26 状態更新手段
27 報酬判定手段
27a 報酬判定基準
28 次Q値判定手段(次価値判定手段)
28a 次Q値判定基準(次価値判定基準)
a 行動
E 環境
r 報酬
s 状態
s’ 次状態
DESCRIPTION OF
12 undefined setting means 13
DESCRIPTION OF SYMBOLS 19
28a Next Q value criteria (next value criteria)
a Action E Environment r Reward s State s' Next State
Claims (4)
強化学習を行う学習対象のエージェントの状態を観測する状態観測手段と、
前記状態における前記エージェントの行動を出力する行動出力手段と、
出力された前記行動によって遷移する前記エージェントの次状態を観測する次状態観測手段と、
前記次状態に遷移した前記エージェントに報酬rを提供する報酬提供手段と、
前記報酬、及び前記次状態における前記価値関数を示す次価値V’を、予め規定された判定基準に従って判定する判定手段と、
前記判定手段の前記判定基準に従って、前記報酬が零及び前記次価値V’が未定義であると判定されると、前記の学習処理または初期化処理をキャンセルする未学習手段と、
前記状態における前記価値Vを第二判定基準に従って判定する第二判定手段と、
前記第二判定手段の前記第二判定基準に従って、前記価値Vが定義済みであると判定されると、次式:
に基づいて、前記価値Vを更新し、学習する学習手段と、
前記第二判定手段の前記第二判定基準に従って、前記価値Vが未定義であると判定されると、次式:
前記判定手段、前記初期化手段、及び前記学習手段のいずれか一つの処理が行われた前記次状態を前記状態に更新する状態更新手段と
を具備することを特徴とする強化学習システム。 Undefined setting means for setting an initial value of value V indicating a value function including an action value function or a state value function to be undefined;
A state observing means for observing the state of the learning target agent for reinforcement learning;
Action output means for outputting the action of the agent in the state;
A next state observing means for observing a next state of the agent that is transited by the output action;
Reward providing means for providing reward r to the agent that has transitioned to the next state;
Determination means for determining the reward and the next value V ′ indicating the value function in the next state according to a predetermined criterion;
In accordance with the determination criteria of the determination means, if it is determined that the reward is zero and the next value V ′ is undefined, unlearned means for canceling the learning process or the initialization process;
Second determination means for determining the value V in the state according to a second determination criterion;
When it is determined that the value V has been defined according to the second determination criterion of the second determination means, the following formula:
Learning means for updating and learning the value V based on
If it is determined that the value V is undefined according to the second determination criterion of the second determination means, the following formula:
A reinforcement learning system comprising: a state update unit that updates the next state in which any one of the determination unit, the initialization unit, and the learning unit is performed to the state.
前記報酬が零以外の値を有するか否かを判定する報酬判定基準に従って判定する報酬判定手段と、
前記次価値V’が定義済みか否かを判定する次価値判定基準に従って判定する次価値判定手段と
をさらに具備して構成されることを特徴とする請求項1に記載の強化学習システム。 The determination means includes
Reward determination means for determining according to a reward determination criterion for determining whether or not the reward has a value other than zero;
The reinforcement learning system according to claim 1, further comprising: a next value determining unit that determines in accordance with a next value determination criterion that determines whether or not the next value V ′ is already defined.
に基づいて、前記価値Vを更新し、学習する学習手段、前記第二判定手段の前記第二判定基準に従って、前記価値Vが未定義であると判定されると、次式:
If the value V is determined to be undefined according to the second determination criterion of the learning means that updates and learns the value V, and the second determination means based on:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005131570A JP2006309519A (en) | 2005-04-28 | 2005-04-28 | Reinforcement learning system and reinforcement learning program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005131570A JP2006309519A (en) | 2005-04-28 | 2005-04-28 | Reinforcement learning system and reinforcement learning program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2006309519A true JP2006309519A (en) | 2006-11-09 |
Family
ID=37476327
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005131570A Pending JP2006309519A (en) | 2005-04-28 | 2005-04-28 | Reinforcement learning system and reinforcement learning program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2006309519A (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2018045413A (en) * | 2016-09-14 | 2018-03-22 | ヤフー株式会社 | Information processing device, information processing method, and program |
JP2018120453A (en) * | 2017-01-26 | 2018-08-02 | ファナック株式会社 | Action information learning device, action information optimizing system, and action information learning program |
CN110333739A (en) * | 2019-08-21 | 2019-10-15 | 哈尔滨工程大学 | A kind of AUV conduct programming and method of controlling operation based on intensified learning |
US10872377B2 (en) * | 2019-05-08 | 2020-12-22 | Toast, Inc. | Dynamic origination of capital pricing based on historical point-of-sale data |
US10956974B2 (en) * | 2019-05-08 | 2021-03-23 | Toast, Inc. | Dynamic origination of capital pricing determination based on forecasted point-of-sale revenue |
US11100575B2 (en) | 2019-05-08 | 2021-08-24 | Toast, Inc. | System for automated origination of capital based on point-of-sale data informed by time of year |
US11107159B2 (en) | 2019-05-08 | 2021-08-31 | Toast, Inc. | System for automated origination of capital client engagement based on default probability derived from point-of-sale data |
US11532042B2 (en) | 2019-05-08 | 2022-12-20 | Toast, Inc. | System for automated origination of capital based on point-of-sale data |
US11562425B2 (en) | 2019-05-08 | 2023-01-24 | Toast, Inc. | System for automated origination of capital based on point-of-sale data informed by location |
-
2005
- 2005-04-28 JP JP2005131570A patent/JP2006309519A/en active Pending
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2018045413A (en) * | 2016-09-14 | 2018-03-22 | ヤフー株式会社 | Information processing device, information processing method, and program |
JP2018120453A (en) * | 2017-01-26 | 2018-08-02 | ファナック株式会社 | Action information learning device, action information optimizing system, and action information learning program |
US10509397B2 (en) | 2017-01-26 | 2019-12-17 | Fanuc Corporation | Action information learning device, action information optimization system and computer readable medium |
US10872377B2 (en) * | 2019-05-08 | 2020-12-22 | Toast, Inc. | Dynamic origination of capital pricing based on historical point-of-sale data |
US10956974B2 (en) * | 2019-05-08 | 2021-03-23 | Toast, Inc. | Dynamic origination of capital pricing determination based on forecasted point-of-sale revenue |
US11100575B2 (en) | 2019-05-08 | 2021-08-24 | Toast, Inc. | System for automated origination of capital based on point-of-sale data informed by time of year |
US11107159B2 (en) | 2019-05-08 | 2021-08-31 | Toast, Inc. | System for automated origination of capital client engagement based on default probability derived from point-of-sale data |
US11532042B2 (en) | 2019-05-08 | 2022-12-20 | Toast, Inc. | System for automated origination of capital based on point-of-sale data |
US11562425B2 (en) | 2019-05-08 | 2023-01-24 | Toast, Inc. | System for automated origination of capital based on point-of-sale data informed by location |
CN110333739A (en) * | 2019-08-21 | 2019-10-15 | 哈尔滨工程大学 | A kind of AUV conduct programming and method of controlling operation based on intensified learning |
CN110333739B (en) * | 2019-08-21 | 2020-07-31 | 哈尔滨工程大学 | AUV (autonomous Underwater vehicle) behavior planning and action control method based on reinforcement learning |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2006309519A (en) | Reinforcement learning system and reinforcement learning program | |
US11521056B2 (en) | System and methods for intrinsic reward reinforcement learning | |
Fu et al. | One-shot learning of manipulation skills with online dynamics adaptation and neural network priors | |
KR102457974B1 (en) | Method and apparatus for searching new material | |
Silver et al. | Monte-Carlo planning in large POMDPs | |
CN111144580B (en) | Hierarchical reinforcement learning training method and device based on imitation learning | |
JP2016100009A5 (en) | ||
JP7215077B2 (en) | Prediction program, prediction method and prediction device | |
KR20210011422A (en) | Stacked convolutional long-term memory for modelless reinforcement learning | |
JP2010179454A5 (en) | ||
JP2010287027A (en) | Information processor, information processing method and program | |
Ren et al. | Extended tree search for robot task and motion planning | |
KR20200084010A (en) | Create control system for target system | |
US20230268035A1 (en) | Method and apparatus for generating chemical structure using neural network | |
JP2017034830A (en) | Device and method for machine learning to learn connection point of ground line or shield wire, motor control device having machine learning device, and motor device | |
Mondal et al. | A survey of reinforcement learning techniques: strategies, recent development, and future directions | |
CN114529010A (en) | Robot autonomous learning method, device, equipment and storage medium | |
EP3992856A1 (en) | Method and system for operating a device by using hierarchical reinforcement learning | |
JP6947179B2 (en) | Estimated distance calculator, estimated distance calculation method, estimated distance calculation program and automatic planner | |
JP7196935B2 (en) | Arithmetic device, action determination method, and control program | |
Bassich et al. | Curriculum learning with a progression function | |
JP7489275B2 (en) | Information processing device, information processing system, and information processing method | |
Nashed et al. | Selecting the partial state abstractions of MDPs: A metareasoning approach with deep reinforcement learning | |
Karimi et al. | Dynamic Decision Frequency with Continuous Options | |
JP7179672B2 (en) | Computer system and machine learning method |