質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
強化学習

強化学習とは、ある環境下のエージェントが現状を推測し行動を決定することで報酬を獲得するという見解から、その報酬を最大限に得る方策を学ぶ機械学習のことを指します。問題解決時に得る報酬が選択結果によって変化することで、より良い行動を選択しようと学習する点が特徴です。

Anaconda

Anacondaは、Python本体とPythonで利用されるライブラリを一括でインストールできるパッケージです。環境構築が容易になるため、Python開発者間ではよく利用されており、商用目的としても利用できます。

機械学習

機械学習は、データからパターンを自動的に発見し、そこから知能的な判断を下すためのコンピューターアルゴリズムを指します。人工知能における課題のひとつです。

Unity

Unityは、Unity Technologiesが開発・販売している、IDEを内蔵するゲームエンジンです。主にC#を用いたプログラミングでコンテンツの開発が可能です。

Q&A

解決済

2回答

7536閲覧

Ml-Agentsのエラーについて

onaka_gugu_fire

総合スコア7

強化学習

強化学習とは、ある環境下のエージェントが現状を推測し行動を決定することで報酬を獲得するという見解から、その報酬を最大限に得る方策を学ぶ機械学習のことを指します。問題解決時に得る報酬が選択結果によって変化することで、より良い行動を選択しようと学習する点が特徴です。

Anaconda

Anacondaは、Python本体とPythonで利用されるライブラリを一括でインストールできるパッケージです。環境構築が容易になるため、Python開発者間ではよく利用されており、商用目的としても利用できます。

機械学習

機械学習は、データからパターンを自動的に発見し、そこから知能的な判断を下すためのコンピューターアルゴリズムを指します。人工知能における課題のひとつです。

Unity

Unityは、Unity Technologiesが開発・販売している、IDEを内蔵するゲームエンジンです。主にC#を用いたプログラミングでコンテンツの開発が可能です。

0グッド

1クリップ

投稿2019/11/14 05:59

編集2019/11/15 06:50

前提・実現したいこと

UnityのMl-agentsを用い強化学習及び、模倣学習をしたい

発生している問題・エラーメッセージ

Ml-agentsの最新バージョンである 0.11.0を使用しているが参考文献が少なすぎて解決できない。

(base) C:\Users\user\Documents\ml-agents-master\ml-agents>mlagents-learn ../config/trainer_config.yaml --run-id=firstRun --train 2019-11-14 14:45:59.431992: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudart64_100.dll'; dlerror: cudart64_100.dll not found 2019-11-14 14:45:59.436532: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine. WARNING:tensorflow: The TensorFlow contrib module will not be included in TensorFlow 2.0. For more information, please see: * https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md * https://github.com/tensorflow/addons * https://github.com/tensorflow/io (for I/O related ops) If you depend on functionality not listed there, please file an issue. ▄▄▄▓▓▓▓ ╓▓▓▓▓▓▓█▓▓▓▓▓ ,▄▄▄m▀▀▀' ,▓▓▓▀▓▓▄ ▓▓▓ ▓▓▌ ▄▓▓▓▀' ▄▓▓▀ ▓▓▓ ▄▄ ▄▄ ,▄▄ ▄▄▄▄ ,▄▄ ▄▓▓▌▄ ▄▄▄ ,▄▄ ▄▓▓▓▀ ▄▓▓▀ ▐▓▓▌ ▓▓▌ ▐▓▓ ▐▓▓▓▀▀▀▓▓▌ ▓▓▓ ▀▓▓▌▀ ^▓▓▌ ╒▓▓▌ ▄▓▓▓▓▓▄▄▄▄▄▄▄▄▓▓▓ ▓▀ ▓▓▌ ▐▓▓ ▐▓▓ ▓▓▓ ▓▓▓ ▓▓▌ ▐▓▓▄ ▓▓▌ ▀▓▓▓▓▀▀▀▀▀▀▀▀▀▀▓▓▄ ▓▓ ▓▓▌ ▐▓▓ ▐▓▓ ▓▓▓ ▓▓▓ ▓▓▌ ▐▓▓▐▓▓ ^█▓▓▓ ▀▓▓▄ ▐▓▓▌ ▓▓▓▓▄▓▓▓▓ ▐▓▓ ▓▓▓ ▓▓▓ ▓▓▓▄ ▓▓▓▓` '▀▓▓▓▄ ^▓▓▓ ▓▓▓ └▀▀▀▀ ▀▀ ^▀▀ `▀▀ `▀▀ '▀▀ ▐▓▓▌ ▀▀▀▀▓▄▄▄ ▓▓▓▓▓▓, ▓▓▓▓▀ `▀█▓▓▓▓▓▓▓▓▓▌ ¬`▀▀▀█▓ INFO:mlagents.trainers:CommandLineOptions(debug=False, num_runs=1, seed=-1, env_path=None, run_id='firstRun', load_model=False, train_model=True, save_freq=50000, keep_checkpoints=5, base_port=5005, num_envs=1, curriculum_folder=None, lesson=0, slow=False, no_graphics=False, multi_gpu=False, trainer_config_path='../config/trainer_config.yaml', sampler_file_path=None, docker_target_name=None, env_args=None, cpu=False) INFO:mlagents.envs:Start training by pressing the Play button in the Unity Editor.

