(soothing music)
- Hi, I'm Scott Stanfield,
and I'm on Microsoft's Project Bonsai team.
And we've built a system for you to define,
train, and deploy intelligence for autonomous systems.
We call this intelligence a brain.
It's in the AI model that makes decisions in real time.
But unlike machine learning that's used
to predict and perceive things,
like what's in an image or speech recognition,
these brains are responsible
for controlling actions that affect the future.
The brains make decisions about what to do in real time,
so they're more like classic control systems.
Think your car's cruise control
or a commercial refrigerator.
Those systems are found all over heavy industry
and manufacturing lines, or in logistics optimizations.
And they work well when all the parameters are known
but have trouble dealing with uncertainty.
And that's where brains come in.
So what do we need to build a brain?
We have our deep reinforcement learning engine
that's running in Azure.
We have a simulator.
Well, actually you provide the simulator
for your system or your data,
and then with your human expert, maybe it's you,
you line up the sensors and the actions
and the goals of what you're trying to achieve,
and then the brain is trained through practice many times
against the simulation in Azure.
So the sum total of all this we call machine teaching.
It can make snack food faster, align CNC machines,
or smelts aluminum more efficiently,
and it can even balance ping pong balls.
So let me show you how
with this example called Project Moab.
This is a little robot that we built to,
really as a training tool,
to teach you how machine teaching works.
In fact, I'll break it down for you.
So this is a very simple scenario,
where we're trying to eventually teach this robot
how to balance a ping pong ball on a plastic plate.
And this scenario is straightforward enough
because you can identify with it as a person.
You can see that if I tell you the goal,
remember I said goals earlier there,
the goal is to keep the ping pong ball in the middle
without it falling off.
So very simple keep the ball in the middle
without it rolling off.
And I am looking at the ball, that's my sensor,
and my actions are my fingers moving the plate up and down.
And that has a real analog with this plate here.
I have it in manual mode, let me activate it,
so it comes up and I can move this little stick around,
and you can see as I move it around, it responds to that.
And right now it's operating in kind of dumb mode.
It's just me steering it by hand, which is hard to do.
What I'm gonna do is ask my assistant to turn the light off.
Let's run it in this kind of classic engineering mode
and you see it has no trouble doing it.
And that's because it's using a combination
of its sensors and the actions.
Really it's a PID controller
and it's been trained, or not trained,
it's been engineered to bring the ball in the middle.
Now this is a straightforward
mechanical engineering exercise.
The math behind it's pretty difficult,
especially the kinematics,
but there's another way to do this,
and that's with a brain.
So using the same system,
I'm going to activate another mode called the brain mode.
Now this system didn't know anything inherently about Moab.
We have a simulation of the mechanics of this system
and it knows about two things: the sensors and the motors.
But it doesn't inherently know how to keep it balanced,
yet it does.
And that's because it learned
through many, many iterations of trial and error,
kind of the underlying things to do
given the location of the ball
and how to bring it back to center.
So, this is an example of something that you can do
even without having a physical robot
because we have a simulation of it online.
I'm going to now take you through a demo
where we're going to do the whole thing but from scratch.
So let's go do that.
So here we are in the Azure portal,
and you can see that we have a Bonsai workspace
already created, so I'm going to launch that.
And when it comes up, I can choose from this dialogue.
I'm gonna choose the built-in simulation here,
the built-in scenario, which is Project Moab.
And when I click it, you can see it's going to predefine
an Inkling script for me already
that has a few things already defined.
Let me go through a couple of these for you.
So, the first is the section around the sensors
and you can see we have one sensor
and it's coming from the camera
and that's the x and y position of the ball.
And then we have an action space
to change the tilt and the roll, the x and y dimension.
So given that input and our outputs,
we now go down to here where we define our goals.
And this is really cool, because our goal here
is to keep the ball on the plate.
So we want to avoid falling off the plate,
but at the same time, we want to drive the ball
towards the middle.
And with that little bit of code within the goals,
plus the connection to the simulator,
and, granted, there had to be a simulator for it,
but with the connection to all these in place,
we can hit the train button up here.
So I'm gonna go ahead and start training
and we'll let it get spun up.
Okay, now we're back.
It's been training for a few minutes
and we can kind of see how it's doing,
how it's progressing along the combined goals.
And with a little bit more time,
we come back and see that it's figured out
how to balance the ball.
It's figured out how to nail the goals 100%.
So we can stop the training, we can export the brain,
and it's going to create a Docker container
that we can now pull down directly onto our Moab.
So now I'm inside the Moab unit, it's just a Raspberry Pi,
and inside I can wire up the Docker container
when it restarts to use that brain
that I've already installed,
and when I restart it and if I go back to brain mode,
we have our new brain that's running on the Moab unit
and it's balancing, it's just like I learned
how to control it in the simulator.
This little cheesy snack food is delicious
and there's a manufacturer
who's making these puffy snack foods
that are made in an extruder.
Now, an extruder is a screw that heats up things
under pressure and you may have played
with one of these as a kid, play-doh.
An extruder is used everywhere to take plastic pellets,
to make the shell of this Moab, they're used to make soap.
In this case, we take cornmeal. And the cornmeal
gets pushed through an auger and compressed and heats up.
And as it heats up, it's exiting this extruder
and pops up and puffs up to shape as it cooks.
Now as you can imagine, there are lots of variability.
What makes it difficult to control on assembly line
is the cornmeal or the mixture itself,
depending on how it's grown,
might come in with a different temperature
or a moisture content, and so things can get sticky
and they clog up the interior pipes of the machine.
And so you have someone that's on the line
change the knobs and controlling the system,
and it takes years to get good at it.
This is kind of a repetitive experience
but you need to handle all these cases.
So this company took data from the pilot plant
and, using a couple of techniques,
it created a simulation environment that we could train.
So the brain practice on these simulations
and a bunch of conditions and, coming out of it,
we got certified as a medium expert operator.
Now, the circumstances are interesting, but...
they work extremely well.
I've got three quick links for you to learn more.
The first is aka.ms/bonsai
to learn more about the technology
that makes all this possible.
Project Bonsai, there you'll find the documentation
and a tutorial that you can follow along
to do all this on your own time.
Number two, aka.ms/moab
where you can learn more about the sort of robot,
you can see the documentation for it,
look at the source code, see some behind the scenes,
how we made the robot work.
And finally, the third link is aka.ms/AILabProjects.
And that's a collection of all kinds of great ways
that we're using innovation and AI at Microsoft.
So again, thank you so much for joining me,
and I look forward to seeing what you build
with our technology.
(soothing music)