JP2020166795A - Reinforced learning method, reinforced learning device, and reinforced learning program for efficient learning - Google Patents

Reinforced learning method, reinforced learning device, and reinforced learning program for efficient learning Download PDF

Info

Publication number
JP2020166795A
JP2020166795A JP2019069533A JP2019069533A JP2020166795A JP 2020166795 A JP2020166795 A JP 2020166795A JP 2019069533 A JP2019069533 A JP 2019069533A JP 2019069533 A JP2019069533 A JP 2019069533A JP 2020166795 A JP2020166795 A JP 2020166795A
Authority
JP
Japan
Prior art keywords
state
data
learning
time
learner
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
JP2019069533A
Other languages
Japanese (ja)
Inventor
崇 松原
Takashi Matsubara
崇 松原
邦昭 上原
Kuniaki Uehara
邦昭 上原
驍 曽
Xiao Zeng
驍 曽
洋一 野本
Yoichi Nomoto
洋一 野本
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.)
Equos Research Co Ltd
Kobe University NUC
Original Assignee
Equos Research Co Ltd
Kobe University NUC
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 Equos Research Co Ltd, Kobe University NUC filed Critical Equos Research Co Ltd
Priority to JP2019069533A priority Critical patent/JP2020166795A/en
Publication of JP2020166795A publication Critical patent/JP2020166795A/en
Pending legal-status Critical Current

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Manipulator (AREA)

Abstract

To provide a reinforced learning method that learns expression specialized in states where an attention situation such as environment reset occurs so that efficient learning can be performed.SOLUTION: A reinforced learning method that optimizes a behavior policy of an agent from a result learned using a learning device that learns based on a state observed from environmental data, includes determining whether a state where a preset attention situation has occurred is observed during learning of environmental data in one episode. When the state where the attention situation has occurred is observed, a feature extractor (first learning device) learns by using two pieces of environmental data of environmental data of the state where the preset attention situation has occurred and environmental data at time before by one, and performs expression learning. A state classifier (second learning device) learns difference between pieces of feature data, and parameters of the first learning device and the second learning device are updated based on estimated output data and real data.SELECTED DRAWING: Figure 3

Description

本発明は、環境データから観測された状態に基づき学習する学習器を用いて、学習した結果からエージェントの行動方策を最適化する強化学習において、エピソードのデータ効率を高め、コストを低減できる強化学習方法、装置及びプログラムに関するものである。 The present invention uses a learning device that learns based on the state observed from environmental data, and in reinforcement learning that optimizes the behavioral policy of the agent from the learning result, the data efficiency of the episode can be improved and the cost can be reduced. It relates to methods, devices and programs.

近年、強化学習、特に、深層強化学習は、電子ゲームにおいて利用されるAI(人工知能)、自動車などの車両の自動運転制御、ロボットの自律制御などのアルゴリズムに応用されている。強化学習は、エピソードという単位で学習を繰り返し、環境の中で試行錯誤した結果の報酬を用いて対象となる環境に適応する手法であり方策を最適化することで学習を行うものであり、深層強化学習は、畳み込みニューラルネットワーク(CNN)の情報処理力を利用して、画像データなどの高次元入力に基づき、強化学習を行うものである。 In recent years, reinforcement learning, especially deep reinforcement learning, has been applied to algorithms such as AI (artificial intelligence) used in electronic games, automatic driving control of vehicles such as automobiles, and autonomous control of robots. Reinforcement learning is a method of repeating learning in units of episodes and adapting to the target environment using the rewards of trial and error in the environment, and learning is performed by optimizing the policy. Reinforcement learning uses the information processing power of a convolutional neural network (CNN) to perform reinforcement learning based on high-dimensional input such as image data.

強化学習や深層強化学習では、環境内におけるエージェントが、現在の状態を観測し、取るべき行動を決定するといった問題が設定され、エージェントは行動を選択することにより環境から報酬を得る。このような環境とエージェントとのやりとりを繰り返しながら、報酬、行動、状態の3つの変数を用いて学習していく。
強化学習や深層強化学習では、エージェントが状態空間と行動空間を持つある環境で行動を取る。タイムステップ毎に、方策が特徴抽出用学習器で状態を特徴ベクトルに変換し、価値関数計算用学習器で特徴ベクトルに対する行動確率を出力する。エージェントが行動を取った後、環境はスカラーの報酬と次の状態を出力する。最終状態まで行動を取ることを繰り返すと、エピソードが終了する。
In reinforcement learning and deep reinforcement learning, a problem is set in which an agent in the environment observes the current state and decides an action to be taken, and the agent receives a reward from the environment by selecting an action. While repeating the interaction between the environment and the agent, learning is performed using the three variables of reward, behavior, and state.
In reinforcement learning and deep reinforcement learning, agents act in an environment with a state space and an action space. At each time step, the policy converts the state into a feature vector with the feature extraction learner, and outputs the action probability for the feature vector with the value function calculation learner. After the agent takes action, the environment prints the scalar reward and the next state. The episode ends when you repeat the action until the final state.

強化学習や深層強化学習では、試行錯誤で学習するため数多くの環境のリセット、例えば、ゲームオーバーや、車両やロボットなどの衝突による損傷や故障の回復が必要となる。具体的には、歩行を学ぶロボットが転倒するたびに人は転倒したロボットを起立させる必要がある。このような転倒状態に対応するためには、強化学習のアルゴリズムが多くの経験を必要とし、エピソードの長さが増長し、それに伴って学習に必要な時間が増加する。つまり、環境のリセットは、物理的な回復によるコストの増加だけでなく、学習時間の増大による学習効率の低下を招くことから、環境のリセット回数を低減できる技術、すなわち、エピソード効率の良い強化学習方法が期待されている。 In reinforcement learning and deep reinforcement learning, since learning is performed by trial and error, it is necessary to reset many environments, for example, to recover from damage or failure due to game over or collision of a vehicle or robot. Specifically, every time a robot that learns to walk falls, a person needs to stand up the fallen robot. Reinforcement learning algorithms require a lot of experience to cope with such a fall state, the length of the episode increases, and the time required for learning increases accordingly. In other words, resetting the environment not only increases the cost due to physical recovery, but also reduces the learning efficiency due to the increase in learning time. Therefore, a technique that can reduce the number of times the environment is reset, that is, reinforcement learning with good episode efficiency. The method is expected.

かかる状況下、従来から強化学習における環境のリセット回数を低減する技術が知られている(例えば、非特許文献1〜3を参照。)。
非特許文献1には、PILCOフレームワーク(「M.P. Deisenroth et al., “ PILCO: A model-based and data-efficient approach to policy search”, In ICML, pages 465-472, 2011.」を参照)に基づいてガウス過程モデルを訓練させ、状態空間制約に違反する確率を推定し、実環境中も訓練中も、安全と見做される方策のみを実装し、失敗のリスク、すなわち環境のリセットを最小限に抑える方法が開示されている。非特許文献1に開示された方法では、環境のリセットを大きく低減するが、PILCOフレームワークで学習された数理モデルで環境を表現するため、計算コストが高く、一般的な問題(自動運転,ロボット制御など)には応用困難であり汎用性が低いといった問題がある。またPILCOフレームワークを深層強化学習へ適用する方法が明らかでないといった問題がある。
Under such circumstances, a technique for reducing the number of times the environment is reset in reinforcement learning has been conventionally known (see, for example, Non-Patent Documents 1 to 3).
Non-Patent Document 1 includes the PILCO framework (see “MP Deisenroth et al.,“ PILCO: A model-based and data-efficient approach to policy search ”, In ICML, pages 465-472, 2011.”). Based on training a Gaussian process model, estimating the probability of violating state-space constraints, implementing only what is considered safe in real-world and during training, and minimizing the risk of failure, or environmental reset. A method of limiting it is disclosed. The method disclosed in Non-Patent Document 1 greatly reduces the reset of the environment, but since the environment is expressed by the mathematical model learned by the PILCO framework, the calculation cost is high and general problems (automatic driving, robot). Control, etc.) has the problem that it is difficult to apply and its versatility is low. Another problem is that it is not clear how to apply the PILCO framework to deep reinforcement learning.

非特許文献2には、安全で効率的な強化学習のための自律的な方法が開示されている。非特許文献2に開示された方法では、再試行のための環境を再設定してフォワードの方策とリセットの方策を同時に学習して、環境のリセットを行う方策の価値関数を学習させることにより、フォワードの方策がいつ不可逆的な状態になろうとしているのかを自動的に判断し、不確実性を考慮した安全性の打ち切りを可能にし、手動的な環境のリセット回数を低減する。非特許文献2に開示された方法も、非特許文献1の方法と同様に、計算コストが高く、汎用性が低いといった問題がある。 Non-Patent Document 2 discloses an autonomous method for safe and efficient reinforcement learning. In the method disclosed in Non-Patent Document 2, the environment for retry is reset, the forward policy and the reset policy are learned at the same time, and the value function of the policy for resetting the environment is learned. It automatically determines when the forward strategy is about to become irreversible, enables uncertainty-aware safety termination, and reduces the number of manual environment resets. Similar to the method of Non-Patent Document 1, the method disclosed in Non-Patent Document 2 has problems such as high calculation cost and low versatility.

非特許文献3には、ビッグデータを用いて環境のモデルを学習する強化学習であって、環境データの観測における高次元の観測データを低次元のコードに圧縮し、深層生成モデルのVAE(Variational Autoencoder)を用いて表現学習する方法が開示されている。非特許文献3に開示された方法では、環境モデルを学習するために、まず事前にランダムな方策を用いて経験を収集し、画像データから視覚特徴抽出のために、VAEの視覚モジュールを学習させ、数エポック後に全ての画像データをVAEの潜在変数空間に変換し、前の状態と行動を入力して、次の状態とエピソードの終了を予測するように学習する。このように非特許文献3に開示された方法は、空間特徴の獲得にVAEを用いるために、例えば巨大な画像中で変化が少ない環境では無意味な表現が多く、正しい学習ができないといった問題があり、また非常に幅広い探索を行っているため、結果的にデータ効率、環境のリセット回数の低減の点で改善が必要であり、学習の効率が悪いといった問題がある。また、非特許文献3の方法において、実環境の経験が無いエージェントが直接に方策を学習するより、環境の正確なモデルを作るには、より多くの経験が必要であり、効率的な強化学習とは言い難いといった問題がある。 Non-Patent Document 3 is reinforcement learning for learning an environment model using big data. High-dimensional observation data in observation of environmental data is compressed into low-dimensional code, and VAE (Variational) of a deep generative model is described. A method of expression learning using Autoencoder) is disclosed. In the method disclosed in Non-Patent Document 3, in order to learn the environmental model, first, the experience is collected by using a random policy in advance, and the visual module of VAE is trained to extract the visual features from the image data. After a few epochs, all image data is converted to the latent variable space of VAE, the previous state and action are input, and learning is performed to predict the end of the next state and episode. Since VAE is used to acquire spatial features in the method disclosed in Non-Patent Document 3, for example, there are many meaningless expressions in an environment where there is little change in a huge image, and there is a problem that correct learning cannot be performed. There is also a very wide range of searches, and as a result, improvements are needed in terms of data efficiency and reduction of the number of resets of the environment, and there is a problem that learning efficiency is poor. In addition, in the method of Non-Patent Document 3, more experience is required to create an accurate model of the environment than an agent who has no experience in the actual environment directly learns the policy, and efficient reinforcement learning is required. There is a problem that it is hard to say.