該当のソースコード

上記のメッセージが出たのちUnity上でplayを押すと以下のメッセージが出る。

Process Process-1: Traceback (most recent call last): File "c:\users\user\anaconda3\lib\multiprocessing\process.py", line 297, in _bootstrap self.run() File "c:\users\user\anaconda3\lib\multiprocessing\process.py", line 99, in run self._target(*self._args, **self._kwargs) File "c:\users\user\anaconda3\lib\site-packages\mlagents\envs\subprocess_env_manager.py", line 82, in worker env = env_factory(worker_id) File "c:\users\user\anaconda3\lib\site-packages\mlagents\trainers\learn.py", line 359, in create_unity_environment args=env_args, File "c:\users\user\anaconda3\lib\site-packages\mlagents\envs\environment.py", line 105, in __init__ aca_output = self.send_academy_parameters(rl_init_parameters_in) File "c:\users\user\anaconda3\lib\site-packages\mlagents\envs\environment.py", line 689, in send_academy_parameters return self.communicator.initialize(inputs) File "c:\users\user\anaconda3\lib\site-packages\mlagents\envs\rpc_communicator.py", line 88, in initialize "The Unity environment took too long to respond. Make sure that :\n" mlagents.envs.exception.UnityTimeOutException: The Unity environment took too long to respond. Make sure that : The environment does not need user interaction to launch The Agents are linked to the appropriate Brains The environment and the Python interface have compatible versions. Traceback (most recent call last): File "c:\users\user\anaconda3\lib\multiprocessing\connection.py", line 312, in _recv_bytes nread, err = ov.GetOverlappedResult(True) BrokenPipeError: [WinError 109] パイプは終了しました。 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "c:\users\user\anaconda3\lib\site-packages\mlagents\envs\subprocess_env_manager.py", line 59, in recv response: EnvironmentResponse = self.conn.recv() File "c:\users\user\anaconda3\lib\multiprocessing\connection.py", line 250, in recv buf = self._recv_bytes() File "c:\users\user\anaconda3\lib\multiprocessing\connection.py", line 321, in _recv_bytes raise EOFError EOFError During handling of the above exception, another exception occurred: Traceback (most recent call last): File "c:\users\user\anaconda3\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "c:\users\user\anaconda3\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\user\Anaconda3\Scripts\mlagents-learn.exe\__main__.py", line 9, in <module> File "c:\users\user\anaconda3\lib\site-packages\mlagents\trainers\learn.py", line 408, in main run_training(0, run_seed, options, Queue()) File "c:\users\user\anaconda3\lib\site-packages\mlagents\trainers\learn.py", line 222, in run_training options.sampler_file_path, env.reset_parameters, run_seed File "c:\users\user\anaconda3\lib\site-packages\mlagents\envs\subprocess_env_manager.py", line 225, in reset_parameters return self.env_workers[0].recv().payload File "c:\users\user\anaconda3\lib\site-packages\mlagents\envs\subprocess_env_manager.py", line 62, in recv raise UnityCommunicationException("UnityEnvironment worker: recv failed.") mlagents.envs.exception.UnityCommunicationException: UnityEnvironment worker: recv failed.

試したこと

再インストール、webサイトの閲覧

補足情報(FW/ツールのバージョンなど)

TensorFlow 1.15

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答2

0

自己解決

こちら環境依存の問題でした。

プロキシなど通信環境ではじかれる場合があるので環境を変えるなどするといいと思います。

また、この質問の直接の解決方法ではありませんが。参考になるサイトがありましたので紹介します。
https://note.com/npaka

投稿2019/12/03 04:25

onaka_gugu_fire

総合スコア7

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

0

同じエラーが出ました。私の場合、使用していたMLAgentsのバージョンは0.6.0ですが、解決できましたので参考になるかと思い回答します。

AcademyのBroadcast Hub Brainの欄にあるControlのチェックボックスにチェックは入っていますでしょうか?
私はこれを忘れていたため、AIのBrainが使用できませんでした。
参考にしているサイトです。

http://am1tanaka.hatenablog.com/entry/2019/01/18/212915

投稿2019/12/03 03:03

mZtoewtdmkYLI6o

総合スコア14

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

onaka_gugu_fire

2019/12/03 03:54

回答ありがとうございます。 こちらの質問ですが、解決済みです、すいません...。 ML-Agents 0.11ではBrainおよびControlは廃止されています。 解決法載せていきます。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問