ML-agentsを用いた学習を開始することができない
Q&A
Closed
解決したいこと
ML-agentsでmlagents-learnコマンド実行後、unityでプレイボタンを押しても学習が
開始されないこと
次のコマンド実行後
mlagents-learn ./config/sample/RollerBall.yaml --run-id=RollerBall-1
次の画面が現れ、unityのplayボタンを押したのですが、
┐ ╖
╓╖╬│╡ ││╬╖╖
╓╖╬│││││┘ ╬│││││╬╖
╖╬│││││╬╜ ╙╬│││││╖╖ ╗╗╗
╬╬╬╬╖││╦╖ ╖╬││╗╣╣╣╬ ╟╣╣╬ ╟╣╣╣ ╜╜╜ ╟╣╣
╬╬╬╬╬╬╬╬╖│╬╖╖╓╬╪│╓╣╣╣╣╣╣╣╬ ╟╣╣╬ ╟╣╣╣ ╒╣╣╖╗╣╣╣╗ ╣╣╣ ╣╣╣╣╣╣ ╟╣╣╖ ╣╣╣
╬╬╬╬┐ ╙╬╬╬╬│╓╣╣╣╝╜ ╫╣╣╣╬ ╟╣╣╬ ╟╣╣╣ ╟╣╣╣╙ ╙╣╣╣ ╣╣╣ ╙╟╣╣╜╙ ╫╣╣ ╟╣╣
╬╬╬╬┐ ╙╬╬╣╣ ╫╣╣╣╬ ╟╣╣╬ ╟╣╣╣ ╟╣╣╬ ╣╣╣ ╣╣╣ ╟╣╣ ╣╣╣┌╣╣╜
╬╬╬╜ ╬╬╣╣ ╙╝╣╣╬ ╙╣╣╣╗╖╓╗╣╣╣╜ ╟╣╣╬ ╣╣╣ ╣╣╣ ╟╣╣╦╓ ╣╣╣╣╣
╙ ╓╦╖ ╬╬╣╣ ╓╗╗╖ ╙╝╣╣╣╣╝╜ ╘╝╝╜ ╝╝╝ ╝╝╝ ╙╣╣╣ ╟╣╣╣
╩╬╬╬╬╬╬╦╦╬╬╣╣╗╣╣╣╣╣╣╣╝ ╫╣╣╣╣
╙╬╬╬╬╬╬╬╣╣╣╣╣╣╝╜
╙╬╬╬╣╣╣╜
╙
Version information:
ml-agents: 0.28.0,
ml-agents-envs: 0.28.0,
Communicator API: 1.5.0,
PyTorch: 1.8.2+cpu
[INFO] Listening on port 5004. Start training by pressing the Play button in the Unity Editor.
次のようにUnityTimeOutExceptionが現れます。
発生している問題・エラー
Listening on port 5004. Start training by pressing the Play button in the Unity Editor.
Traceback (most recent call last):
File "C:\Users\tnk05\anaconda3\envs\MLAgentsLowLevelAPI\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Users\tnk05\anaconda3\envs\MLAgentsLowLevelAPI\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\tnk05\anaconda3\envs\MLAgentsLowLevelAPI\Scripts\mlagents-learn.exe\__main__.py", line 7, in <module>
File "C:\Users\tnk05\anaconda3\envs\MLAgentsLowLevelAPI\lib\site-packages\mlagents\trainers\learn.py", line 260, in main
run_cli(parse_command_line())
File "C:\Users\tnk05\anaconda3\envs\MLAgentsLowLevelAPI\lib\site-packages\mlagents\trainers\learn.py", line 256, in run_cli
run_training(run_seed, options, num_areas)
File "C:\Users\tnk05\anaconda3\envs\MLAgentsLowLevelAPI\lib\site-packages\mlagents\trainers\learn.py", line 132, in run_training
tc.start_learning(env_manager)
File "C:\Users\tnk05\anaconda3\envs\MLAgentsLowLevelAPI\lib\site-packages\mlagents_envs\timers.py", line 305, in wrapped
return func(*args, **kwargs)
File "C:\Users\tnk05\anaconda3\envs\MLAgentsLowLevelAPI\lib\site-packages\mlagents\trainers\trainer_controller.py", line 173, in start_learning
self._reset_env(env_manager)
File "C:\Users\tnk05\anaconda3\envs\MLAgentsLowLevelAPI\lib\site-packages\mlagents_envs\timers.py", line 305, in wrapped
return func(*args, **kwargs)
File "C:\Users\tnk05\anaconda3\envs\MLAgentsLowLevelAPI\lib\site-packages\mlagents\trainers\trainer_controller.py", line 105, in _reset_env
env_manager.reset(config=new_config)
File "C:\Users\tnk05\anaconda3\envs\MLAgentsLowLevelAPI\lib\site-packages\mlagents\trainers\env_manager.py", line 68, in reset
self.first_step_infos = self._reset_env(config)
File "C:\Users\tnk05\anaconda3\envs\MLAgentsLowLevelAPI\lib\site-packages\mlagents\trainers\subprocess_env_manager.py", line 446, in _reset_env
ew.previous_step = EnvironmentStep(ew.recv().payload, ew.worker_id, {}, {})
File "C:\Users\tnk05\anaconda3\envs\MLAgentsLowLevelAPI\lib\site-packages\mlagents\trainers\subprocess_env_manager.py", line 101, in recv
raise env_exception
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' Behavior Parameters > Behavior Type is set to "Default"
The environment and the Python interface have compatible versions.
If you're running on a headless server without graphics support, turn off display by either passing --no-graphics option or build your Unity executable as server build
環境
python3.7.16
Unity 2021.2.18f1
ML-Agents Release 19
PyTorch 1.8.2LTS
自分で試したこと
環境構築に関するWeb、YouTube、書籍閲覧