非特許文献4には、強化学習における報酬の調整によって、場所の探索を加速できる表現学習方法が開示されている。非特許文献4に開示された方法では、非特許文献3の方法と異なり、ビッグデータを用いて環境のモデルを学習するのではなく、非特許文献1,2の方法と同様に、計算コストが高く、汎用性が低いといった問題がある。 Non-Patent Document 4 discloses an expression learning method that can accelerate the search for a place by adjusting the reward in reinforcement learning. Unlike the method of Non-Patent Document 3, the method disclosed in Non-Patent Document 4 does not learn the model of the environment using big data, but the calculation cost is high as in the methods of Non-Patent Documents 1 and 2. There are problems such as high price and low versatility.

K. Polymenakos et al., “Safe Policy Search with Gaussian Process Models”, arXiv:1712.05556,In NIPS, Dec 2017.K. Polymenakos et al., “Safe Policy Search with Gaussian Process Models”, arXiv: 1712.05556, In NIPS, Dec 2017. B. Eysenbach et al., “Leave no Trace: Learning to Reset for Safe and Autonomous Reinforcement Learning”, arXiv:1711.06782, In NIPS, Nov 2017.B. Eysenbach et al., “Leave no Trace: Learning to Reset for Safe and Autonomous Reinforcement Learning”, arXiv: 1711.06782, In NIPS, Nov 2017. D. Ha et al., “World models”, arXiv:1803.10122, In NIPS, May 2018.D. Ha et al., “World models”, arXiv: 1803.110122, In NIPS, May 2018. D. Pathak et al., “Curiosity-driven Exploration by Self-supervised Prediction”, arXiv:1705.05363, In NIPS, May 2017.D. Pathak et al., “Curiosity-driven Exploration by Self-supervised Prediction”, arXiv: 1705.05363, In NIPS, May 2017.

上述の如く、強化学習や深層強化学習におけるエージェントは、失敗などのネガティブな行動に起因する環境のリセットを繰り返して最適な行動を学習し、最終的に得られた行動の性能や時間コストによって評価される。しかしながら、現実社会への応用を考えた場合には、失敗などの環境のリセットにかかるコスト(自動運転ならば事故、ロボットアームなら対象物の破壊やロボットの破損などの回復のための時間的・物理的なコスト)が無視できない。
一方で、エージェントは、電子ゲームにおけるスコアアップのアイテム獲得、自動運転における燃費を向上させる運転操作(いわゆるエコドライブ)などのポジティブな行動を行う状況に遭遇する場面が存在する。
かかる状況に鑑みて、本発明は、失敗などの環境のリセットにかかるコストを評価軸にし、より少ないリセット回数で高性能なエージェントを構築し、また、ポジティブな行動を積極的に行えるエージェントを構築し、効率的に学習を行うことができるように、環境のリセットなどの注目状況が発生した状態に特化して表現学習する強化学習方法、強化学習装置及び強化学習プログラムを提供することを目的とする。
As described above, agents in reinforcement learning and deep reinforcement learning repeatedly reset the environment due to negative behavior such as failure to learn the optimum behavior, and evaluate it based on the performance and time cost of the finally obtained behavior. Will be done. However, when considering application to the real world, the cost of resetting the environment such as failure (accident in the case of automatic driving, time for recovery of object destruction or robot damage in the case of robot arm) (Physical cost) cannot be ignored.
On the other hand, there are situations in which an agent encounters a situation in which a positive action such as acquisition of a score-up item in an electronic game or a driving operation (so-called eco-driving) for improving fuel efficiency in automatic driving is performed.
In view of this situation, the present invention uses the cost of resetting the environment such as failure as the evaluation axis, builds a high-performance agent with a smaller number of resets, and builds an agent that can actively take positive actions. The purpose is to provide reinforcement learning methods, reinforcement learning devices, and reinforcement learning programs that specialize in expression learning in situations where attention situations such as environmental resets have occurred so that learning can be performed efficiently. To do.

上記課題を解決すべく、本発明の強化学習方法は、環境データから観測された状態に基づき学習する学習器を用いて学習した結果からエージェントの行動方策を最適化する強化学習方法において、1つのエピソードにおける環境データの学習中に、予め設定された注目状況が発生した状態が観測されたか否かを判定する判定ステップと、注目状況が発生した状態が観測された場合に、注目状況が発生した第1状態の第1環境データの特徴と、第1状態より過去に遡った第2状態の第2環境データの特徴を比較し、各々の特徴の差を学習器に学習させる学習ステップ、を備える。学習ステップは、以下のa)〜c)のステップより構成される。 In order to solve the above problem, the enhanced learning method of the present invention is one of the enhanced learning methods for optimizing the behavioral policy of the agent from the result of learning using the learning device that learns based on the state observed from the environmental data. During the learning of the environmental data in the episode, the attention situation occurred when the determination step of determining whether or not the state in which the preset attention situation occurred was observed, and when the state in which the attention situation occurred was observed. It is provided with a learning step of comparing the characteristics of the first environment data of the first state with the characteristics of the second environment data of the second state that goes back to the past from the first state and letting the learner learn the difference between the characteristics. .. The learning step is composed of the following steps a) to c).

a)第1学習ステップ
第1学習ステップは、注目状況が発生した第1状態の第1環境データと、第1状態より過去に遡った第2状態の第2環境データと、第1状態及び第2状態における各々の行動及び報酬を入力して、上記学習器である第1学習器に学習させるものである。
b)第2学習ステップ
第2学習ステップは、第1学習器が出力する第1環境データ及び第2環境データの各々の特徴データを入力して、各々の特徴データの差を、第2学習器に学習させるものである。
c)更新ステップ
更新ステップは、第2状態における行動と報酬、及び、第1状態における注目状況の発生有無に関する第2学習器の出力推定データと実データとに基づいて、第1学習器及び第2学習器のパラメータを更新するものである。
a) First learning step In the first learning step, the first environment data of the first state in which the attention situation occurs, the second environment data of the second state that goes back to the past from the first state, the first state, and the first state Each action and reward in the two states are input, and the first learning device, which is the learning device, is made to learn.
b) Second learning step In the second learning step, each feature data of the first environment data and the second environment data output by the first learning device is input, and the difference between the respective feature data is calculated by the second learning device. To learn.
c) Update step The update step is based on the output estimation data and the actual data of the second learner regarding the behavior and reward in the second state and the occurrence or absence of the attention situation in the first state, and the first learner and the first. 2 The parameters of the learner are updated.

本発明の強化学習方法によれば、注目状況が発生する確率を学習することによって、注目状況に対して敏感に回避、或は、積極的に直面しようとするエージェントを構築することができる。注目状況に対して敏感に回避しようとするエージェントによれば、実空間での事故などの失敗状況(=注目状況)の遭遇の頻度を減らしつつエージェントの学習を促進させることができる。これにより、少ないエピソード回数で同程度もしくは優れたエージェントを構築できる。一方、注目状況に対して積極的に直面しようとするエージェントによれば、実空間での目的物の獲得などの成功状況(=注目状況)の遭遇の頻度を増やしつつエージェントの学習を促進させることができる。これにより、少ないエピソード回数で同程度もしくは優れたエージェントを構築できる。
本発明の強化学習方法における注目状況とは、エピソードの環境内で生じる注目すべき状況であり、例えば、エピソードにおける環境のリセット、電子ゲームにおけるゲームオーバー、災害や故障発生の前ぶれの事象発生などの回避すべきネガティブ要素の注目状況や、電子ゲームにおけるスコアアップのアイテム獲得、自動運転における燃費を向上させる運転操作(いわゆるエコドライブ)などのポジティブ要素の注目状況がある。
According to the reinforcement learning method of the present invention, by learning the probability that an attention situation occurs, it is possible to construct an agent that sensitively avoids or actively faces the attention situation. According to an agent who is sensitive to the attention situation, it is possible to promote the learning of the agent while reducing the frequency of encountering a failure situation (= attention situation) such as an accident in the real space. This makes it possible to build agents of the same or better quality with a small number of episodes. On the other hand, according to agents who actively face attention situations, promoting agent learning while increasing the frequency of encounters with success situations (= attention situations) such as acquisition of objects in real space. Can be done. This makes it possible to build agents of the same or better quality with a small number of episodes.
The attentional situation in the reinforcement learning method of the present invention is a remarkable situation that occurs in the environment of the episode, for example, resetting the environment in the episode, game over in an electronic game, occurrence of a prelude to a disaster or failure, and the like. There are attentions to negative factors that should be avoided, acquisition of score-up items in electronic games, and attention to positive factors such as driving operations that improve fuel efficiency in automatic driving (so-called eco-driving).

本発明の強化学習方法では、上記a)の第1学習ステップで環境の特徴抽出を行い、上記b)の第2学習ステップで注目状況の発生有無の状態分類を行う。そして、上記c)の更新ステップの構成により、第1学習器と第2学習器の設定パラメータを更新する。これにより、注目状況に遭遇する頻度を増減し、エピソード単位の効率の最大化を図ることができる。具体的には、予め設定された注目状況が発生した状態が観測されたか否かを判定する判定ステップにより、強化学習中に環境のリセットなどの注目状況が発生した際には、バッファーメモリなどのメモリ部から一つ前の時刻の環境データを取得し、注目状況が発生した状態の環境データと一つ前の時刻の環境データの2つの環境データを用いて表現学習を実行する。これにより、1度発生した注目状況に対しては、その本質的な発生原因を特徴量として理解するように、2つの環境データからそれぞれの特徴を抽出してその差の特徴を学習させることによって、これ以降に同様な環境条件に遭遇した場合に注目状況が発生しないように処理を行う強化学習の特徴抽出器の構築が可能となる。 In the reinforcement learning method of the present invention, the features of the environment are extracted in the first learning step of a) above, and the state classification of the presence or absence of the occurrence of the attention situation is performed in the second learning step of b) above. Then, the setting parameters of the first learner and the second learner are updated according to the configuration of the update step in c) above. As a result, it is possible to increase or decrease the frequency of encountering attention situations and maximize the efficiency of each episode. Specifically, when a attention situation such as an environment reset occurs during reinforcement learning by a determination step of determining whether or not a state in which a preset attention situation has occurred has been observed, a buffer memory or the like is used. The environment data of the previous time is acquired from the memory unit, and expression learning is executed using the two environment data of the state in which the attention situation has occurred and the environment data of the previous time. As a result, for the attention situation that has occurred once, by extracting each feature from the two environmental data and learning the feature of the difference so that the essential cause of the occurrence can be understood as a feature quantity. After that, it is possible to construct a feature extractor for reinforcement learning that performs processing so that the attention situation does not occur when similar environmental conditions are encountered.

