Python + Unity Reinforcement learning environment construction

Building an environment to run ML-Agent with Python

usage environment

Python 3.7.6 mlagents 0.17.0 ML-Agents Release3 Unity 2019.2.21f1 Pyenv Poetry

Prerequisites

Download Unity Hub

1. Install Unity ML-Agents

(1) Install Unity ML-Agents Release 3 from the following site https://github.com/Unity-Technologies/ml-agents

スクリーンショット 2020-09-14 130014.png スクリーンショット 2020-09-14 130030.png

(2) Add the copied URL to the end of the Git clone command and execute it. You can download a set of files. (* Create a directory to work with before git clone!)

terminal


mkdir [Arbitrary directory name]
cd [Directory name]
git clone [Copyed URL]

(3) Make sure that the ml-agents directory is created and contains the following files! スクリーンショット 2020-09-14 131106.png

2. Build a virtual environment for Python 3.7.6!

(1) Install pyenv!

terminal


brew install pyenv

(2) Installation of Python 3.7.6

terminal


pyenv install 3.7.6

(3) This directory is set to run on Python 3.7.6

terminal


pyenv local 3.7.6

(4) Download and install the Python management package Poetry

terminal


curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python

(5) Poetry virtual environment preparation Check settings スクリーンショット 2020-09-14 134557.png Set so that a virtual environment is created in the project, and check the setting status again

terminal


poetry config virtualenvs.in-project true

(6) Building a virtual environment with Python 3.7.6 スクリーンショット 2020-09-14 132533.png

(7) Install mlagent == 0.17.0!

terminal


poetry add mlagents==0.17.0

(7) Confirm that the mlagents-learn command can be executed. After executing the command below, confirm that something like the image below appears

terminal


mlagents-learn

スクリーンショット 2020-09-14 132912.png

Recommended Posts

Python + Unity Reinforcement learning environment construction
Python + Unity Reinforcement Learning (Learning)
Python environment construction
Environment construction (python)
python environment construction
Python --Environment construction
Python environment construction
python environment construction
Python and machine learning environment construction (macOS)
Reinforcement learning 1 Python installation
python windows environment construction
homebrew python environment construction
Python development environment construction
python2.7 development environment construction
Mac environment construction Python
Python environment construction @ Win7
Python + Anaconda + Pycharm environment construction
Python environment construction (Windows10 + Emacs)
Reinforcement learning starting with Python
CI environment construction ~ Python edition ~
Python environment construction For Mac
Anaconda3 python environment construction procedure
Python3 environment construction (for beginners)
Python environment construction and TensorFlow
Machine learning environment construction macbook 2021
Python environment construction under Windows7 environment
[MEMO] [Development environment construction] Python
Environment construction of python2 & 3 (OSX)
Environment construction of python and opencv
Python environment construction memo on Windows 10
Get started with Python! ~ ① Environment construction ~
Anaconda python environment construction on Windows 10
I checked Mac Python environment construction
Python environment construction memo on Mac
Python environment construction (pyenv, anaconda, tensorflow)
[Python3] Development environment construction << Windows edition >>
Python development environment construction on macOS
Python environment construction (pyenv + poetry + pipx)
python learning
Environment construction of python3.8 on mac
Python3 environment construction with pyenv-virtualenv (CentOS 7.3)
Python3 TensorFlow for Mac environment construction
Emacs Python development environment construction memo
pytorch @ python3.8 environment construction with pipenv
[docker] python3.5 + numpy + matplotlib environment construction
Python3.6 environment construction (using Win environment Anaconda)
OpenCV3 & Python3 environment construction on Ubuntu
Deep learning tutorial from environment construction
[Ubuntu 18.04] Python environment construction with pyenv + pipenv
Python project environment construction procedure (for windows)
[Python] Road to snake charmer (1) Environment construction
Python3 + venv + VSCode + macOS development environment construction
VScode environment construction (Windows10, Python, C ++, C, Git)
Environment construction procedure: Ubuntu + Apache2 + Python + Pyramid
[Windows 10] "Deep Learning from scratch" environment construction
[Python] Easy Reinforcement Learning (DQN) with Keras-RL
Let's get along with Python # 0 (Environment construction)
Build AI / machine learning environment with Python
Windows + gVim + Poetry python development environment construction
Django environment construction
[Introduction] Reinforcement learning