JP2006309519A - Reinforcement learning system and reinforcement learning program - Google Patents

Reinforcement learning system and reinforcement learning program Download PDF

Info

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
Application number
JP2005131570A
Other languages
Japanese (ja)
Inventor
Tetsuya Fukunaga
哲也 福永
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Institute of National Colleges of Technologies Japan
Original Assignee
Institute of National Colleges of Technologies Japan
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Institute of National Colleges of Technologies Japan filed Critical Institute of National Colleges of Technologies Japan
Priority to JP2005131570A priority Critical patent/JP2006309519A/en
Publication of JP2006309519A publication Critical patent/JP2006309519A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Feedback Control In General (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a reinforcement learning system capable of significantly improving learning speed of an agent in an early stage of learning. <P>SOLUTION: The reinforcement learning computer 2 used for a reinforcement learning system 1 is provided with: an undefined state setting means 12 for setting an initial value of Q value in an undefined state, a state observation means 14 for observing the state of the agent 13, a behavior output means 15 for outputting behavior, a next state observation means 16 for observing the next state of the agent 13, a reward providing means 17 for providing the agent 13 with a reward r, a determination means 20 for determining the reward r and the next Q value according to a criterion 19, an unlearning means 21 for setting the Q value in an unlearned state according to the criterion 19, a second determination means 23 for performing determination according to a second criterion 23a, a learning means 24 for updating the Q value, an initialization means 25 for initializing the Q value, and a state update means 26 for updating the next state. <P>COPYRIGHT: (C)2007,JPO&INPIT

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.

Figure 2006309519
Figure 2006309519

Richard S.Sutton・Andrew G.Barto著、三上 貞芳・皆川 雅章訳、「強化学習」、第1版、森北出版、2000年12月20日Richard S. Sutton Andrew G. Barto, Sadayoshi Mikami and Masaaki Minagawa, “Reinforcement Learning”, 1st edition, Morikita Publishing, December 20, 2000

しかしながら、上述した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が定義済みであると判定されると、次式:

Figure 2006309519
(α:ステップサイズ、γ:割引率)
に基づいて、前記価値Vを更新し、学習する学習手段と、前記第二判定手段の前記第二判定基準に従って、前記価値Vが未定義であると判定されると、次式:
Figure 2006309519
に基づいて、前記価値Vを初期化する初期化手段と、前記判定手段、前記初期化手段、及び前記学習手段のいずれか一つの処理が行われた前記次状態を前記状態に更新する状態更新手段と」を主に具備して構成されている。 In order to solve the above-mentioned problem, the reinforcement learning system according to the present invention includes: “undefined setting means for setting an initial value of a value V indicating a value function including an action value function or a state value function to be undefined; State observation means for observing the state of the learning target agent, behavior output means for outputting the agent's action in the state, and next state observation for observing the next state of the agent transitioned by the outputted action Means, reward providing means for providing reward r to the agent that has transitioned to the next state, and the next value V ′ indicating the reward and the value function in the next state is determined according to a predetermined criterion. When it is determined that the reward is zero and the next value V ′ is undefined according to the determination means and the determination criterion of the determination means, An unlearned means for canceling the process or the initialization process, a second determination means for determining the value V in the state according to a second determination criterion, and the value V according to the second determination criterion of the second determination means. If it is determined that it is already defined, the following formula:
Figure 2006309519
(Α: Step size, γ: Discount rate)
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
Figure 2006309519
On the basis of the state update, the state update unit updates the state after the initialization unit that initializes the value V and the next state after any one of the determination unit, the initialization unit, and the learning unit is performed. It is mainly provided with “means”.

なお、本発明の強化学習システムを「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学習に適用した場合について説明を行うものとする。

Figure 2006309519
Figure 2006309519
Figure 2006309519
Figure 2006309519
Figure 2006309519
Figure 2006309519
When the reinforcement learning system of the present invention is applied to “TD learning”, the above equation (6) is replaced with the following equation (8), and the equation (7) is replaced with the equation (9). Can be used. Further, when applied to “Sarsa”, it is possible to use the expression (6) by replacing the expression (6) with the following expression (10) and replacing the expression (7) with the expression (11). Furthermore, when applied to “Q learning”, it is possible to replace equation (6) with the following equation (12) and replace equation (7) with equation (13). That is, the present invention can be applied to reinforcement learning that employs a learning method in which a value function (including an action value function and a state value function) is asymptotic to an optimal value function. In the case of TD learning, the state value function V (s) corresponds to a value function, and the next value corresponds to a “state value”. In the case of Sarsa, the next value corresponds to “actual action value actually acted”, and in the case of Q learning, the next value corresponds to “maximum action value”. In the claims and the formulas (6) and (7), for convenience, the Q value indicating the action value function is expressed. However, the above formulas (6) and (7) are expressed by the state value function V (s). It may be expressed (see Formula (8) and Formula (9)). In order to simplify the description, the following description is given for a case where the present invention is applied to Q learning.
Figure 2006309519
Figure 2006309519
Figure 2006309519
Figure 2006309519
Figure 2006309519
Figure 2006309519

したがって、本発明の強化学習システムによれば、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が定義済みであると判定されると、次式:

Figure 2006309519
(α:ステップサイズ、γ:割引率)
に基づいて、前記価値Vを更新し、学習する学習手段、前記第二判定手段の前記第二判定基準に従って、前記価値Vが未定義であると判定されると、次式:
Figure 2006309519
に基づいて、前記価値Vを初期化する初期化手段、及び前記判定手段、前記初期化手段、及び前記学習手段のいずれか一つの処理が行われた前記次状態を前記状態に更新する状態更新手段として、強化学習コンピュータを機能させる」ものから主に構成されている。 On the other hand, the reinforcement learning program according to the present invention is “undefined setting means for setting an initial value of a value V indicating a value function including an action value function or a state value function to be undefined, an agent of a learning target agent that performs reinforcement learning. State observation means for observing the state, action output means for outputting the action of the agent in the state, next state observation means for observing the next state of the agent that is transitioned by the outputted action, and the state that has transitioned to the next state Remuneration providing means for providing a reward r to the agent, determination means for determining the reward and the next value V ′ indicating the value function in the next state according to a predetermined determination criterion, according to the determination criterion of the determination means If it is determined that the reward is zero and the next value V ′ is undefined, the learning process or the initialization process is canceled. The value V in the state is determined according to the second determination criterion, and the value V is determined to be defined according to the second determination criterion of the second determination unit. And the following formula:
Figure 2006309519
(Α: Step size, γ: Discount rate)
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:
Figure 2006309519
On the basis of the state update, the state update for updating the next state after the process of any one of the initialization unit for initializing the value V, the determination unit, the initialization unit, and the learning unit is performed. As a means, it is mainly comprised from what makes a reinforcement learning computer function.

さらに、本発明にかかる強化学習プログラムは、上記構成に加え、「前記報酬が零以外の値を有するか否かを判定する報酬判定基準に従って判定する報酬判定手段、及び、前記次価値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 reinforcement learning system 1 according to an embodiment of the present invention will be described with reference to FIGS. 1 to 7. Here, FIG. 1 is a block diagram showing a functional configuration of the reinforcement learning computer 2 used in the reinforcement learning system 1 of the present embodiment, and FIG. 2 represents a learning procedure 3 (learning algorithm) in the reinforcement learning system 1. FIG. 3 is an explanatory diagram in which the processes performed based on the determination of the determination means 20 and the second determination means 23 are classified into a list form. FIG. 4 is a process flow of the reinforcement learning computer 2 5 is an explanatory diagram showing an example of (a) a 100 × 100 grid world 4 and (b) Q value data 29. FIG. 6 is a diagram of the reinforcement learning system 1 and the Q learning system 5. It is the graph which compared the simulation result.

ここで、本実施形態の強化学習システム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 reinforcement learning system 1 of this embodiment has illustrated what was applied based on the conventional Q learning. The reinforcement learning computer 2 is constructed to be able to execute and function the reinforcement learning program 6 stored in advance in a storage medium such as a hard disk (storage means 32 or the like). The reinforcement learning program 6 is programmed to cause the reinforcement learning system 1 to function according to the learning procedure 3 shown in FIG. 2 and the determination criteria 19 and 23a shown in FIG. In addition, in part of FIGS. 1 to 6, the Q value 11 is indicated as Q (s, a), and the next Q value 18 is indicated as Q (s', a) for convenience.

さらに、詳細に説明すると、本実施形態の強化学習システム1は、図1に示されるように、種々の演算処理及び記憶処理等を実行可能な強化学習コンピュータ2によって構成されている。ここで、強化学習コンピュータ2は、周囲の環境Eの状態sを観測し、該観測結果に応じて所定の行動aを出力するように制御可能なエージェント13と接続している。なお、本実施形態では、該エージェント13はコンピュータ上に仮想的に構築されたグリッドワールド4内を移動可能な仮想体として存在している。ここで、係るエージェント13は、例えば、複数のセンサ(例えば、視覚センサ等)を備え、駆動走行手段によって自律的に移動可能な自律移動型ロボットのような実体物を利用し、周囲の環境Eに対する行動を適宜出力するものを用いるものであっても構わない。   More specifically, as shown in FIG. 1, the reinforcement learning system 1 of the present embodiment is configured by a reinforcement learning computer 2 that can execute various arithmetic processes and storage processes. Here, the reinforcement learning computer 2 is connected to an agent 13 that can be controlled to observe the state s of the surrounding environment E and output a predetermined action a according to the observation result. In the present embodiment, the agent 13 exists as a virtual body that can move in the grid world 4 virtually constructed on the computer. Here, the agent 13 includes, for example, a plurality of sensors (for example, visual sensors) and uses an entity such as an autonomous mobile robot that can move autonomously by a driving travel unit, and the surrounding environment E You may use what outputs the action with respect to appropriately.

さらに、強化学習コンピュータ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 reinforcement learning computer 2 has, as other functional configurations, as shown mainly in FIG. 1, an undefined setting means 12 for setting the initial value of the optimum action value function Q value 11 undefined, and reinforcement learning. State observation means 14 for observing (recognizing) a state s (here, a position in a grid world 4 to be described later) with respect to the environment E around the agent 13 to be performed, and a plurality of predefined actions of the agent 13 in the state s. The action output means 15 for selecting from the action criteria and outputting the action a, the next state observing means 16 for observing the next state s ′ of the agent 13 transitioning from the state s by the action a, and the next state s ′. According to reward providing means 17 for providing reward r to the transitioned agent 13, determination means 20 for determining according to reward r and next state s', and according to determination criterion 19 If the determination means 20 determines that the value of the reward r is zero and the next Q value 18 is in an undefined state, both the learning process by updating the Q value 11 and the initialization process of the Q value 11 are canceled. The unlearned means 21 that performs the unlearned process of “putting into a state that does not learn”; the second determination means 23 that determines the Q value 11 in the state s according to the second determination criterion 23 a; and the second determination of the second determination means 23 If it is determined that the Q value 11 has been defined according to the standard 23a, the learning means 24 performs a process of updating the Q value based on the formula A (see FIG. 4 and the formula (1), etc.) and performs learning. If the Q value is determined to be undefined, the initialization means 25 for initializing the Q value 11 based on the formula B (see FIG. 4 and the formula (2), etc.), unlearned, learned, and initialized After any one of the processes is executed, the previous state s ′ And and a state update means 26 for updating the s is mainly composed.

なお、判定手段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 determination unit 20 determines whether the reward r has a value other than zero according to the reward determination criterion 27a and whether the next Q value 18 has been defined according to the next Q value determination criterion 28a. And a next Q value judging means 28 for judging whether or not. In addition, the reinforcement learning computer 2 stores the Q value 11 and the next Q value 18 that are defined, undefined, initialized, and updated as other functional configurations, and holds the Q value in a tabulated state. Data 29 (see FIG. 5B), the observed state s and the next state s ′ are stored, the state s and action history of the agent 13 are accumulated, the state data 30 to be retained, and the reward r are stored. And storage means 32 for storing the reward data 31 to be held together. Here, the storage means 32 also stores a reinforcement learning program 6 for causing the reinforcement learning computer 2 to function as the reinforcement learning system 1, and can be executed based on the program execution means 33. Here, the next Q value determination standard 28a corresponds to the next value determination standard of the present invention, and the next Q value determination means 28 corresponds to the next value determination means of the present invention.

ここで、本実施形態の強化学習システム1に使用される強化学習コンピュータ2は、本実施形態においては、市販の汎用コンピュータが利用され、上述した、各々の手段は各CPUを主として構成する演算処理回路に基づいて、係る機能を発揮することが可能に形成されている。なお、記憶手段32は、ハードディスク等の固定記憶媒体、或いは半導体メモリ等の不揮発性の記憶媒体を用いることが可能であり、エージェント13の行動a等の種々の情報を逐次、記憶することができる。なお、上述した自律移動型ロボットの場合、上記強化学習コンピュータ2の構成を、該自律移動型ロボットの内部の制御回路に構築するようにしたものであってもよい。   Here, as the reinforcement learning computer 2 used in the reinforcement learning system 1 of the present embodiment, a commercially available general-purpose computer is used in the present embodiment, and each of the means described above is an arithmetic process mainly comprising each CPU. Based on the circuit, it is formed to be able to exhibit such a function. The storage means 32 can use a fixed storage medium such as a hard disk or a non-volatile storage medium such as a semiconductor memory, and can sequentially store various information such as the action a of the agent 13. . In the case of the above-described autonomous mobile robot, the configuration of the reinforcement learning computer 2 may be constructed in a control circuit inside the autonomous mobile robot.

次に、強化学習コンピュータ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 reinforcement learning system 1 simulated by the reinforcement learning computer 2 will be described mainly based on FIGS. Here, as shown in FIG. 5 (a), for the reinforcement learning system 1 of the present embodiment, a virtual space (corresponding to the grid world 4) in which “100 × 100” is vertically and horizontally divided is assumed. To do. That is, in the grid world 4, there are 10,000 grids from the grid position M1 (corresponding to the start point S) to the grid position M10000 (corresponding to the goal point G). At this time, the shortest number of steps required for the agent 13 to reach the goal point G in the upper right corner from the start point S in the lower left corner is 99 steps in the <upward> direction and 99 steps in the <rightward> direction. 198 steps. Further, the agent 13 can obtain a real value reward r other than “0” for the first time when the agent 13 starts from the start point S and reaches the goal point G. In other cases, the agent 13 can obtain “0” as the reward r. In the present embodiment. Then, based on the action a taken by the agent 13 from the start point S to the goal point G, it repeats the process of updating and initializing the Q value so as to converge to the shortest number of 198 steps described above. Can learn to. In the present embodiment, one episode is from the start point S to the goal point G. Further, the processing from step S1 to step S10 in FIG. 4 corresponds to the reinforcement learning program of the present invention.

まず、記憶手段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 reinforcement learning program 6 stored in the storage means 32 is executed by the program execution means 33 to cause the reinforcement learning computer 2 to function and to construct the reinforcement learning system 1 on the grid world 4. First, the initial value of the Q value 11 stored as a table in the Q value data 29 of the storage means 32 is set to an undefined state (step S1). As a result, the state of the optimal action value function indicating the value in the state s in which the agent 13 is placed is not defined. Thereafter, the state s of the agent 13 is observed (step S2). Here, in the reinforcement learning system 1 of the present embodiment, the position on the grid world 4 where the agent 13 exists is observed as the state s. Further, the agent 13 outputs an action a that makes a transition from the state s (step S3). At this time, as shown in FIG. 5A, in the virtually constructed grid world 4, the agent 13 is one of four directions, up, down, left, and right from the grid indicating the position of the current state s. It is defined to be able to go in the direction.

すなわち、図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 agent 13 is located in the grid M303 (corresponding to the state s), and the upward direction (grid M403), the downward direction (grid M203), the left direction (grid M302), and the right direction. It is possible to move to (grid M304) (action a). At this time, since the Q value 11 is set to be undefined in the initial state, the Q value 11 having a value indicating which direction can be reached the fastest to reach the goal point G is not included. . In such a case, it is possible to arbitrarily move in one direction from the four directions (here, “upward direction: corresponding to the grid M403 direction) by the action a. The next state s ′ in M403) is observed (step S4), and then the agent 13 obtains the reward r by the transition to the next state s ′ for the action a (step S5). Stored in data 31.

さらに、強化学習コンピュータ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 reinforcement learning computer 2 performs an appropriate determination process using the observed state s, next state s', and reward r (step S6 or step S7). Here, when the determination means 20 has either the reward r has a value other than zero or the next Q value 18 in the transitioned next state s ′ is already defined (YES in step S6), the second determination The determination based on the means 23 is performed (step S71). On the other hand, if the condition for both the reward r is zero and the next Q value 18 is undefined (NO in step S6), steps S7 to S7 are performed without performing learning processing or initialization processing described later. The process of step S8 is cancelled, and the process proceeds to step S10. That is, “NO processing in step S6” corresponds to the unlearned means 21 in the present invention.

さらに、強化学習コンピュータ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 reinforcement learning computer 2 determines that the state s when the reward r is a value other than zero or the next Q value 18 in the transitioned next state s ′ satisfies one of the defined conditions (YES in step S6). The determination of the Q value 11 is determined according to the second determination criterion 23a. If the Q value 11 is already defined (YES in step S7), the Q value 11 is updated according to the equation A in FIG. 4 (step S8). In this case, either Q (s, a) indicating the Q value 11 in the current state s of the first term on the right side, or Q (s ′, a) indicating the reward r or the next Q value 18 on the second term on the right side. One will be significant and will have a solution to the problem. As a result, the Q value is updated and learning is performed. On the other hand, when the Q value 11 is undefined (NO in step S7), since the first term on the right side in the equation A has no significance, the Q value 11 is initialized according to the equation B (step S9). Thereby, a value having significance is set as an initial value of the Q value. Then, after the learning process (step S8), the initialization process (step S9), or the unlearned process (NO in step S6), a process of updating the next state s' to the state s is performed (step S10). Thereafter, the process returns to step S3, and the process of outputting the action a (step S3), observing the next state s' (step S4), and acquiring the reward r (step S5) is repeated.

これにより、エージェント13は、複数回のエピソードを経験することにより、未定義の状態に設定された各グリッド毎(グリッドM1〜グリッドM10000)に対応するQ値11を徐々に更新し、テーブル化されたQ値データ29(図5(b)参照)に逐次記憶することができる。これにより、エージェント13は、Q値11に基づいて最適な行動aを決定し、スタート地点Sからゴール地点Gに到達するのに適する状態s’に遷移することができる。   Thereby, the agent 13 gradually updates the Q value 11 corresponding to each grid (grid M1 to grid M10000) set to an undefined state by experiencing a plurality of episodes, and is tabulated. The Q value data 29 (see FIG. 5B) can be stored sequentially. As a result, the agent 13 can determine the optimum action a based on the Q value 11 and transition to the state s ′ suitable for reaching the goal point G from the start point S.

ここで、本実施形態の強化学習システム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 reinforcement learning system 1 of this embodiment with the conventional Q learning system 5 is shown. FIG. 6 is a graph comparing the results of simulations from the start point S to the goal point G using the 100 × 100 grid world 4 described above. Here, the vertical axis of the graph indicates the number of steps for each episode required to reach the goal point G from the start point S, and the horizontal axis of the graph indicates the number of episodes. This graph shows that when the reinforcement learning system 1 of the present embodiment is employed, the value converges to approximately 198 steps, which is the shortest number of steps, when about 500 episodes are exceeded. On the other hand, in the case of the conventional Q learning system 5, although the number of steps tends to decrease so that it gradually converges to 198 steps, even if it exceeds 1000 episodes, 198 steps as in the reinforcement learning system 1 of the present invention. Never converge. In particular, at the initial stage of learning, the speed of the learning efficiency is remarkable. In the case of about 100 episodes, the present system 1 has about 3000 steps or less, whereas the Q learning system 5 requires about 15000 steps. For this reason, the usefulness of the reinforcement learning system 1 of this invention can be shown.

以上、本発明について好適な実施形態を挙げて説明したが、本発明はこれらの実施形態に限定されるものではなく、以下に示すように、本発明の要旨を逸脱しない範囲において、種々の改良及び設計の変更が可能である。   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 reinforcement learning system 1, what was used the grid world 4 constructed virtually was shown, but it is not limited to this. The reinforcement learning system 1 may be applied to a robot. As a result, the autonomous mobile robot that outputs each action a according to the situation of the surrounding environment E learns quickly at the initial stage, and is optimal with a shorter number of episodes than the conventional Q learning system 5. Control that takes action a can be performed.

強化学習システムに使用される強化学習コンピュータの機能的構成を示すブロック図である。It is a block diagram which shows the functional structure of the reinforcement learning computer used for a reinforcement learning system. 強化学習システムにおける学習手順を表現した説明図である。It is explanatory drawing expressing the learning procedure in a reinforcement learning system. 判定手段及び第二判定手段の判定に基づいて実施される処理を一覧表形式に分類した説明図である。It is explanatory drawing which classified into the list form the process implemented based on the determination of a determination means and a 2nd determination means. 強化学習コンピュータの処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a process of reinforcement learning computer. (a)100×100のグリッドワールド、及び(b)Q値データの一例を示す説明図である。It is explanatory drawing which shows an example of (a) 100 * 100 grid world and (b) Q value data. 本実施形態の強化学習システム及びQ学習システムのシミュレーション結果を比較したグラフである。It is the graph which compared the simulation result of the reinforcement learning system of this embodiment, and the Q learning system. 従来のQ学習システムの処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a process of the conventional Q learning system.

符号の説明Explanation of symbols

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 SYMBOLS 1 Reinforcement learning system 2 Reinforcement learning computer 6 Reinforcement learning program 11 Q value (Q (s, a), value)
12 undefined setting means 13 agent 14 state observation means 15 action output means 16th order state observation means 17 reward providing means 18th order Q value (Q (s ′, a), next value)
DESCRIPTION OF SYMBOLS 19 Determination criteria 20 Determination means 21 Unlearned means 23 Second determination means 23a Second determination criteria 24 Learning means 25 Initialization means 26 State update means 27 Reward determination means 27a Reward determination criteria 28 Next Q value determination means (next value determination means )
28a Next Q value criteria (next value criteria)
a Action E Environment r Reward s State s' Next State

Claims (4)

行動価値関数または状態価値関数を含む価値関数を示す価値Vの初期値を未定義に設定する未定義設定手段と、
強化学習を行う学習対象のエージェントの状態を観測する状態観測手段と、
前記状態における前記エージェントの行動を出力する行動出力手段と、
出力された前記行動によって遷移する前記エージェントの次状態を観測する次状態観測手段と、
前記次状態に遷移した前記エージェントに報酬rを提供する報酬提供手段と、
前記報酬、及び前記次状態における前記価値関数を示す次価値V’を、予め規定された判定基準に従って判定する判定手段と、
前記判定手段の前記判定基準に従って、前記報酬が零及び前記次価値V’が未定義であると判定されると、前記の学習処理または初期化処理をキャンセルする未学習手段と、
前記状態における前記価値Vを第二判定基準に従って判定する第二判定手段と、
前記第二判定手段の前記第二判定基準に従って、前記価値Vが定義済みであると判定されると、次式:
Figure 2006309519
(α:ステップサイズ、γ:割引率)
に基づいて、前記価値Vを更新し、学習する学習手段と、
前記第二判定手段の前記第二判定基準に従って、前記価値Vが未定義であると判定されると、次式:
Figure 2006309519
に基づいて、前記価値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:
Figure 2006309519
(Α: Step size, γ: Discount rate)
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:
Figure 2006309519
Based on the initialization means for initializing the value V;
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の初期値を未定義に設定する未定義設定手段、強化学習を行う学習対象のエージェントの状態を観測する状態観測手段、前記状態における前記エージェントの行動を出力する行動出力手段、出力された前記行動によって遷移する前記エージェントの次状態を観測する次状態観測手段、前記次状態に遷移した前記エージェントに報酬rを提供する報酬提供手段、前記報酬、及び前記次状態における前記価値関数を示す次価値V’を、予め規定された判定基準に従って判定する判定手段、前記判定手段の前記判定基準に従って、前記報酬が零及び前記次価値V’が未定義であると判定されると、前記の学習処理または初期化処理をキャンセルする未学習手段、前記状態における前記価値Vを第二判定基準に従って判定する第二判定手段、前記第二判定手段の前記第二判定基準に従って、前記価値Vが定義済みであると判定されると、次式:
Figure 2006309519
(α:ステップサイズ、γ:割引率)
に基づいて、前記価値Vを更新し、学習する学習手段、前記第二判定手段の前記第二判定基準に従って、前記価値Vが未定義であると判定されると、次式:
Figure 2006309519
に基づいて、前記価値Vを初期化する初期化手段、及び前記判定手段、前記初期化手段、及び前記学習手段のいずれか一つの処理が行われた前記次状態を前記状態に更新する状態更新手段として、強化学習コンピュータを機能させることを特徴とする強化学習プログラム。
An 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 a learning target agent that performs reinforcement learning, Action output means for outputting the action of the agent, next state observation means for observing the next state of the agent transitioned by the outputted action, reward providing means for providing a reward r to the agent transitioned to the next state, A determination means for determining a reward and a next value V ′ indicating the value function in the next state according to a predetermined criterion, and according to the determination criterion of the determination means, the reward is zero and the next value V ′ is If determined to be undefined, unlearned means for canceling the learning process or initialization process, the value in the state Second determination means for determining in accordance with the second criterion, was prepared in accordance with the second criterion of the second determination means, when the value V is determined to be defined by the following formula:
Figure 2006309519
(Α: Step size, γ: Discount rate)
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:
Figure 2006309519
On the basis of the state update, the state update for updating the next state after the process of any one of the initialization unit for initializing the value V, the determination unit, the initialization unit, and the learning unit is performed. A reinforcement learning program characterized by causing a reinforcement learning computer to function as a means.
前記報酬が零以外の値を有するか否かを判定する報酬判定基準に従って判定する報酬判定手段、及び、前記次価値V’が定義済みか否かを判定する次価値判定基準に従って判定する次価値判定手段を有する前記判定手段として、前記強化学習コンピュータをさらに機能させることを特徴とする請求項3に記載の強化学習プログラム。   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 a next value determined according to a next value determination criterion for determining whether or not the next value V ′ is already defined The reinforcement learning program according to claim 3, wherein the reinforcement learning computer is further caused to function as the determination means having a determination means.
JP2005131570A 2005-04-28 2005-04-28 Reinforcement learning system and reinforcement learning program Pending JP2006309519A (en)

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)

* Cited by examiner, † Cited by third party
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

Cited By (11)

* Cited by examiner, † Cited by third party
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