本発明の強化学習方法によれば、数理モデルだけでは無く、一般的な問題(自動運転、ロボット制御など)にも適用でき、かつ、無意味な表現が多い環境(例えば、背景の壁の色や模様の複雑である環境)においても注目状況の発生の本質的な発生原因のみを学習できるため、汎用性を向上できる。
また、本発明の強化学習方法によれば、ビッグデータを学習に用いる手法としても、注目状況が発生することのみに特化する学習を行えることから、エピソードのデータ効率性も優れている。
According to the reinforcement learning method of the present invention, it can be applied not only to mathematical models but also to general problems (automatic driving, robot control, etc.) and in an environment with many meaningless expressions (for example, background wall color). Even in an environment where the pattern is complicated, it is possible to learn only the essential cause of the occurrence of the attention situation, so that versatility can be improved.
Further, according to the reinforcement learning method of the present invention, even as a method of using big data for learning, learning specialized only when a attention situation occurs can be performed, so that the data efficiency of the episode is also excellent.

本発明の強化学習方法において、注目状況が発生した第1状態より過去に遡った第2状態は、第1状態を観測した時刻tの1つ前の時刻t−1に観測した状態である。また判定ステップにおいて、注目状況が発生した状態が観測された場合に、時刻t−1に観測された状態の第2環境データと行動及び報酬が記憶されているメモリ部から、時刻t−1の第2環境データと行動及び報酬を取得する。また第1学習ステップにおいて、時刻tの第1環境データと、時刻t−1の第2環境データとから、第1環境データ及び第2環境データの各々の特徴データh,h´を抽出する。また第2学習ステップにおいて、特徴データh,h´から時刻t−1と時刻tの間の行動及び報酬と、時刻tの注目状況の発生有無を推定する。
そして、更新ステップにおいて、推定した結果と、実際の時刻t−1と時刻tの間の行動及び報酬と時刻tの注目状況とを、ロス関数を用いて比較し、ロス関数の値が小さくなるように、第1学習ステップ、第2学習ステップ及び更新ステップの各ステップを、強化学習の性能が閾値以上、又は、繰り返し回数が所定回数以上になるまで、パラメータを繰り返し更新する。なお、パラメータを更新する繰り返しの条件判定に、ロス関数の値が所定閾値以下であるという条件を用いても構わない。
本発明の強化学習方法によれば、1回発生した注目状況に対し、発生以降に発生時と同様な環境データ、行動及び報酬の環境条件に遭遇した場合に、注目状況を発生し難くする又は注目状況を積極的に発生し易くする第1学習器が構築される。
In the reinforcement learning method of the present invention, the second state that goes back to the past from the first state in which the attention state occurred is the state observed at the time t-1 immediately before the time t when the first state was observed. Further, in the determination step, when the state in which the attention state is generated is observed, the second environmental data of the state observed at time t-1 and the memory unit in which the action and the reward are stored are stored at time t-1. Obtain second environmental data, actions and rewards. Further, in the first learning step, the characteristic data h and h'of the first environment data and the second environment data are extracted from the first environment data at time t and the second environment data at time t-1. Further, in the second learning step, the behavior and reward between the time t-1 and the time t and the presence / absence of the attention state at the time t are estimated from the feature data h, h'.
Then, in the update step, the estimated result is compared with the actual action and reward between the time t-1 and the time t and the attention state at the time t using the loss function, and the value of the loss function becomes smaller. As described above, in each step of the first learning step, the second learning step, and the update step, the parameters are repeatedly updated until the performance of reinforcement learning becomes equal to or more than the threshold value or the number of repetitions becomes equal to or more than a predetermined number of times. It should be noted that the condition that the value of the loss function is equal to or less than a predetermined threshold value may be used for the repeated condition determination for updating the parameter.
According to the reinforcement learning method of the present invention, when the attention situation that occurs once encounters the same environmental data, behavior, and reward environmental conditions as when it occurred after the occurrence, the attention situation is less likely to occur. A first learning device is constructed that facilitates the positive generation of attention.

ここで、環境データには、電子ゲームや車載カメラの画像データや、車両の自動運転制御に用いる各種センサのデータなどである。
特に、環境データが画像データである場合、第1学習ステップは、畳み込みニューラルネットワークを用いて、入力する画像データを第1学習器に学習させる。また第2学習ステップは、ニューラルネットワークを用いて、入力する画像特徴データを第2学習器に学習させる。そして、更新ステップは、第2学習器の出力推定データと実データを、ロス関数を用いて比較し、ロス関数の値が小さくなるように最適化関数を使って、第1学習器及び第2学習器の重みパラメータを更新する。
Here, the environmental data includes image data of electronic games and in-vehicle cameras, data of various sensors used for automatic driving control of vehicles, and the like.
In particular, when the environment data is image data, the first learning step causes the first learning device to learn the image data to be input by using the convolutional neural network. Further, in the second learning step, the second learning device is made to learn the image feature data to be input by using the neural network. Then, in the update step, the output estimation data of the second learner and the actual data are compared using the loss function, and the optimization function is used so that the value of the loss function becomes smaller, and the first learner and the second learner are used. Update the learner weight parameter.

また本発明の強化学習方法における注目状況は、具体的には、エピソード終端における環境リセット又は環境リセットに相当する状況である。ここで、環境リセットとは、エピソードの環境のリセットであり、環境リセットに相当する状況とは、電子ゲームにおけるゲームオーバー、自動運転における事故や車両の故障、ロボットアームなら対象物の破壊やロボットの破損、緊急停止ボタン操作などである。 Further, the attention situation in the reinforcement learning method of the present invention is specifically a situation corresponding to an environment reset or an environment reset at the end of an episode. Here, the environment reset is the reset of the environment of the episode, and the situation corresponding to the environment reset is the game over in the electronic game, the accident or the vehicle failure in the automatic driving, the destruction of the object in the case of the robot arm, or the robot. Damage, emergency stop button operation, etc.

次に、本発明の強化学習装置について説明する。
本発明の強化学習装置は、環境データから観測された状態に基づき学習する学習器を用いて学習した結果からエージェントの行動方策を最適化する強化学習装置において、1つのエピソードにおける環境データの学習中に、予め設定された注目状況が発生した状態が観測された場合に、注目状況が発生した第1状態の第1環境データの特徴と、第1状態より過去に遡った第2状態の第2環境データの特徴を比較し、各々の特徴の差を学習する学習器を備える。学習器は、注目状況が発生した状態が観測された場合に機能する以下のA)〜C)を備える。
Next, the reinforcement learning device of the present invention will be described.
The enhanced learning device of the present invention is an enhanced learning device that optimizes the behavioral policy of an agent from the result of learning using a learning device that learns based on the state observed from the environmental data, and is learning the environmental data in one episode. In addition, when a state in which a preset attention situation occurs is observed, the characteristics of the first environmental data of the first state in which the attention situation occurs and the second state of the second state that goes back to the past from the first state. It is equipped with a learning device that compares the characteristics of environmental data and learns the differences between the characteristics. The learner includes the following A) to C) that function when a state in which an attention situation occurs is observed.

A)第1学習器
第1学習器は、注目状況が発生した第1状態の第1環境データと、第1状態より過去に遡った第2状態の第2環境データと、第1状態及び第2状態における各々の行動及び報酬を入力して学習させる上記の学習器である。
B)第2学習器
第2学習器は、第1学習器が出力する第1環境データ及び第2環境データの各々の特徴データを入力して、各々の特徴データの差を学習させる学習器である。
C)更新部
更新部は、第2状態における行動と報酬、及び、第1状態における注目状況の発生有無に関する第2学習器の出力推定データと実データとに基づいて、第1学習器及び第2学習器のパラメータを更新するものである。
A) First learner The first learner is the first environmental data of the first state in which the attention situation occurs, the second environmental data of the second state that goes back to the past from the first state, and the first state and the first. It is the above-mentioned learning device that inputs and learns each action and reward in two states.
B) Second learner The second learner is a learner that inputs the feature data of the first environment data and the second environment data output by the first learner and learns the difference between the feature data. is there.
C) Update unit The update unit uses the first learner and the first learner based on the output estimation data and the actual data of the second learner regarding the behavior and reward in the second state and whether or not the attention situation occurs in the first state. 2 The parameters of the learner are updated.

上記の本発明の強化学習装置において、注目状況が発生した第1状態より過去に遡った第2状態は、第1状態を観測した時刻tの1つ前の時刻t−1に観測した状態である。判定部は、注目状況が発生した状態が観測された場合に、時刻t−1に観測された状態の第2環境データと行動及び報酬が記憶されているメモリ部から、時刻t−1の第2環境データと行動及び報酬を取得する。第1学習器は、時刻tの第1環境データと、時刻t−1の第2環境データとから、第1環境データ及び第2環境データの各々の特徴データh,h´を抽出する。第2学習器は、特徴データh,h´から時刻t−1と時刻tの間の行動及び報酬と、時刻tの注目状況の発生有無を推定する。更新部は、推定した結果と、実際の時刻t−1と時刻tの間の行動及び報酬と時刻tの注目状況とを、ロス関数を用いて比較する。そして、ロス関数の値が小さくなるように、強化学習の性能が閾値以上、又は、繰り返し回数が所定回数以上になるまで、パラメータを繰り返し更新する。これにより、1回発生した注目状況に対し、発生以降に発生時と同様な環境データ、行動及び報酬の環境条件に遭遇した場合に、注目状況を発生し難くする又は注目状況を積極的に発生し易くする第1学習器が構築される。 In the above-mentioned reinforcement learning device of the present invention, the second state that goes back to the past from the first state in which the attention situation occurred is the state observed at the time t-1 immediately before the time t when the first state was observed. is there. When the state in which the attention situation is generated is observed, the determination unit is the second environment data of the state observed at time t-1 and the memory unit in which the action and the reward are stored. 2 Acquire environmental data, actions and rewards. The first learner extracts the characteristic data h, h'of the first environment data and the second environment data from the first environment data at time t and the second environment data at time t-1. The second learner estimates the behavior and reward between the time t-1 and the time t from the feature data h, h', and whether or not the attention state at the time t occurs. The update unit compares the estimated result with the actual behavior between time t-1 and time t, the reward, and the attention state at time t, using the loss function. Then, the parameters are repeatedly updated so that the value of the loss function becomes smaller until the performance of reinforcement learning becomes equal to or more than the threshold value or the number of repetitions becomes equal to or more than a predetermined number of times. As a result, when the environmental data, behavior, and reward environmental conditions similar to those at the time of occurrence are encountered for the attention situation that occurred once, the attention situation is less likely to occur or the attention situation is positively generated. A first learner is constructed to facilitate.

