Democratizing Deep Learning with Unity ML-Agents Arthur Juliani - - PowerPoint PPT Presentation

democratizing deep learning with unity ml agents
SMART_READER_LITE
LIVE PREVIEW

Democratizing Deep Learning with Unity ML-Agents Arthur Juliani - - PowerPoint PPT Presentation

Democratizing Deep Learning with Unity ML-Agents Arthur Juliani About Unity Creation Engine Games AR/VR Cinematics Simulations 40+ Platforms Free for personal use Machine Learning Machine Learning And Games? Yet


slide-1
SLIDE 1

Democratizing Deep Learning with Unity ML-Agents

Arthur Juliani

slide-2
SLIDE 2

About Unity

“Creation Engine”

  • Games
  • AR/VR
  • Cinematics
  • Simulations
  • 40+ Platforms
  • Free for personal use
slide-3
SLIDE 3

Machine Learning

slide-4
SLIDE 4

Machine Learning And Games?

slide-5
SLIDE 5
slide-6
SLIDE 6
slide-7
SLIDE 7
slide-8
SLIDE 8

Yet another ML training platform?

slide-9
SLIDE 9

ML Training Platforms

VizDoom Malmo Atari PyBullet DeepMind Lab SCII LE

slide-10
SLIDE 10

Visual Complexity Cognitive Complexity Physical Complexity

ML Training Environments

slide-11
SLIDE 11

The Unity Ecosystem

slide-12
SLIDE 12

How does it work?

slide-13
SLIDE 13

Unity ML-Agents Workflow

Create Environment Train Agents Embed Agents

slide-14
SLIDE 14

Unity ML-Agents Workflow

Create Environment

Train Agents Embed Agents

slide-15
SLIDE 15

Create Environment (Unity)

1. Create Scene 2. Add Academy, Brain(s), and Agent(s) 3. Define Observations, Actions, and Rewards 4. Build Executable

slide-16
SLIDE 16

Create Environment (Unity)

Observation & Act Decide Coordinate

slide-17
SLIDE 17

Agents

  • Agents are GameObjects within the Unity scene.
  • They perceive the environment via observations, take

actions, and optionally receive rewards.

  • Each agent is linked to a brain, which makes decisions for

the agent.

slide-18
SLIDE 18

Brains

  • Player – Actions are decided by user input through

keyboard or gamepad.

  • Heuristic – Actions are decided by C# script using state

input.

  • External – Actions are decided using Tensorflow via

Python interface.

  • Internal – Actions are decided using Tensorflow model

embedded into project.

slide-19
SLIDE 19

Unity ML-Agents Workflow

Build Environment

Train Agents

Embed Agents

slide-20
SLIDE 20

Training Methods

Reinforcement Learning

  • Learn through rewards
  • Trial-and-error
  • Super-speed simulation
  • Agent becomes “optimal” at task

Imitation Learning

  • Learn through demonstrations
  • No rewards necessary
  • Real-time interaction
  • Agent becomes “human-like” at task
slide-21
SLIDE 21

Agent Training Process

slide-22
SLIDE 22

Train Agents (Python)

  • Launch an environment from python with

env = UnityEnvironment(“my_environment”)

  • Interact with gym-like interface:

env.reset() env.step() env.close()

slide-23
SLIDE 23

Train Agents (Python)

  • PPO and Behavioral Cloning algorithms

included by default.

  • Works with Continuous and Discrete

Control, plus image and/or vector inputs.

  • Monitor progress with TensorBoard.
slide-24
SLIDE 24

Unity ML-Agents Workflow

Build Environment Train Agents

Embed Agents

slide-25
SLIDE 25

Embed Agents (Unity)

  • Once a model is trained, it can be

exported into the Unity project.

  • Simply drop .bytes file into Unity

project, and use it in corresponding Brain with “Internal” mode.

  • Support for Mac, Windows, Linux,

iOS, and Android.

slide-26
SLIDE 26

Learning Scenarios

slide-27
SLIDE 27

Twelve Agents, One Brain, Independent Rewards

slide-28
SLIDE 28
slide-29
SLIDE 29

Two Agents, One Brain, Cooperative Rewards

slide-30
SLIDE 30
slide-31
SLIDE 31

Four Agents, Two Brains: Competitive Multi-Agent

slide-32
SLIDE 32

Multi-Stage Soccer Training

Defense Train one brain with negative reward for ball entering their goal Offense Train one brain with positive reward for ball entering opponents goal Combined Train both brains together to play against

  • pponent team
slide-33
SLIDE 33
slide-34
SLIDE 34

Physical Manipulation

Reacher Crawler

slide-35
SLIDE 35

Additional Features

slide-36
SLIDE 36

Curriculum Learning

slide-37
SLIDE 37

Curriculum Learning

  • Bootstrap learning of difficult

task with simpler task

  • Utilize custom reset

parameters

  • Change environment task

based on reward or fixed progress

Easy Difficult

slide-38
SLIDE 38
slide-39
SLIDE 39
slide-40
SLIDE 40

Memory-enhanced agents

slide-41
SLIDE 41
slide-42
SLIDE 42
slide-43
SLIDE 43

Try it Now https://github.com/Unity-Technologies/ml-agents

slide-44
SLIDE 44

Thank You! Questions?

@awjuliani arthurj@unity3d.com