An AI project developed to learn about machine learning in a game setting, while also being inventive!
Extracts content of the release into a folder wherever.
- From Releases, get the newest one.
- Install latest python 3.6 (with pip!!!)
- add python + python/Scripts to env variables
- Download ml-agents-0.5.0a repo
- install virtualenv, check with
virtualenv --version
first, it may already be installed:
> pip3 install -U pip virtualenv
- setup virtual env (see tensorflow instructions)
C:\> virtualenv --system-site-packages -p python .\venv
C:\> .\venv\Scripts\activate #activate the virtual environment for all the packages
- install ml-agents' dependencies:
> pip install -r some_path/ml-agents-0.5.0a/ml-agents/requirements.txt
- Clone repository
- Install Unity 2018.2 (through Unity Hub most versions of Unity are available)
- Install latest python 3.6 (with pip!!!)
- add python + python/Scripts to env variables
- Download ml-agents-0.5.0a repo
- install virtualenv, check with
virtualenv --version
first, it may already be installed:
> pip3 install -U pip virtualenv
- setup virtual env (see tensorflow instructions)
C:\> virtualenv --system-site-packages -p python .\venv
C:\> .\venv\Scripts\activate #activate the virtual environment for all the packages
- install ml-agents' dependencies:
> pip install -r some_path/ml-agents-0.5.0a/ml-agents/requirements.txt
- install
mlagents-learn
> cd some_path/ml-agents-0.5.0a/ml-agents
> c:\venv\Scripts\activate #activate the virtualenv
> pip install . #results in the mlagents-learn command being available, YAY
- Open the BootCamp Scene in unity
- Open Player settings:
Edit->Settings->Player
- set editor to use .Net 4.x equivalent
- set editor "Scripting Defined Symbols":
ENABLE_TENSORFLOW, BOOTCAMP
- Download TensorFlowSharp plugin for unity (link will download directly)
- import into the project (you will be prompted for this when doubleclicking the file while also having your unity project open)
From the commandline with virtualenv activated (C:\>.\venv\Scripts\activate
):
> cd some_path/ml-agents-0.5.0a/ml-agents
> mlagents-learn --help #validate that the installation is working
> mlagents-learn c:\path\to\the\executable\trainer_config.yaml env="c:\path\to\the\executable\Neural Commander.exe" --run-id="SOME_IDENTIFIER" [--load] --train #starts trainer
when the message "INFO:mlagents.envs:Start training by pressing the Play button in the Unity Editor." appears, press play in the editor
- Open the Unity Project
- from the commandline with virtualenv activated (
C:\>.\venv\Scripts\activate
):
> cd some_path/ml-agents-0.5.0a/ml-agents
> mlagents-learn --help #validate that the installation is working
> mlagents-learn c:\path\to\the\project\Assets\trainer_config.yaml --run-id="SOME_IDENTIFIER" [--load] --train #starts trainer