ここで、具体的には、環境データは、画像データである。また第1学習器は、畳み込みニューラルネットワークを用いて構成され、入力する画像データを第1学習器に学習させる。また第2学習器は、ニューラルネットワークを用いて構成され、入力する画像特徴データを第2学習器に学習させる。そして、更新ステップは、第2学習器の出力推定データと実データを、ロス関数を用いて比較し、ロス関数の値が小さくなるように最適化関数を使って、第1学習器及び第2学習器の重みパラメータを更新する。 Here, specifically, the environmental data is image data. Further, the first learner is configured by using a convolutional neural network, and causes the first learner to learn the image data to be input. The second learner is configured by using a neural network, and causes the second learner to learn the image feature data to be input. Then, in the update step, the output estimation data of the second learner and the actual data are compared using the loss function, and the optimization function is used so that the value of the loss function becomes smaller, and the first learner and the second learner are used. Update the learner weight parameter.

本発明の強化学習装置における注目状況は、エピソード終端における環境リセット又は環境リセットに相当する状況である。環境リセットに相当する状況は、前述の強化学習方法と同様に、ゲームオーバー、自動運転における事故や車両の故障、ロボットアームなら対象物の破壊やロボットの破損、緊急停止ボタン操作などである。 The attention situation in the reinforcement learning device of the present invention is a situation corresponding to an environment reset or an environment reset at the end of an episode. Similar to the above-mentioned reinforcement learning method, the situations corresponding to the environment reset are game over, accidents and vehicle failures in automatic driving, destruction of objects and robots in the case of robot arms, and emergency stop button operation.

本発明の強化学習プログラムは、上述の本発明の強化学習方法における判定ステップ、第1学習ステップ、第2学習ステップ及び更新ステップの各ステップを、コンピュータに実行させるためのプログラムである。また、本発明の強化学習プログラムは、上述の本発明の強化学習装置における判定部、第1学習器、第2学習器及び更新部として、コンピュータを機能させるためのプログラムである。 The reinforcement learning program of the present invention is a program for causing a computer to execute each of the determination step, the first learning step, the second learning step, and the update step in the above-mentioned reinforcement learning method of the present invention. Further, the reinforcement learning program of the present invention is a program for operating a computer as a determination unit, a first learning device, a second learning device, and an update unit in the above-mentioned reinforcement learning device of the present invention.

本発明によれば、より少ないリセット回数で高性能なエージェントを構築し、また、ポジティブな行動を積極的に行えるエージェントを構築し、効率的に強化学習を行うことができる。 According to the present invention, it is possible to construct a high-performance agent with a smaller number of resets, and to construct an agent capable of positively acting positively, and to efficiently perform reinforcement learning.

強化学習方法及び強化学習装置の処理説明図Reinforcement learning method and processing explanatory diagram of reinforcement learning device 注目状況が発生しない状態における学習器の入出力データフロー図Input / output data flow diagram of the learner in the state where the attention situation does not occur 注目状況が発生した状態における学習器の入出力データフロー図Input / output data flow diagram of the learner when the attention situation occurs 強化学習装置の学習器の機能ブロック図Functional block diagram of the learner of the reinforcement learning device 強化学習方法の処理フロー図Processing flow diagram of reinforcement learning method 強化学習方法の処理フローにおける強化学習の処理フロー図Reinforcement learning processing flow diagram in the processing flow of the reinforcement learning method 実施例1の強化学習方法の処理フロー図Processing flow diagram of the reinforcement learning method of Example 1 画像特徴抽出器と状態分類器のニューラルネットワークの説明図Explanatory diagram of neural network of image feature extractor and state classifier 強化学習後の学習器の入出力データフロー図Input / output data flow diagram of the learner after reinforcement learning 実施例1の強化学習方法におけるエピソードの効率性を示すグラフGraph showing the efficiency of episodes in the reinforcement learning method of Example 1 実施例2の強化学習方法の入出力データフロー図Input / output data flow diagram of the reinforcement learning method of Example 2 実施例2の強化学習方法の処理フロー図Processing flow diagram of the reinforcement learning method of Example 2

以下、本発明の実施形態の一例を、図面を参照しながら詳細に説明していく。なお、本発明の範囲は、以下の実施例や図示例に限定されるものではなく、幾多の変更及び変形が可能である。 Hereinafter, an example of the embodiment of the present invention will be described in detail with reference to the drawings. The scope of the present invention is not limited to the following examples and illustrated examples, and many modifications and modifications can be made.

本発明の強化学習方法及び強化学習装置の処理について、図1〜3を参照して説明する。
本発明の強化学習方法や強化学習装置の処理では、図1に示すように、一般的な強化学習と同様に、環境2内におけるエージェント(図示せず)が現在の状態を観測し、取るべき行動を決定する方策3が設定され、方策3から行動を選択する。エージェントは価値関数の値が大きくなるように、方策3から行動を選択することで環境2から報酬を得る。このような環境2とエージェントのやりとりを、報酬と行動と状態の3つの変数を用いてフィードバックしながら学習していく。
The reinforcement learning method and the processing of the reinforcement learning device of the present invention will be described with reference to FIGS. 1 to 3.
In the processing of the reinforcement learning method and the reinforcement learning device of the present invention, as shown in FIG. 1, an agent (not shown) in the environment 2 should observe and take the current state as in the case of general reinforcement learning. A policy 3 for determining an action is set, and an action is selected from the policy 3. The agent gets a reward from the environment 2 by selecting an action from the measure 3 so that the value of the value function becomes large. We will learn such interaction between environment 2 and agents while feeding back using three variables of reward, behavior, and state.

環境2とは、例えば、電子ゲームの画面の画像データの集合や、ロボットや車両に搭載されたカメラの撮影動画の画像データの時系列などの集合であり、状態とは、画像データの集合である環境2を観測して得られる個々の画像データである。また、行動とは、例えば、電子ゲームであればゲームの入力デバイス操作、自動車の自動運転であればハンドル操作などである。 The environment 2 is, for example, a set of image data of the screen of an electronic game, a time series of image data of a moving image taken by a camera mounted on a robot or a vehicle, and the like, and a state is a set of image data. It is individual image data obtained by observing a certain environment 2. Further, the action is, for example, an input device operation of a game in the case of an electronic game, a steering wheel operation in the case of automatic driving of an automobile, or the like.

本発明の強化学習方法や強化学習装置の処理では、注目状況が発生しない状態、すなわち、観測した画像データにおいて注目状況が発生しない場合に、学習器1は、図2に示すように、観測した画像データxを取込み(10)、注目状況の発生有無を判定する判定部11を経て、特徴抽出器(第1学習器)13により画像データの特徴を抽出する。特徴抽出器(第1学習器)13では、抽出された特徴がベクトルデータhとして出力され(14)、価値関数計算器17では、ベクトルデータh(15)が入力され(16)、価値関数19が出力される(18)。 In the reinforcement learning method and the processing of the reinforcement learning device of the present invention, when the attention situation does not occur, that is, when the attention situation does not occur in the observed image data, the learner 1 observes as shown in FIG. capture image data x t (10), through the determination unit 11 whether or not to generate the attention status, feature extractor (first learning device) 13 by extracting the feature of the image data. In the feature extractor (first learner) 13, the extracted features are output as vector data h (14), and in the value function computer 17, vector data h (15) is input (16), and the value function 19 Is output (18).

注目状況とは、例えば、電子ゲームにおけるゲームオーバーなど予め設定された注目すべき状況であり、注目状況の発生有無の情報は、図2において取り込んだ画像データに結びついた[実データ]の中のエピソード終端tのフラグ情報(1/0)として設けられている。このエピソード終端tのフラグ情報を参照し、注目状況の発生有無を判定部11で判定する。このエピソード終端tのフラグ情報は、一般的な強化学習には用いられていない状態変数である。 The attention situation is a preset notable situation such as a game over in an electronic game, and the information on whether or not the attention situation has occurred is included in the [actual data] linked to the image data captured in FIG. It is provided as flag information (1/0) at the end of the episode t t . With reference to the flag information of the episode end t t, the determination unit 11 determines whether or not the attention state has occurred. Flag information for this episode termination t t is generally reinforcement learning is a state variable that is not used.

そして、注目状況が発生した状態、すなわち、観測した画像データにおいて注目状況が発生した場合には、学習器1は、図3に示すように、観測した画像データxを取込み(10)、画像データに結びついた[実データ]の中のエピソード終端tのフラグ情報を参照し、注目状況が発生したことを判定部11で判定する。そして、注目状況が発生したと判定した場合に、観測した画像データxの時刻tの直前、すなわち、1つ前の時刻t−1に観測された状態が記憶されているメモリ部4から読み出しを行い(22)、時刻t−1の画像データxt−1と行動at−1及び報酬rt−1を取得する(23)。 Then, a state in which attention condition occurs, i.e., when the target situation in the observed image data is generated, learning device 1, as shown in FIG. 3, takes in the observed image data x t (10), the image associated data referring to the flag information of the episode termination t t in [actual data] is checked by the determination unit 11 that the attention condition occurs. Then, when it is determined that the attention situation has occurred, the observed image data x t is read from the memory unit 4 in which the observed state is stored immediately before the time t, that is, at the time t-1 immediately before. (22), and the image data x t-1 at time t-1 and the action a t-1 and the reward r t-1 are acquired (23).

特徴抽出器(第1学習器)13では、時刻tに観測された状態としての画像データxと、時刻t−1に観測された状態としての画像データxt−1とから、画像データxと画像データxt−1の各々の特徴を示すベクトルデータh,h´を抽出し、出力する(14,24)。
状態分類器(第2学習器)23では、画像データxと画像データxt−1の各々の特徴を示すベクトルデータh(15),h´(25)から、時刻t−1と時刻tの間の行動at−1、時刻tの報酬rとエピソード終端tのフラグ情報を推定する。
In the feature extractor (first learner) 13, the image data x t from the image data x t as the state observed at the time t and the image data x t-1 as the state observed at the time t-1 Vector data h, h'showing the characteristics of t and the image data x t-1 are extracted and output (14, 24).
In the state classifier (second learner) 23, the time t-1 and the time t are obtained from the vector data h (15) and h'(25) indicating the characteristics of the image data x t and the image data x t-1. action a t-1 between, to estimate the flag information of the reward r t and the episode end t t of the time t.

