https://section31.jp/gamedevelopment/unity/ml-agents081001/
https://www.fast-system.jp/unity-ml-agents-version-0-8-0-howto/
上記の二つのサイトを参考にまずml-agents0.9.0でやりKeyErrorと出たので
バージョンを0.8.1に落としてやってみたところKeyboardInterruptというエラーが出てしまいます。
Unityのバージョン2018.4.7f1
pip list
Package Version ------------------ --------- absl-py 0.8.0 astor 0.8.0 atomicwrites 1.3.0 attrs 19.1.0 backcall 0.1.0 bleach 1.5.0 certifi 2019.6.16 cloudpickle 0.8.1 colorama 0.4.1 cycler 0.10.0 decorator 4.4.0 defusedxml 0.6.0 docopt 0.6.2 entrypoints 0.3 gast 0.2.2 grpcio 1.11.1 html5lib 0.9999999 importlib-metadata 0.19 ipykernel 5.1.2 ipython 7.7.0 ipython-genutils 0.2.0 ipywidgets 7.5.1 jedi 0.15.1 Jinja2 2.10.1 jsonschema 3.0.2 jupyter 1.0.0 jupyter-client 5.3.1 jupyter-console 6.0.0 jupyter-core 4.5.0 kiwisolver 1.1.0 Markdown 3.1.1 MarkupSafe 1.1.1 matplotlib 3.1.1 mistune 0.8.4 mlagents 0.8.1 mlagents-envs 0.8.1 more-itertools 7.2.0 nbconvert 5.6.0 nbformat 4.4.0 notebook 6.0.1 numpy 1.14.5 pandocfilters 1.4.2 parso 0.5.1 pickleshare 0.7.5 Pillow 5.4.1 pip 19.2.2 pluggy 0.12.0 prometheus-client 0.7.1 prompt-toolkit 2.0.9 protobuf 3.6.1 py 1.8.0 Pygments 2.4.2 pyparsing 2.4.2 pypiwin32 223 pyrsistent 0.15.4 pytest 3.10.1 python-dateutil 2.8.0 pywin32 224 pywinpty 0.5.5 PyYAML 5.1.2 pyzmq 18.1.0 qtconsole 4.5.4 Send2Trash 1.5.0 setuptools 41.0.1 six 1.12.0 tensorboard 1.7.0 tensorflow 1.7.1 termcolor 1.1.0 terminado 0.8.2 testpath 0.4.2 tornado 6.0.3 traitlets 4.3.2 wcwidth 0.1.7 Werkzeug 0.15.5 wheel 0.33.4 widgetsnbextension 3.5.1 wincertstore 0.2 zipp 0.6.0
Unityコンソール
UnityAgentsException: The Communicator was unable to connect. Please make sure the External process is ready to accept communication with Unity. MLAgents.Batcher.SendAcademyParameters (MLAgents.CommunicatorObjects.UnityRLInitializationOutput academyParameters) (at Assets/ML-Agents/Scripts/Batcher.cs:91) MLAgents.Academy.InitializeEnvironment () (at Assets/ML-Agents/Scripts/Academy.cs:345) MLAgents.Academy.Awake () (at Assets/ML-Agents/Scripts/Academy.cs:250)
Anaconda Prompt
▄▄▄▓▓▓▓ ╓▓▓▓▓▓▓█▓▓▓▓▓ ,▄▄▄m▀▀▀' ,▓▓▓▀▓▓▄ ▓▓▓ ▓▓▌ ▄▓▓▓▀' ▄▓▓▀ ▓▓▓ ▄▄ ▄▄ ,▄▄ ▄▄▄▄ ,▄▄ ▄▓▓▌▄ ▄▄▄ ,▄▄ ▄▓▓▓▀ ▄▓▓▀ ▐▓▓▌ ▓▓▌ ▐▓▓ ▐▓▓▓▀▀▀▓▓▌ ▓▓▓ ▀▓▓▌▀ ^▓▓▌ ╒▓▓▌ ▄▓▓▓▓▓▄▄▄▄▄▄▄▄▓▓▓ ▓▀ ▓▓▌ ▐▓▓ ▐▓▓ ▓▓▓ ▓▓▓ ▓▓▌ ▐▓▓▄ ▓▓▌ ▀▓▓▓▓▀▀▀▀▀▀▀▀▀▀▓▓▄ ▓▓ ▓▓▌ ▐▓▓ ▐▓▓ ▓▓▓ ▓▓▓ ▓▓▌ ▐▓▓▐▓▓ ^█▓▓▓ ▀▓▓▄ ▐▓▓▌ ▓▓▓▓▄▓▓▓▓ ▐▓▓ ▓▓▓ ▓▓▓ ▓▓▓▄ ▓▓▓▓` '▀▓▓▓▄ ^▓▓▓ ▓▓▓ └▀▀▀▀ ▀▀ ^▀▀ `▀▀ `▀▀ '▀▀ ▐▓▓▌ ▀▀▀▀▓▄▄▄ ▓▓▓▓▓▓, ▓▓▓▓▀ `▀█▓▓▓▓▓▓▓▓▓▌ ¬`▀▀▀█▓ INFO:mlagents.trainers:{'--base-port': '5005', '--curriculum': 'None', '--debug': False, '--docker-target-name': 'None', '--env': 'None', '--help': False, '--keep-checkpoints': '5', '--lesson': '0', '--load': False, '--no-graphics': False, '--num-envs': '1', '--num-runs': '1', '--run-id': 'firstRun', '--save-freq': '50000', '--seed': '-1', '--slow': False, '--train': True, '<trainer-config-path>': 'config/trainer_config.yaml'} c:\users\doria\anaconda3\envs\ml-agents\lib\site-packages\mlagents\trainers\learn.py:141: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. trainer_config = yaml.load(data_file) INFO:mlagents.envs:Start training by pressing the Play button in the Unity Editor. Process Process-1: Traceback (most recent call last): File "c:\users\doria\anaconda3\envs\ml-agents\lib\multiprocessing\process.py", line 258, in _bootstrap self.run() File "c:\users\doria\anaconda3\envs\ml-agents\lib\multiprocessing\process.py", line 93, in run self._target(*self._args, **self._kwargs) File "c:\users\doria\anaconda3\envs\ml-agents\lib\site-packages\mlagents\envs\subprocess_environment.py", line 53, in worker env = env_factory(worker_id) File "c:\users\doria\anaconda3\envs\ml-agents\lib\site-packages\mlagents\trainers\learn.py", line 192, in create_unity_environment base_port=start_port File "c:\users\doria\anaconda3\envs\ml-agents\lib\site-packages\mlagents\envs\environment.py", line 87, in __init__ "of ML-Agents.".format(self._version_, self._unity_version)) mlagents.envs.exception.UnityEnvironmentException: The API number is not compatible between Unity and python. Python API : API-8, Unity API : API-9. Please go to https://github.com/Unity-Technologies/ml-agents to download the latest version of ML-Agents. Traceback (most recent call last): File "c:\users\doria\anaconda3\envs\ml-agents\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\doria\anaconda3\envs\ml-agents\lib\site-packages\mlagents\envs\subprocess_environment.py", line 38, in recv response: EnvironmentResponse = self.conn.recv() File "c:\users\doria\anaconda3\envs\ml-agents\lib\multiprocessing\connection.py", line 250, in recv buf = self._recv_bytes() File "c:\users\doria\anaconda3\envs\ml-agents\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\doria\anaconda3\envs\ml-agents\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "c:\users\doria\anaconda3\envs\ml-agents\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\doria\Anaconda3\envs\ml-agents\Scripts\mlagents-learn.exe\__main__.py", line 9, in <module> File "c:\users\doria\anaconda3\envs\ml-agents\lib\site-packages\mlagents\trainers\learn.py", line 262, in main run_training(0, run_seed, options, Queue()) File "c:\users\doria\anaconda3\envs\ml-agents\lib\site-packages\mlagents\trainers\learn.py", line 88, in run_training keep_checkpoints, lesson, env.external_brains, File "c:\users\doria\anaconda3\envs\ml-agents\lib\site-packages\mlagents\envs\subprocess_environment.py", line 173, in external_brains return self.envs[0].recv().payload File "c:\users\doria\anaconda3\envs\ml-agents\lib\site-packages\mlagents\envs\subprocess_environment.py", line 41, in recv raise KeyboardInterrupt KeyboardInterrupt
あなたの回答
tips
プレビュー