2.0.0 • Public • Published


Unity environment binaries for SLM-Lab, built from kengz/ml-agents.

If you're just using prebuilt environments for the Lab, just install the released binaries via yarn: e.g. yarn add slm-env-3dball.

This repository hosts the built Unity environment binaries released to npm.


You need this repo SLM-Env and the builder repo kengz/ml-agents (use the fork as opposed to Unity/ml-agents).

git clone
git clone

Then follow the setup instruction and intro from ml-agents for Unity.

Naming Convention

Since the binaries are committed to Github, released on npm, and used by SLM-Lab, follow the convention compatible to all of them.

  • Unity raw assets can follow Unity convention: CamelCase, e.g. 3DBall
  • built binaries env_name: kebab-case, e.g. 3dball
  • git branch name the same as env_name: kebab-case, e.g. 3dball
  • npm package name prepended with slm-env-, e.g. slm-env-3dball

Build Unity Environment

  1. Build your Unity environment and commit asset source code to ml-agents repo. For the most part follow the original doc. Remember the core settings:

    • Player > Resolution and Presentation > Run in Background (checked)
    • Player > Resolution and Presentation > Display Resolution Dialog (Disabled)
    • Academy > Brain > External
  2. When ready to build binary, decide on an env_name, e.g. 3dball. You may want to check on npm that the name slm-env-3dball is not already taken, so you can release.

  3. Come to this SLM-Env repo, create a new git branch from master:

cd SLM-Env
git checkout master
git checkout -b 3dball
  1. Build these versions of binaries and save to SLM-Env/build/:
  • MacOSX version
    • make Academy > Training Configuration as follow (or leave as-is if smaller than Inference Configuration):
      • Width: 128
      • Height: 72
      • Quality Level: 0
      • Time Scale: 100
    • build directory: SLM-Env/build/
    • save name: 3dball
  • Linux version
    • make Training Configuration same as MacOSX
    • Headless Mode (checked)
    • save name: 3dball

Next, ready to release.


  1. Open up package.json and update:
  • replace envname as proper: "name": "slm-env-3dball",
  • if this is an update, bump version. Default is "version": "1.0.0",
  1. commit and push the new build/ folder and package.json:
git add build/
git add package.json
git commit -m 'add 3dball'
git push --set-upstream origin 3dball
  1. Release to npm (make sure you are logged in first, by npm login):
npm publish

Since the binaries are huge, npm will throw an error near the end of it. Just ignore that.

npm ERR! registry error parsing json
npm ERR! publish Failed PUT 403
npm ERR! code E403
npm ERR! You cannot publish over the previously published version 1.0.0. : slm-env-3dball

It should be available on, just search for your package slm-env-3dball.

  1. Add the release to SLM-Lab for usage: yarn add slm-env-3dball



Package Sidebar


npm i slm-env-3dball

Weekly Downloads






Last publish


  • kengz