更新部28では、時刻t−1と時刻tの間の行動at−1と、時刻tの報酬rとエピソード終端tのフラグ情報を推定した結果と、実際の時刻t−1と時刻tの間の行動at−1、時刻tの報酬rとエピソード終端tのフラグ情報とを、ロス関数を用いて比較する。そして、ロス関数の値が小さくなるように、特徴抽出器(第1学習器)13と状態分類器(第2学習器)23のパラメータを更新する。パラメータの更新は、ロス関数の値が所定閾値未満、又は、繰り返し回数が所定回数以上になるまで繰り返される。
なお、更新部28では、時刻t−1と時刻tの間の行動at−1及び報酬rt−1と、時刻tのエピソード終端tのフラグ情報を推定した結果と、実際の時刻t−1と時刻tの間の行動at−1及び報酬rt−1と、時刻tのエピソード終端tのフラグ情報とを、ロス関数を用いて比較しても構わない。
The updating unit 28, an action a t-1 between time t-1 and time t, and the result of the flag information estimated reward r t and episode termination t t at time t, the actual time t-1 and time action a t-1 between t, and a flag information of the reward r t and the episode end t t of the time t, compared with a loss function. Then, the parameters of the feature extractor (first learner) 13 and the state classifier (second learner) 23 are updated so that the value of the loss function becomes smaller. The parameter update is repeated until the value of the loss function is less than the predetermined threshold value or the number of repetitions becomes the predetermined number or more.
In the update unit 28, the result of estimating the action a t-1 and the reward r t-1 between the time t -1 and the time t, the flag information of the episode end t t of the time t, and the actual time t. The action a t-1 and reward r t-1 between -1 and time t may be compared with the flag information of the episode end t t at time t using a loss function.

本発明の強化学習方法や強化学習装置の処理では、注目状況が発生した場合に行う上記の処理によって、1回発生した注目状況に対し、発生以降に発生時と同様な環境データ、行動及び報酬の環境条件に遭遇した場合に、注目状況が発生し難いように学習器が構築されていくことになる。 In the processing of the reinforcement learning method and the reinforcement learning device of the present invention, the same environmental data, actions, and rewards as those at the time of occurrence after the occurrence of the attention situation that occurred once by the above processing performed when the attention situation occurs When the environmental conditions of are encountered, the learning device will be constructed so that the attention situation is unlikely to occur.

図4は、本発明の強化学習装置の学習器の機能ブロックを示すものである。機能ブロック中の判定部11、特徴抽出器(第1学習器)13、価値関数計算器17、状態分類器(第2学習器)23、更新部28は、上述した処理を行うものである。環境データ取得部9は、図1の環境2やメモリ部4から環境で観測された状態としての環境データ、例えば、上述のように画像データを取込むものである。 FIG. 4 shows a functional block of the learning device of the reinforcement learning device of the present invention. The determination unit 11, the feature extractor (first learner) 13, the value function calculator 17, the state classifier (second learner) 23, and the update unit 28 in the functional block perform the above-described processing. The environmental data acquisition unit 9 captures environmental data as a state observed in the environment from the environment 2 and the memory unit 4 in FIG. 1, for example, image data as described above.

本発明の強化学習方法の処理フローについて、図5,6を参照して説明する。本発明の強化学習方法では、図1に示したとおり、環境2とエージェントのやりとりを、報酬と行動と状態の3つの変数を用いてフィードバックしながら学習する通常の強化学習を行い(S10)、注目状況が発生するか否かを判定し(S11)、注目状況が発生しない状態であれば、強化学習(S10)を繰り返す。一方、強化学習(S10)を繰り返す中で、注目状況が発生する状態があれば、メモリ部4より注目状況の発生時刻より一定時間前の環境データ、報酬、行動を取得し(S12)、注目状況の発生時刻の環境データと一定時間前の環境データとから、各々の特徴を示す各ベクトルデータを抽出する(S13)。そして、抽出した特徴の各ベクトルデータの差に基づいて、行動、報酬及び注目状況の発生状況を推定し(S14)、これら推定結果と、実際の行動、報酬及び注目状況の実データに基づいて、学習器のパラメータを更新する(S15)。ステップS13からS15のパラメータ更新までは、学習性能が所定閾値を超えるまで等の条件を満たすまで繰り返し行われる(S16)。 The processing flow of the reinforcement learning method of the present invention will be described with reference to FIGS. 5 and 6. In the reinforcement learning method of the present invention, as shown in FIG. 1, normal reinforcement learning is performed in which the interaction between the environment 2 and the agent is learned while feeding back using three variables of reward, behavior, and state (S10). It is determined whether or not the attention situation occurs (S11), and if the attention situation does not occur, the reinforcement learning (S10) is repeated. On the other hand, if there is a state in which attention status occurs while repeating reinforcement learning (S10), environmental data, rewards, and actions a certain time before the occurrence time of the attention status are acquired from the memory unit 4 (S12), and attention is paid. Each vector data showing each feature is extracted from the environmental data at the time when the situation occurs and the environmental data before a certain time (S13). Then, based on the difference between the vector data of the extracted features, the occurrence status of the behavior, reward, and attention status is estimated (S14), and based on these estimation results and the actual data of the actual behavior, reward, and attention status. , Update the parameters of the learner (S15). The parameters of steps S13 to S15 are updated repeatedly until the learning performance exceeds a predetermined threshold value and other conditions are satisfied (S16).

ここで、上述の通常の強化学習(S10)の処理フローを、図6に示す。環境データを観測し、環境データと報酬を取得し(S101)、環境データの特徴を抽出する(S102)。抽出した特徴を示すベクトルデータは、価値関数計算器に入力され(S103)、価値関数計算器により、状態と報酬から、将来に渡って獲得できる報酬の総和(価値関数)を出力する(S104)。価値関数と方策に従い、行動を選択し(S105)、環境より得た報酬に基づき、価値関数計算器のパラメータを更新する(S106)。エピソード終端に到達したか否かを判定し(S107)、エピソード終端に到達していなければ時刻を一つ進めて(S108)、次の観測による環境データと報酬を取得して(S101)、ステップS101〜S106を繰り返す。一方、エピソード終端に到達していれば、エピソードを切替え(S109)、1つのエピソードを用いて学習した結果からエージェントの行動方策を最適化する強化学習を終了する。 Here, the processing flow of the above-mentioned normal reinforcement learning (S10) is shown in FIG. The environmental data is observed, the environmental data and the reward are acquired (S101), and the characteristics of the environmental data are extracted (S102). The vector data indicating the extracted features is input to the value function calculator (S103), and the value function calculator outputs the total sum (value function) of the rewards that can be obtained in the future from the state and the reward (S104). .. The action is selected according to the value function and the policy (S105), and the parameters of the value function calculator are updated based on the reward obtained from the environment (S106). It is determined whether or not the end of the episode has been reached (S107), and if the end of the episode has not been reached, the time is advanced by one (S108), and the environmental data and reward from the next observation are obtained (S101). S101 to S106 are repeated. On the other hand, if the end of the episode is reached, the episode is switched (S109), and the reinforcement learning for optimizing the action policy of the agent is terminated from the result of learning using one episode.

図7は、実施例1の強化学習方法の処理フロー図を示している。図7の強化学習方法は、注目状況の環境のリセット、例えば、電子ゲームのゲームオーバーや車両の運転の事故などのリセットが必要なものを回避するための処理フローの一例を示すものである。環境データは、電子ゲームの画像や車載カメラ等の画像データである。
図7の強化学習方法は、図6の処理フローの通常の強化学習を行い(S10)、1つのエピソードの終端tの状態フラグが、リセット無し(0)かリセット(1)かを判定し(S21)、リセット無しの状態であれば、強化学習(S10)を繰り返す。
一方、強化学習(S10)を繰り返す中で、リセットが発生する状態があれば、エピソード終端tが“リセット”の時を時刻tとし、リセットの時刻より過去に遡った時刻t−1の画像データxt−1、報酬rt−1と行動at−1をメモリ部より取得し(S22)、時刻tの画像データxと時刻t−1の画像データxt−1より各々の画像特徴を示す各ベクトルデータh,h´を抽出する(S23)。そして、抽出したh,h´より、時刻tと時刻t−1間の行動at−1、時刻tの報酬rおよびエピソード終端tを推定(推定状況結果を出力)し(S24)、ロス関数を用いて、行動at−1、報酬r、エピソード終端tの推定状況結果と実データを比較する(S25)。そして、ロス関数の値が小さくなるように画像特徴抽出器(第1学習器)と状態分類器(第2学習器)のパラメータを変更する(S26)。ステップS23からS26のパラメータ更新までは、学習性能が所定閾値を超えるまで、又は、繰り返し回数が所定回数を超えるまで繰り返し行われる(S27)。
FIG. 7 shows a processing flow diagram of the reinforcement learning method of the first embodiment. The reinforcement learning method of FIG. 7 shows an example of a processing flow for avoiding resetting the environment of attention, for example, a game over of an electronic game or an accident of driving a vehicle. The environmental data is an image of an electronic game or an image data of an in-vehicle camera or the like.
Reinforcement learning method of FIG. 7, normal performs reinforcement learning (S10) of the process flow of FIG. 6, the state flags of one episode termination t t is determined whether no reset (0) or reset (1) (S21) If there is no reset, the reinforcement learning (S10) is repeated.
On the other hand, if there is a state in which a reset occurs while repeating reinforcement learning (S10), the time t when the episode end t t is “reset” is set as the time t, and the image at the time t-1 that goes back to the past from the reset time. The data x t-1 , the reward r t-1, and the action a t-1 are acquired from the memory unit (S22), and each image is taken from the image data x t at time t and the image data x t-1 at time t-1. Each vector data h, h'showing the characteristics is extracted (S23). Then, the extracted h, than h', action a t-1 between time t and time t-1, estimates the reward r t and episode termination t t at time t (output estimation situation results) to (S24), with loss functions, action a t-1, reward r t, compares the estimated status results and real data episode termination t t (S25). Then, the parameters of the image feature extractor (first learner) and the state classifier (second learner) are changed so that the value of the loss function becomes smaller (S26). The parameters are updated in steps S23 to S26 until the learning performance exceeds a predetermined threshold value or the number of repetitions exceeds a predetermined number (S27).

