Skip to content

An AI project developed to learn about machine learning in a game setting, while also being inventive!

Notifications You must be signed in to change notification settings

Stektpotet/NeuralCommander

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NeuralCommander

An AI project developed to learn about machine learning in a game setting, while also being inventive!

Installation

Executable installation

Extracts content of the release into a folder wherever.

  1. From Releases, get the newest one.
  2. Install latest python 3.6 (with pip!!!)
    1. add python + python/Scripts to env variables
  3. Download ml-agents-0.5.0a repo
  4. install virtualenv, check with virtualenv --version first, it may already be installed:
   > pip3 install -U pip virtualenv
  1. 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
  1. install ml-agents' dependencies:
   > pip install -r some_path/ml-agents-0.5.0a/ml-agents/requirements.txt

Project installation

  1. Clone repository
  2. Install Unity 2018.2 (through Unity Hub most versions of Unity are available)
  3. Install latest python 3.6 (with pip!!!)
    1. add python + python/Scripts to env variables
  4. Download ml-agents-0.5.0a repo
  5. install virtualenv, check with virtualenv --version first, it may already be installed:
   > pip3 install -U pip virtualenv
  1. 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
  1. install ml-agents' dependencies:
   > pip install -r some_path/ml-agents-0.5.0a/ml-agents/requirements.txt
  1. 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
  1. Open the BootCamp Scene in unity
  2. Open Player settings: Edit->Settings->Player
  3. set editor to use .Net 4.x equivalent
  4. set editor "Scripting Defined Symbols": ENABLE_TENSORFLOW, BOOTCAMP
  5. Download TensorFlowSharp plugin for unity (link will download directly)
  6. import into the project (you will be prompted for this when doubleclicking the file while also having your unity project open)

Running training

Using the release-executable

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

Using the project files in Unity

  1. Open the Unity Project
  2. 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

About

An AI project developed to learn about machine learning in a game setting, while also being inventive!

Resources

Stars

Watchers

Forks

Packages

No packages published