Professional Documents
Culture Documents
Reinforcement Learning Workflows For Ai
Reinforcement Learning Workflows For Ai
Key Takeaways
2
Why Should You Care About Reinforcement Learning?
3
One Approach Could Be…
4
Any Alternatives?
5
Applications of Reinforcement Learning
6
What is reinforcement learning?
Type of machine learning that trains an ‘agent’ through trial & error
interactions with an environment
7
Reinforcement Learning vs Machine Learning vs Deep Learning
8
Reinforcement Learning vs Machine Learning vs Deep Learning
9
Reinforcement Learning vs Machine Learning vs Deep Learning
10
Reinforcement Learning vs Machine Learning vs Deep Learning
11
Reinforcement Learning vs Machine Learning vs Deep Learning
Deep Learning
12
How does reinforcement learning training work?
Policy update
Reinforcement
Yay!
Learning
Here is
Algorithm
your treat!
Fetch!
REWARD
ENVIRONMENT
13
Reinforcement Learning Concepts
Training a self-driving car
▪ Vehicle’s computer…
AGENT (agent)
OBSERVATIONS ACTIONS ▪ is reading sensor measurements from LIDAR, cameras,…
Policy (observations)
Policy update ▪ that represent road conditions, vehicle position,…
Reinforcement (environment)
Learning ▪ and generates steering, braking, throttle commands,…
Algorithm
(action)
▪ based on an internal state-to-action mapping…
REWARD
(policy)
▪ that tries to optimize, e.g., lap time & fuel efficiency…
(reward).
ENVIRONMENT
▪ The policy is updated through repeated trial-and-error by a
reinforcement learning algorithm
14
Reinforcement Learning Concepts
Training a self-driving car
15
Reinforcement Learning vs Controls
Control system Reinforcement learning system
AGENT
+ ERROR
CONTROLLER PLANT
OBSERVATIONS
Policy
ACTION
- VARIABLE Reinforcement
Learning
Algorithm
MEASUREMENT
REWARD
ENVIRONMENT
16
Policy Representation and Deep Learning
Representation options
▪ Look-up table
▪ Polynomials
1 A
1 2 3 4 5
17
Policy Representation and Deep Learning
Representation options
▪ Look-up table
▪ Polynomials
▪ (Deep) neural networks Deep neural network policy
18
How do I set up and solve
a reinforcement learning problem?
19
Reinforcement Learning Workflow
▪ Simulation models or real hardware ▪ Deep network? Table? Polynomial?
20
Reinforcement Learning Workflow
21
Reinforcement Learning Toolbox
Introduced in
▪ Built-in and custom reinforcement learning algorithms
22
Example: Walking Robot
23
Creating the Environment
24
Reward Shaping
25
26
Creating the Agent
27
Training the Agent
28
29
Applications of Reinforcement Learning
30
Autonomous Driving Example
RL Agent
Traditional
+
Controller
Steer, throttle,
Start/Goal brake
31
RL Agent
Reward
Vehicle Model
Traditional
Controller
32
33
Results
Traditional controller +
Lap time (s) reinforcement learning
Baseline
RL+Baseline
34
Reference Applications in Documentation
▪ Controller Design
▪ Robotic Locomotion
▪ Imitation Learning
35
Pros & Cons of Reinforcement Learning
Pros Cons
▪ No data required before training ▪ Trained policies are hard to verify
(no performance guarantees)
▪ New possibilities with AI for
hard-to-solve problems ▪ Many trials/data points required
(sample inefficient)
▪ Complex end-to-end solutions can – Training with real hardware can be
be developed expensive and dangerous
36
How Can MATLAB and Simulink Help?
Challenges
▪ Trained policies are hard to verify ▪ Reuse existing code and models for
(no performance guarantees) environments
37
Key Takeaways
38
Learn More
39