図7の強化学習方法における第1学習器と第2学習器について図8を用いて説明する。図7の強化学習方法では、環境データとして画像データを扱うため、第1学習器と第2学習器の双方について、畳み込みニューラルネットワーク(CNN)を用いることができる。第1学習器は、時刻tの画像データxと時刻t−1の画像データxt−1より各々の画像特徴を示す各ベクトルデータh,h´を抽出する画像特徴抽出器であり、第2学習器は、行動at−1、報酬r 及びエピソード終端tの推定状況結果と実データを比較する状態分類器である。 The first learning device and the second learning device in the reinforcement learning method of FIG. 7 will be described with reference to FIG. In the reinforcement learning method of FIG. 7, since image data is treated as environmental data, a convolutional neural network (CNN) can be used for both the first learning device and the second learning device. The first learner is an image feature extractor that extracts each vector data h, h'indicating each image feature from the image data x t at time t and the image data x t-1 at time t-1. 2 learner may act a t-1, a state classifier for comparing the estimated status results and real data of the reward r t and episode termination t t.

図9は、強化学習後の学習器の入出力データフロー図を示している。
強化学習後は、過去の環境データ(画像データなど)を取得することはなく、現在の状態としての画像データxを環境2から取り込み(12)、特徴抽出器13へ入力する。判定部11(図示せず)は使用せず不要である。特徴抽出器13により、環境データ(画像データ)の特徴を示すベクトルデータh(15)を出力し(14)、特徴データhを価値関数計算器17へ入力し(16)、状態と報酬から将来にわたって獲得できる報酬の総和を表す価値関数を出力する(18)。エージェントは価値関数と方策3に従って最適な行動を選択する。
FIG. 9 shows an input / output data flow diagram of the learner after reinforcement learning.
After reinforcement learning is not able to get past environmental data (such as image data), captures the image data x t as the current state from the environment 2 (12), and inputs to the feature extractor 13. The determination unit 11 (not shown) is not used and is unnecessary. The feature extractor 13 outputs vector data h (15) indicating the features of the environmental data (image data) (14), inputs the feature data h to the value function computer 17 (16), and changes the state and reward into the future. It outputs a value function that represents the sum of the rewards that can be obtained over time (18). The agent selects the optimal action according to the value function and policy 3.

図10は、実施例1の強化学習方法を用いた場合におけるエピソードの効率性を示すグラフである。評価に用いた環境は、AtariゲームドメインのH.E.R.O.という電子ゲームの表示画像である。H.E.R.O.のタスクを上手く遂行するためには、リスクと報酬のバランスを保つように行う必要がある。
H.E.R.O.では、エージェントが人間のキャラクタを操作し、地下に閉じ込めた鉱夫を救出することが目標である。プレイヤーキャラクタの装備は、ヘリコプター(飛行はできるが、ジャンプできない)、ヘルメットに付けられたレーザーと数が限られた爆薬である。エージェントが点数(報酬)を得られるタスクは、敵をレーザーで倒す、爆薬で落盤を壊す、そして鉱夫を救出するという3つの方法がある。また、鉱夫が救出されると、現在のレベルの残された制限時間と爆薬は点数に換算され、ゲームは次のレベルに移るようになっている。
FIG. 10 is a graph showing the efficiency of episodes when the reinforcement learning method of Example 1 is used. The environment used for the evaluation was HERO of the Atari game domain. It is a display image of an electronic game. HERO. In order to successfully perform these tasks, it is necessary to balance risk and reward.
HERO. The goal is for the agent to manipulate the human character and rescue the miner trapped underground. The player character's equipment is a helicopter (which can fly but cannot jump), a laser attached to the helmet, and a limited number of explosives. There are three ways agents can get points (rewards): kill enemies with a laser, destroy a cave-in with explosives, and rescue a miner. Also, when the miner is rescued, the remaining time limit and explosives at the current level are converted into points, and the game moves to the next level.

深層学習のオープンソースは、OpenAI Baselines(http://github.com/openai/baselines)を使用し、OpenAIの強化学習実装としてA2Cを用い、ハイパーパラメータは基本的に同じものとした。また、A2Cに加え、表現学習の目標それぞれに一つの線形隠れ層を追加した。
表現学習のスキームの学習への効果を評価するために、違う重みで実験を行った。負の報酬は設定せず、報酬の分類器三値ではなく二値分類を用いた。行動の分類器である価値関数計算器は、softmax cross-entropyロスで最適化した。特徴抽出器(第1学習器)と状態分類器(第2学習器)の2つは、mean-squareロスで最適化した。報酬とエピソード終端の状態サンプリングは均衡されたものとした。
学習の最初は、データ収集期間として、16エピソードの間に方策のみを学習し、そのあとすべての目標が最適化されることにした。メモリの使用量がとても大きくなり得るため、実験は5000エピソード、又は、1000万(スキッピング後の)フレームのいずれ最初に達した時刻まで行われることにした。方法の安定性を評価するため、すべての実験は4回まで行った。
OpenAI Baselines (http://github.com/openai/baselines) was used as the open source for deep learning, A2C was used as the reinforcement learning implementation of OpenAI, and the hyperparameters were basically the same. In addition to A2C, one linear hidden layer was added to each of the goals of expression learning.
Experiments were conducted with different weights to evaluate the effects of expression learning schemes on learning. Negative rewards were not set and binary classification was used instead of reward classifier ternary. The value function calculator, a behavior classifier, was optimized with softmax cross-entropy loss. The feature extractor (first learner) and the state classifier (second learner) were optimized with mean-square loss. Reward and end-of-episode state sampling were balanced.
At the beginning of the learning, as a data collection period, we decided to learn only the measures during 16 episodes, and then all the goals were optimized. Since memory usage can be very high, we decided to run the experiment until the first of 5000 episodes or 10 million (post-skipping) frames. All experiments were performed up to 4 times to assess the stability of the method.

図10は、違う重み(Weight:画像特徴を学習する比率)で行われる表現学習の実験の結果を示している(強化学習の比率は1で固定)。条件ごとに、4回の実験の点数の平均値と標準偏差はそれぞれ直線とグレースケールで色付けされたエリアで表している。本発明における学習の目標の組み合わせは、A2Cの学習速度と点数を改善している。特に、重みが2の場合、5000エピソード終わりの点数の平均値は1万点に近くなっている(元のA2Cがこのレベルの点数を獲得する時点は1万エピソードが必要であった)。また、重みが上がると共に、既存の手法(Control:Weight=0)からの改善も大きくなっていくことが確認できた。
上記の実験によって、本発明の学習の目標は、深層強化学習のアルゴリズムの学習速度と点数を改善できることを示している。また、この結果は改めて、深層強化学習のために良い特徴抽出器の重要性を示している。
FIG. 10 shows the results of an experiment of expression learning performed with different weights (Weight: ratio of learning image features) (reinforcement learning ratio is fixed at 1). For each condition, the mean and standard deviation of the scores of the four experiments are represented by straight lines and grayscale colored areas, respectively. The combination of learning goals in the present invention improves the learning speed and score of A2C. In particular, when the weight is 2, the average score at the end of 5000 episodes is close to 10,000 (10,000 episodes were required when the original A2C scored this level). In addition, it was confirmed that as the weight increases, the improvement from the existing method (Control: Weight = 0) also increases.
From the above experiments, it is shown that the learning goal of the present invention can improve the learning speed and score of the deep reinforcement learning algorithm. In addition, this result once again shows the importance of a good feature extractor for deep reinforcement learning.

実施例1の強化学習方法及び装置は、動的に変化し続ける実環境での強化学習に関するものであったが、本実施例の強化学習方法及び装置では、過去の環境データを用いた強化学習方法であり、以下にその説明を行う。
本実施例の強化学習方法及び装置では、実環境での強化学習において訓練された際の行動、報酬、環境データなど過去に保存されたデータを用いる。例えば、並列処理により、実環境での強化学習した際の学習データ(環境データ等)をデータ収集しメモリに保存する処理と、メモリに保存された収集データ(環境データ等)を読み込み、環境データの特徴を抽出し、抽出された特徴に基づいて表現学習により学習器が訓練される。並列処理の例として、電子ゲームをプレイしてデータを収集する処理と、収集したデータに基づいて強化学習及び表現学習で学習器が訓練される処理とが、完全に独立して動く場合がある(マルチプロセッシング)。この場合、定期的に強化学習及び表現学習で学習したパラメータを、収集する処理のパラメータにコピーする。本実施例の強化学習方法及び装置は、データをランダムに大量に取得し、リセットの有無にかかわらず全てのデータを用いて強化学習と表現学習を行うものである。
The reinforcement learning method and device of Example 1 were related to reinforcement learning in a dynamically changing real environment, but in the reinforcement learning method and device of this example, reinforcement learning using past environmental data is used. This is a method, which will be described below.
In the reinforcement learning method and device of this embodiment, data stored in the past such as behavior, reward, and environmental data when trained in reinforcement learning in a real environment is used. For example, by parallel processing, the process of collecting learning data (environmental data, etc.) at the time of reinforcement learning in the real environment and saving it in the memory, and the process of reading the collected data (environmental data, etc.) saved in the memory, and environmental data The learner is trained by expression learning based on the extracted features. As an example of parallel processing, the process of playing an electronic game and collecting data and the process of training a learner by reinforcement learning and expression learning based on the collected data may operate completely independently. (Multiprocessing). In this case, the parameters learned in reinforcement learning and expression learning are periodically copied to the parameters of the process to be collected. The reinforcement learning method and device of this embodiment randomly acquire a large amount of data, and perform reinforcement learning and expression learning using all the data regardless of the presence or absence of reset.

図11は、実施例2の強化学習方法の入出力データフロー図、図12は、実施例2の強化学習方法の処理フロー図を示している。
図11,12に示すとおり、実施例2の強化学習方法では、実環境から環境データを取得し学習するのではなく、メモリ部4に保存された過去の行動、報酬及び状態を取得して学習する。学習器1の構成は、実施例1の場合と同一である。
図12に示すとおり、本実施例の強化学習方法の処理フローでは、まずメモリ部からランダムにデータを取得する(S31)。ここではエピソード単位に保存された環境データ(画像データ群)をランダムに取得するが、これに限定されず、複数のエピソードのデータや、ある程度の時間長でのデータであっても構わない。
FIG. 11 shows an input / output data flow diagram of the reinforcement learning method of the second embodiment, and FIG. 12 shows a processing flow diagram of the reinforcement learning method of the second embodiment.
As shown in FIGS. 11 and 12, in the reinforcement learning method of the second embodiment, instead of acquiring and learning the environmental data from the actual environment, the past actions, rewards and states stored in the memory unit 4 are acquired and learned. To do. The configuration of the learner 1 is the same as that of the first embodiment.
As shown in FIG. 12, in the processing flow of the reinforcement learning method of this embodiment, first, data is randomly acquired from the memory unit (S31). Here, the environment data (image data group) saved in each episode is randomly acquired, but the data is not limited to this, and may be data of a plurality of episodes or data of a certain time length.

メモリ部からランダムにデータを取得(S31)した後、図6の処理フローの通常の強化学習を行う(S10)。
そして、強化学習(S10)の後、メモリ部より、対応する画像データxを取得する(S32)。続いて、メモリ部より、時刻tの画像データxと関連する時刻t−1の画像データxt−1、報酬rt−1と行動at−1を取得する(S33)。
そして、時刻tの画像データxと時刻t−1の画像データxt−1より各々の画像特徴を示す各ベクトルデータh,h´を抽出し(S34)、抽出したh,h´より、時刻tと時刻t−1間の行動at−1、時刻tの報酬rおよびエピソード終端tを推定(推定状況結果を出力)し(S35)、ロス関数を用いて、行動at−1、報酬r、エピソード終端tの推定状況結果と実データを比較する(S36)。そして、ロス関数の値が小さくなるように画像特徴抽出器(第1学習器)と状態分類器(第2学習器)のパラメータを変更する(S37)。ステップS34からS37のパラメータ更新までは、学習性能が所定閾値を超えるまで、又は、繰り返し回数が所定回数を超えるまで繰り返し行われる(S38)。
以上のように、メモリ部からデータをランダムに大量に取得し、リセットの有無にかかわらず全てのデータを用いて強化学習と表現学習を行う。なお、強化学習と表現学習の比重は、適宜調整して学習を行う。
After randomly acquiring data from the memory unit (S31), normal reinforcement learning of the processing flow of FIG. 6 is performed (S10).
Then, after reinforcement learning (S10), the corresponding image data xt is acquired from the memory unit (S32). Subsequently, the image data x t -1 at time t-1 , the reward r t-1, and the action a t-1 related to the image data x t at time t are acquired from the memory unit (S33).
Then, the time t image data x t and time t-1 of the image data x t-1 from each respective vector data h indicating the image feature of the extracts h'(S34), the extracted h, than h', action a t-1 between time t and time t-1, estimates the reward r t and episode termination t t at time t (estimation conditions result output) to (S35), using a loss function, action a t- 1, reward r t, compares the estimated status results and real data episode termination t t (S36). Then, the parameters of the image feature extractor (first learner) and the state classifier (second learner) are changed so that the value of the loss function becomes smaller (S37). The parameters of steps S34 to S37 are updated repeatedly until the learning performance exceeds a predetermined threshold value or the number of repetitions exceeds a predetermined number (S38).
As described above, a large amount of data is randomly acquired from the memory unit, and reinforcement learning and expression learning are performed using all the data regardless of whether or not there is a reset. The weights of reinforcement learning and expression learning are adjusted as appropriate for learning.

本発明は、自動車の自動運転、工業用ロボットアームの自動制御など幅広い分野における強化学習に有用である。 The present invention is useful for reinforcement learning in a wide range of fields such as automatic driving of automobiles and automatic control of industrial robot arms.

1 学習器
2 環境
3 方策
4 メモリ部
11 判定部
13 特徴抽出器(第1学習器)
15,25 特徴ベクトル
17 価値関数計算器
23 状態分類器(第2学習器)
28 更新部
1 Learner 2 Environment 3 Measures 4 Memory section 11 Judgment section 13 Feature extractor (1st learner)
15, 25 Feature vector 17 Value function calculator 23 State classifier (second learner)
28 Update Department

Claims (12)

環境データから観測された状態に基づき学習する学習器を用いて学習した結果からエージェントの行動方策を最適化する強化学習方法において、
1つのエピソードにおける環境データの学習中に、予め設定された注目状況が発生した状態が観測されたか否かを判定する判定ステップと、
前記注目状況が発生した状態が観測された場合に、前記注目状況が発生した第1状態の第1環境データの特徴と、第1状態より過去に遡った第2状態の第2環境データの特徴を比較し、各々の特徴の差を前記学習器に学習させる学習ステップ、を備えたことを特徴とする強化学習方法。
In the reinforcement learning method that optimizes the behavior policy of the agent from the result of learning using the learning device that learns based on the state observed from the environmental data
A determination step for determining whether or not a preset attention situation has occurred during the learning of environmental data in one episode, and a determination step.
When the state in which the attention situation occurs is observed, the characteristics of the first environmental data of the first state in which the attention situation occurs and the characteristics of the second environmental data of the second state that goes back to the past from the first state. A reinforcement learning method comprising a learning step of making the learner learn the difference between the features.
前記学習ステップは、以下のa)〜c)のステップを備えることを特徴とする請求項1に記載の強化学習方法:
a)前記注目状況が発生した第1状態の第1環境データと、第1状態より過去に遡った第2状態の第2環境データと、第1状態及び第2状態における各々の行動及び報酬を入力して、前記学習器である第1学習器に学習させる第1学習ステップと、
b)第1学習器が出力する第1環境データ及び第2環境データの各々の特徴データを入力して、各々の特徴データの差を、第2学習器に学習させる第2学習ステップと、
c)第2状態における行動と報酬、及び、第1状態における前記注目状況の発生有無に関する第2学習器の出力推定データと実データとに基づいて、第1学習器及び第2学習器のパラメータを更新する更新ステップ。
The reinforcement learning method according to claim 1, wherein the learning step includes the following steps a) to c):
a) The first environmental data of the first state in which the attention situation occurred, the second environmental data of the second state retroactive from the first state, and the actions and rewards in the first state and the second state, respectively. The first learning step of inputting and making the first learning device which is the learning device learn,
b) A second learning step in which each feature data of the first environment data and the second environment data output by the first learner is input and the difference between the feature data is learned by the second learner.
c) Parameters of the first learner and the second learner based on the behavior and reward in the second state and the output estimation data and the actual data of the second learner regarding the occurrence or absence of the attention situation in the first state. Update step to update.
前記注目状況が発生した第1状態より過去に遡った第2状態は、第1状態を観測した時刻tの1つ前の時刻t−1に観測した状態であり、
前記判定ステップにおいて、
前記注目状況が発生した状態が観測された場合に、時刻t−1に観測された状態の第2環境データと行動及び報酬が記憶されているメモリ部から、時刻t−1の第2環境データと行動及び報酬を取得し、
前記第1学習ステップにおいて、
時刻tの第1環境データと、時刻t−1の第2環境データとから、第1環境データ及び第2環境データの各々の特徴データh,h´を抽出し、
前記第2学習ステップにおいて、
前記特徴データh,h´から時刻t−1と時刻tの間の行動及び報酬と、時刻tの前記注目状況の発生有無を推定し、
前記更新ステップにおいて、
前記推定した結果と、実際の時刻t−1と時刻tの間の行動及び報酬と時刻tの前記注目状況とを、ロス関数を用いて比較し、ロス関数の値が小さくなるように、前記第1学習ステップ、前記第2学習ステップ及び前記更新ステップの各ステップを、強化学習の性能が閾値以上、又は、繰り返し回数が所定回数以上になるまで、前記パラメータを繰り返し更新し、
1回発生した前記注目状況に対し、発生以降に発生時と同様な環境データ、行動及び報酬の環境条件に遭遇した場合に、前記注目状況を発生し難くする又は前記注目状況を積極的に発生し易くする前記第1学習器が構築されることを特徴とする請求項2に記載の強化学習方法。
The second state, which goes back to the past from the first state in which the attention state occurred, is a state observed at time t-1 immediately before the time t when the first state was observed.
In the determination step
When the state in which the attention situation occurs is observed, the second environmental data of the state observed at time t-1 and the second environmental data of the time t-1 from the memory unit in which the action and the reward are stored are stored. And get actions and rewards,
In the first learning step,
From the first environmental data at time t and the second environmental data at time t-1, the characteristic data h and h'of the first environment data and the second environment data are extracted.
In the second learning step,
From the feature data h, h', the behavior and reward between the time t-1 and the time t, and the presence or absence of the attention situation at the time t are estimated.
In the update step
The estimated result is compared with the actual action and reward between the time t-1 and the time t and the attention state at the time t using the loss function, and the value of the loss function is reduced. Each step of the first learning step, the second learning step, and the update step is repeatedly updated with the parameters until the performance of reinforcement learning is equal to or more than the threshold value or the number of repetitions is equal to or more than a predetermined number of times.
When the environmental data, behavior, and reward environmental conditions similar to those at the time of occurrence are encountered for the attention situation that occurred once, the attention situation is made difficult to occur or the attention situation is positively generated. The reinforcement learning method according to claim 2, wherein the first learning device is constructed to facilitate facilitation.
前記環境データは、画像データであり、
前記第1学習ステップは、畳み込みニューラルネットワークを用いて、入力する画像データを第1学習器に学習させ、
前記第2学習ステップは、ニューラルネットワークを用いて、入力する画像特徴データを第2学習器に学習させ、
前記更新ステップは、第2学習器の出力推定データと実データを、ロス関数を用いて比較し、ロス関数の値が小さくなるように最適化関数を使って、第1学習器及び第2学習器の重みパラメータを更新する、
ことを特徴とする請求項2又は3に記載の強化学習方法。
The environmental data is image data and
In the first learning step, the convolutional neural network is used to make the first learning device learn the image data to be input.
In the second learning step, the second learning device is made to learn the image feature data to be input by using the neural network.
In the update step, the output estimation data of the second learner and the actual data are compared using the loss function, and the optimization function is used so that the value of the loss function becomes smaller, and the first learner and the second learner are used. Update the vessel weights parameter,
The reinforcement learning method according to claim 2 or 3, characterized in that.
前記注目状況は、エピソード終端における環境リセット又は環境リセットに相当する状況であることを特徴とする請求項1〜4の何れかに記載の強化学習方法。 The reinforcement learning method according to any one of claims 1 to 4, wherein the attention situation is a situation corresponding to an environment reset or an environment reset at the end of an episode. 環境データから観測された状態に基づき学習する学習器を用いて学習した結果からエージェントの行動方策を最適化する強化学習装置において、
1つのエピソードにおける環境データの学習中に、予め設定された注目状況が発生した状態が観測されたか否かを判定する判定部と、
前記注目状況が発生した状態が観測された場合に、前記注目状況が発生した第1状態の第1環境データの特徴と、第1状態より過去に遡った第2状態の第2環境データの特徴を比較し、各々の特徴の差を学習する前記学習器を備えたことを特徴とする強化学習装置。
In a reinforcement learning device that optimizes agent behavior strategies from the results of learning using a learning device that learns based on the state observed from environmental data.
A determination unit that determines whether or not a preset attention situation has occurred during learning of environmental data in one episode.
When the state in which the attention situation occurs is observed, the characteristics of the first environmental data of the first state in which the attention situation occurs and the characteristics of the second environmental data of the second state that goes back to the past from the first state. An enhanced learning device provided with the learning device for comparing and learning the difference between the features.
前記学習器は、前記注目状況が発生した状態が観測された場合に機能する以下のA)〜C)を備えることを特徴とする請求項6に記載の強化学習装置:
A)前記注目状況が発生した第1状態の第1環境データと、第1状態より過去に遡った第2状態の第2環境データと、第1状態及び第2状態における各々の行動及び報酬を入力して学習させる前記学習器である第1学習器と、
B)第1学習器が出力する第1環境データ及び第2環境データの各々の特徴データを入力して、各々の特徴データの差を学習させる第2学習器と、
C)第2状態における行動と報酬、及び、第1状態における前記注目状況の発生有無に関する第2学習器の出力推定データと実データとに基づいて、第1学習器及び第2学習器のパラメータを更新する更新部。
The reinforcement learning device according to claim 6, wherein the learning device includes the following A) to C) that function when the state in which the attention situation occurs is observed.
A) The first environmental data of the first state in which the attention situation occurred, the second environmental data of the second state retroactive from the first state, and the actions and rewards in the first state and the second state, respectively. The first learning device, which is the learning device for inputting and learning, and
B) A second learner that inputs the feature data of the first environment data and the second environment data output by the first learner and learns the difference between the feature data.
C) Parameters of the first learner and the second learner based on the behavior and reward in the second state and the output estimation data and the actual data of the second learner regarding the occurrence or absence of the attention situation in the first state. Update department to update.
前記注目状況が発生した第1状態より過去に遡った第2状態は、第1状態を観測した時刻tの1つ前の時刻t−1に観測した状態であり、
前記判定部は、
前記注目状況が発生した状態が観測された場合に、時刻t−1に観測された状態の第2環境データと行動及び報酬が記憶されているメモリ部から、時刻t−1の第2環境データと行動及び報酬を取得し、
前記第1学習器は、
時刻tの第1環境データと、時刻t−1の第2環境データとから、第1環境データ及び第2環境データの各々の特徴データh,h´を抽出し、
前記第2学習器は、
前記特徴データh,h´から時刻t−1と時刻tの間の行動及び報酬と、時刻tの前記注目状況の発生有無を推定し、
前記更新部は、
前記推定した結果と、実際の時刻t−1と時刻tの間の行動及び報酬と時刻tの前記注目状況とを、ロス関数を用いて比較し、ロス関数の値が小さくなるように、強化学習の性能が閾値以上、又は、繰り返し回数が所定回数以上になるまで、前記パラメータを繰り返し更新し、
1回発生した前記注目状況に対し、発生以降に発生時と同様な環境データ、行動及び報酬の環境条件に遭遇した場合に、前記注目状況を発生し難くする又は前記注目状況を積極的に発生し易くする前記第1学習器が構築されることを特徴とする請求項7に記載の強化学習装置。
The second state, which goes back to the past from the first state in which the attention state occurred, is a state observed at time t-1 immediately before the time t when the first state was observed.
The determination unit
When the state in which the attention situation occurs is observed, the second environmental data of the state observed at time t-1 and the second environmental data of the time t-1 from the memory unit in which the action and the reward are stored are stored. And get actions and rewards,
The first learner is
From the first environmental data at time t and the second environmental data at time t-1, the characteristic data h and h'of the first environment data and the second environment data are extracted.
The second learner is
From the feature data h, h', the behavior and reward between the time t-1 and the time t, and the presence or absence of the attention situation at the time t are estimated.
The update part
The estimated result is compared with the actual action and reward between the time t-1 and the time t and the attention state at the time t using the loss function, and the value of the loss function is strengthened so as to be small. The parameters are repeatedly updated until the learning performance exceeds the threshold value or the number of repetitions exceeds a predetermined number.
When the environmental data, behavior, and reward environmental conditions similar to those at the time of occurrence are encountered for the attention situation that occurred once, the attention situation is made difficult to occur or the attention situation is positively generated. The reinforcement learning device according to claim 7, wherein the first learning device is constructed to facilitate facilitation.
前記環境データは、画像データであり、
前記第1学習器は、畳み込みニューラルネットワークを用いて構成され、入力する画像データで学習し、
前記第2学習器は、ニューラルネットワークを用いて構成され、入力する画像特徴データで学習し、
前記更新部は、前記第2学習器の出力推定データと実データを、ロス関数を用いて比較し、ロス関数の値が小さくなるように最適化関数を使って、前記第1学習器及び第2学習器の重みパラメータを更新することを特徴とする請求項7又は8に記載の強化学習装置。
The environmental data is image data and
The first learner is configured by using a convolutional neural network, and learns with input image data.
The second learner is configured by using a neural network, learns with input image feature data, and then learns.
The update unit compares the output estimation data of the second learner with the actual data using a loss function, and uses an optimization function so that the value of the loss function becomes smaller, and uses the first learner and the first learner. 2. The reinforcement learning device according to claim 7 or 8, wherein the weight parameter of the learner is updated.
前記注目状況は、エピソード終端における環境リセット又は環境リセットに相当する状況であることを特徴とする請求項6〜9の何れかに記載の強化学習装置。 The reinforcement learning device according to any one of claims 6 to 9, wherein the attention situation is a situation corresponding to an environment reset or an environment reset at the end of an episode. 請求項2〜5の何れかの強化学習方法における前記判定ステップ、前記第1学習ステップ、前記第2学習ステップ及び前記更新ステップを、コンピュータに実行させるための強化学習プログラム。 A reinforcement learning program for causing a computer to execute the determination step, the first learning step, the second learning step, and the update step in the reinforcement learning method according to any one of claims 2 to 5. 請求項7〜10の何れかの強化学習装置における前記判定部、前記第1学習器、前記第2学習器及び前記更新部として、コンピュータを機能させるための強化学習プログラム。
A reinforcement learning program for operating a computer as the determination unit, the first learning device, the second learning device, and the updating unit in any of the reinforcement learning devices of claims 7 to 10.
JP2019069533A 2019-03-31 2019-03-31 Reinforced learning method, reinforced learning device, and reinforced learning program for efficient learning Pending JP2020166795A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019069533A JP2020166795A (en) 2019-03-31 2019-03-31 Reinforced learning method, reinforced learning device, and reinforced learning program for efficient learning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019069533A JP2020166795A (en) 2019-03-31 2019-03-31 Reinforced learning method, reinforced learning device, and reinforced learning program for efficient learning

Publications (1)

Publication Number Publication Date
JP2020166795A true JP2020166795A (en) 2020-10-08

Family

ID=72714896

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019069533A Pending JP2020166795A (en) 2019-03-31 2019-03-31 Reinforced learning method, reinforced learning device, and reinforced learning program for efficient learning

Country Status (1)

Country Link
JP (1) JP2020166795A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112287950A (en) * 2020-11-16 2021-01-29 北京沃东天骏信息技术有限公司 Feature extraction module compression method, image processing method, device and medium
CN113408796A (en) * 2021-06-04 2021-09-17 北京理工大学 Deep space probe soft landing path planning method for multitask deep reinforcement learning
CN113421345A (en) * 2021-06-21 2021-09-21 东北大学 Bionic robot fish cluster navigation simulation method based on deep reinforcement learning technology
CN115630754A (en) * 2022-12-19 2023-01-20 北京云驰未来科技有限公司 Intelligent networking automobile information security prediction method, device, equipment and medium

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112287950A (en) * 2020-11-16 2021-01-29 北京沃东天骏信息技术有限公司 Feature extraction module compression method, image processing method, device and medium
CN112287950B (en) * 2020-11-16 2024-04-16 北京沃东天骏信息技术有限公司 Feature extraction module compression method, image processing method, device and medium
CN113408796A (en) * 2021-06-04 2021-09-17 北京理工大学 Deep space probe soft landing path planning method for multitask deep reinforcement learning
CN113408796B (en) * 2021-06-04 2022-11-04 北京理工大学 Deep space probe soft landing path planning method for multitask deep reinforcement learning
CN113421345A (en) * 2021-06-21 2021-09-21 东北大学 Bionic robot fish cluster navigation simulation method based on deep reinforcement learning technology
CN113421345B (en) * 2021-06-21 2023-10-17 东北大学 Bionic robot fish cluster navigation simulation method based on deep reinforcement learning technology
CN115630754A (en) * 2022-12-19 2023-01-20 北京云驰未来科技有限公司 Intelligent networking automobile information security prediction method, device, equipment and medium

Similar Documents

Publication Publication Date Title
JP2020166795A (en) Reinforced learning method, reinforced learning device, and reinforced learning program for efficient learning
Ladosz et al. Exploration in deep reinforcement learning: A survey
Greydanus et al. Visualizing and understanding atari agents
Jeerige et al. Comparison of deep reinforcement learning approaches for intelligent game playing
CN110991027A (en) Robot simulation learning method based on virtual scene training
Boney et al. Regularizing model-based planning with energy-based models
Ziya et al. Comparative study for deep reinforcement learning with CNN, RNN, and LSTM in autonomous navigation
Liu et al. Reinforcement learning-based collision avoidance: Impact of reward function and knowledge transfer
Wang et al. Unmanned surface vessel obstacle avoidance with prior knowledge‐based reward shaping
Polo et al. Safe reinforcement learning in high-risk tasks through policy improvement
Chen et al. An adaptive deep rl method for non-stationary environments with piecewise stable context
Kuutti et al. Arc: Adversarially robust control policies for autonomous vehicles
CN113240118B (en) Dominance estimation method, dominance estimation device, electronic device, and storage medium
WO2021140698A1 (en) Information processing device, method, and program
Bar et al. Deep Reinforcement Learning Approach with adaptive reward system for robot navigation in Dynamic Environments
US20220284303A1 (en) System simulating a decisional process in a mammal brain about motions of a visually observed body
Chen et al. Modified PPO-RND method for solving sparse reward problem in ViZDoom
CN114118400B (en) Concentration network-based cluster countermeasure method and device
Maguire et al. An Online Data-Driven Emergency-Response Method for Autonomous Agents in Unforeseen Situations
Matthews et al. Crowd grounding: finding semantic and behavioral alignment through human robot interaction.
CN115319741B (en) Robot control model training method and robot control method
Hilleli et al. Deep learning of robotic tasks without a simulator using strong and weak human supervision
Nayak Exploring the Potential of Q-Learning Offers a Promising Pathway towards Achieving Artificially Intelligent Driving Capabilities
CN114114911B (en) Automatic super-parameter adjusting method based on model reinforcement learning
Sakurai et al. Acquisition of control knowledge of nonholonomic system by active learning method

Legal Events

Date Code Title Description
A80 Written request to apply exceptions to lack of novelty of invention

Free format text: JAPANESE INTERMEDIATE CODE: A80

Effective date: 20190415

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20210728