Download Reinforcement Learning and Optimal Control A Selective ... and more Exercises Machine Learning in PDF only on Docsity!
Reinforcement Learning and Optimal Control
A Selective Overview
Dimitri P. Bertsekas
Laboratory for Information and Decision Systems
Massachusetts Institute of Technology
March 2019
Bertsekas (M.I.T.) Reinforcement Learning 1 / 36
Reinforcement Learning (RL): A Happy Union of AI and
Decision/Control Ideas
Decision/
Control/DP
Principle of
Optimality
Markov Decision
Problems
POMDP
Policy Iteration
Value Iteration
AI/RL
Learning through
Experience
Simulation,
Model-Free Methods
Feature-Based
Representations
A*/Games/
Heuristics
Complementary
Ideas
Late 80s-Early 90s
Historical highlights
Exact DP, optimal control (Bellman, Shannon, 1950s ...)
First impressive successes: Backgammon programs (Tesauro, 1992, 1996)
Algorithmic progress, analysis, applications, first books (mid 90s ...)
Machine Learning, BIG Data, Robotics, Deep Neural Networks (mid 2000s ...)
Bertsekas (M.I.T.) Reinforcement Learning 2 / 36
Approximate DP/RL Methodology is now Ambitious and Universal
Exact DP applies (in principle) to a very broad range of optimization problems
Deterministic <—-> Stochastic
Combinatorial optimization <—-> Optimal control w/ infinite state/control spaces
One decision maker <—-> Two player games
... BUT is plagued by the curse of dimensionality and need for a math model
Approximate DP/RL overcomes the difficulties of exact DP by:
Approximation (use neural nets and other architectures to reduce dimension)
Simulation (use a computer model in place of a math model)
State of the art:
Broadly applicable methodology: Can address broad range of challenging
problems. Deterministic-stochastic-dynamic, discrete-continuous, games, etc
There are no methods that are guaranteed to work for all or even most problems
There are enough methods to try with a reasonable chance of success for most
types of optimization problems
Role of the theory: Guide the art, delineate the sound ideas
Bertsekas (M.I.T.) Reinforcement Learning 4 / 36
Aims and References of this Talk
The purpose of this talk
To selectively review some of the methods, and bring out some of the AI-DP
connections.
To briefly describe a few recent ideas on aggregation.
References
Quite a few Exact DP books (1950s-present starting with Bellman). My latest book
“Abstract DP" came out a year ago: aims at algorithmic unification through an
operator formalism.
Quite a few DP/Approximate DP/RL/Neural Nets books (1996-Present)
I
Bertsekas and Tsitsiklis, Neuro-Dynamic Programming, 1996
I
Sutton and Barto, 1998, Reinforcement Learning (new edition 2018)
I
NEW BOOK: Bertsekas, Reinforcement Learning and Optimal Control, 2019, (to
appear). Draft, slides, and videolectures from ASU course at
http://web.mit.edu/dimitrib/www/RLbook.html
I
Aims for a coherent synthesis that spans the spectrum of common RL/OC ideas (with
some new research here and there)
Many books and surveys on all aspects of the subject; Tesauro’s papers on
computer backgammon; Silver, et al., papers on AlphaZero
Bertsekas (M.I.T.) Reinforcement Learning 5 / 36
Outline
Approximation in Value and Policy Space
General Issues of Approximation in Value Space
Problem Approximation
Rollout and Model Predictive Control
Parametric Approximation - Neural Networks
Aggregation Frameworks
Bertsekas (M.I.T.) Reinforcement Learning 7 / 36
Finite Horizon Problem - Exact DP
System
x
k+
= f
k
(x
k
, u
k
, w
k
u
k
k
(x
k
x
k
w
k
k
System
x
k+ 1
= f
k
(x
k
, u
k
, w
k
), k = 0 , 1 ,... , N − 1
where x
k
: State, u
k
: Control, w
k
: Random disturbance
Cost function:
E
g
N
(x
N
N− 1
k= 0
g
k
(x
k
, u
k
, w
k
Perfect state information: u
k
is applied with (exact) knowledge of x
k
Optimization over feedback policies {μ
N− 1
}: Rules that specify the control
k
(x
k
) to apply at each possible state x
k
that can occur
Bertsekas (M.I.T.) Reinforcement Learning 9 / 36
Approximation in Value Space
min
u k ,μ k+ ,...,μ k+ℓ− 1
E
{ g
k
(x
k
, u
k
, w
k
k+ℓ− 1
m=k+
g
k
(
x
m
m
(x
m
First ℓ Steps “Future”
Nonlinear Ay(x) + b φ
(x, v) φ
(x, v) φ
m
(x, v) r x In
Selective Depth Lookahead Tree σ(ξ) ξ 1 0 -1 Encod Linear Layer Parameter v = (A, b) Sigmoidal Layer L Cost Approximation r
φ(x, v)
Feature Extraction Features: Material Balance, u
k
=
Mobility, Safety, etc Weighting of Features Score Po States x
k+
States x
k+
State x
k
Feature Vector φ
k
(x
k
) Approximator r
k
k
(
x
x
k
i
m− 1
i
m
... (0, 0) (N, −N ) (N, 0)
¯ i (N, N ) −N N i s i
i
m− 1
i
m
... (0, 0) (N, −N ) (N, 0)
¯ i (N, N ) −N 0 i Approximations: Computation of ˜ J
k+ℓ
:
DP minimization Replace E{·} with nominal values (certainty equivalent control) Limited simulation (Monte Carlo tree search) Simple choices Parametric approximation Problem approximati Rollout min
u k ,μ k+ ,...,μ k+ℓ− 1
E
{ g
k
(x
k
, u
k
, w
k
k+ℓ− 1
m=k+
g
k
(
x
m
m
(x
m
), w
m
)
˜ J
k
First ℓ Steps “Future”
Nonlinear Ay(x) + b φ
(x, v) φ
(x, v) φ
m
(x, v) r x Initial
Selective Depth Lookahead Tree σ(ξ) ξ 1 0 -1 Encoding y(x) Linear Layer Parameter v = (A, b) Sigmoidal Layer Linear Weig min u
k
k+
k+ℓ− 1
E g
k (x k , u k , w k ) + ∑ m=k+ g k ( x m , μ m (x m ), w m )
˜ J k+ℓ (x k+ℓ ) First ℓ Steps “Future” First Step Nonlinear Ay(x) + b φ 1 (x, v) φ 2 (x, v) φ m (x, v) r x Initial Selective Depth Lookahead Tree σ(ξ) ξ 1 0 -1 Encoding y(x) Linear Layer Parameter v = (A, b) Sigmoidal Layer Linear Weighting Cost Approximation r ′ φ(x, v) Feature Extraction Features: Material Balance, u k = μ d k ( x k (I k ) ) Mobility, Safety, etc Weighting of Features Score Position Evaluator States x k+ States x k+ State x k Feature Vector φ k (x k ) Approximator r ′ k φ k (x k ) x 0 x k i m− 1 i m ... (0, 0) (N, −N ) (N, 0) ¯ i (N, N ) −N 0 g(i) ¯ I N − 2 N i ¯ ¯ Approximations: Computation of ˜ J
k+ℓ
: (Could be approximate)
DP minimization Replace E{·} with nominal values (certainty equivalent control) Computation of ˜ J
k+
:
Limited simulation (Monte Carlo tree search) Simple choices Parametric approximation Problem approximation Rollout min
u k
E
{ g
k
(x
k
, u
k
, w
k
) +
˜ J
k+
(x
k+
)
} min
u k ,μ k+ ,...,μ k+ℓ− 1
E
{ g
k
(x
k
, u
k
, w
k
k+ℓ− 1
m=k+
g
k
(
x
m
m
(x
m
), w
m
)
˜ J
k+ℓ
(x
k+ℓ
)
} First ℓ Steps “Future” First Step Nonlinear Ay(x) + b φ
(x, v) φ
(x, v) φ
m
(x, v) r x Initial
Selective Depth Lookahead Tree σ(ξ) ξ 1 0 -1 Encoding y(x) Linear Layer Parameter v = (A, b) Sigmoidal Layer Linear Weighting s t ¯ j
¯
j
¯
j
`
¯
j
` 1
¯
j
Nodes j 2 A(
¯ j
`
) Path P
j
, Length L
j
· · ·
Aggregation Is d
i
+ a
ij
< UPPER h
j
j
f
= 1 if j 2 I ¯
f
x
a 0 1 2 t b C Destination
J(x
k
)! 0 for all p-stable ⇡ from x
with x
2 X
within W
p
Prob. u Prob. 1 u Cost 1 Cost 1
p u J(1) = min s t ¯ j
¯
j
¯
j
`
¯
j
` 1
¯
j
Nodes j 2 A(
¯ j
`
) Path P
j
, Length L
j
· · ·
Aggregation Adaptive simulation Monte-Carlo Tree Search Is d
i
+ a
ij
< UPPER h
j
j
f
= 1 if j 2 I ¯
f
x
a 0 1 2 t b C Destination
J(x
k
)! 0 for all p-stable ⇡ from x
with x
2 X and ⇡ 2 P
p,x 0
W
p
+ = {J 2 J | J
J} W
p
hin W
p
Prob. u Prob. 1 u Cost 1 Cost 1
p u J(1) = min c, a + J(2) J(2) = b + J(1) J
J J 0 J 00 J 0 J 1 J 2 J 3 J 0
b
k
b
k
Permanent trajectory P
k
Tentative trajectory T
k
Approximate Min Approximate E{·} Computation of
˜ J
k+
Optimal control sequence {u
,... , u
k
,... , u
∗
N − 1
}
Tail subproblem Time x
k
Future Stages Terminal Cost k N
Stage k Future Stages Terminal Cost g
N
(x
N
)
Control u
k
Cost g
k
(x
k
, u
k
) x
x
k
x
k+
x
N
x
N
x
′
N
˜u
k
u
k
˜x
k+
x
k+
x˜
N
x
N
x
′
N
Φr = Π
( T
(λ) μ
(Φr)
) Π(J
μ
) μ(i) ∈ arg min
u∈U(i)
˜
Q
μ
(i, u, r)
Subspace M = {Φr | r ∈ ℜ
m
} Based on
˜ J
μ
(i, r) J
μ k
min
u∈U(i)
n j=
p
ij
(u)
( g(i, u, j) + ˜ J(j) ) Computation of ˜ J: Good approximation Poor Approximation σ(ξ) = ln(1 + e
ξ
)
max{ 0 , ξ} ˜ J(x) Cost 0 Cost g(i, u, j) Monte Carlo tree search First Step “Future” Feature Extraction Node Subset S
S
N
Aggr. States Stage 1 Stage 2 Stage 3 Stage N − 1
Candidate (m+2)-Solutions (˜u
,... , ˜u
m
, u
m+
, u
m+
) (m+2)-Solution
Set of States (u
) Set of States (u
, u
) Set of States (u
, u
, u
)
Run the Heuristics From Each Candidate (m+2)-Solution (˜u ,... , ˜u , u ) b
k
Permanent trajectory P
k
Tentative trajectory T
k
roximate Min Approximate E{·} Computation of
˜ J
k+
imal control sequence {u
,... , u
k
,... , u
∗
N − 1
}
l subproblem Time x
k
Future Stages Terminal Cost k N
ge k Future Stages Terminal Cost g
N
(x
N
)
trol u
k
Cost g
k
(x
k
, u
k
) x
x
k
x
k+
x
N
x
N
x
′
N
u
k
˜x
k+
x
k+
x˜
N
x
N
x
′
N
= Π
( T
(λ) μ
(Φr)
) Π(J
μ
) μ(i) ∈ arg min
u∈U(i)
˜
Q
μ
(i, u, r)
space M = {Φr | r ∈ ℜ
m
} Based on
˜ J
μ
(i, r) J
μ k u∈U(i)
n j=
p
ij
(u)
( g(i, u, j) + ˜ J(j) ) Computation of ˜ J: od approximation Poor Approximation σ(ξ) = ln(1 + e
ξ
)
{ 0 , ξ} ˜ J(x) t 0 Cost g(i, u, j) Monte Carlo tree search First Step “Future” xtraction
b
+
k
b
−
k
Permanent trajectory P
k
Tentative trajectory T
k
min
u
k
E
{ g
k
(x
k
, u
k
, w
k
)+
˜ J
k+
(x
k+
)
} Approximate Min Approximate E{·} Computation of ˜ J
k+
Optimal control sequence {u
,... , u
∗
k
,... , u
∗
N − 1
}
Tail subproblem Time x
∗
k
Future Stages Terminal Cost k N
Stage k Future Stages Terminal Cost g
N
(x
N
)
Control u
k
Cost g
k
(x
k
, u
k
) x
x
k
x
k+
x
N
x
N
x
′
N
u ˜
k
u
k
x˜
k+
x
k+
˜x
N
x
N
x
′
N
Φr = Π
( T
(Φr)
) Π(J
) μ(i) ∈ arg min
u∈U(i)
˜
Q
(i, u, r)
Subspace M = {Φr | r ∈ ℜ
m
} Based on
˜ J
(i, r) J
k
min
u∈U(i)
n
j=
p
ij
(u)
( g(i, u, j) + ˜ J(j) ) Computation of ˜ J: Good approximation Poor Approximation σ(ξ) = ln(1 + e
b
k
b
k
Permanent trajectory P
k
Tentative trajectory T
k
min
u k
E
{ g
k
(x
k
, u
k
, w
k
)+
˜ J
k+
(x
k+
)
} Approximate Min Approximate E{·} Approximate Cost-to-Go ˜ J
k+
Optimal control sequence {u
,... , u
k
,... , u
∗
N − 1
}
Tail subproblem Time x
k
Future Stages Terminal Cost k N
Stage k Future Stages Terminal Cost g
N
(x
N
)
Control u
k
Cost g
k
(x
k
, u
k
) x
x
k
x
k+
x
N
x
N
x
′
N
u ˜
k
u
k
x˜
k+
x
k+
˜x
N
x
N
x
′
N
Φr = Π
( T
(λ) μ
(Φr)
) Π(J
μ
) μ(i) ∈ arg min
u∈U(i)
˜
Q
μ
(i, u, r)
Subspace M = {Φr | r ∈ ℜ
m
} Based on
˜ J
μ
(i, r) J
μ k
min
u∈U(i)
n j=
p
ij
(u)
( g(i, u, j) + ˜ J(j) ) Computation of ˜ J: Good approximation Poor Approximation σ(ξ) = ln(1 + e
ξ
)
max{ 0 , ξ} ˜ J(x) Cost 0 Cost g(i, u, j) Monte Carlo tree search First Step “Future” Feature Extraction Certainty equivalence Monte Carlo tree search b
k
b
k
Permanent trajectory P
k
Tentative trajectory T
k
min
u k
E
{ g
k
(x
k
, u
k
, w
k
)+
˜ J
k+
(x
k+
)
} Approximate Min Approximate E{·} Approximate Cost-to-Go ˜ J
k+
Optimal control sequence {u
,... , u
k
,... , u
∗
N − 1
} Simplify E{·}
Tail subproblem Time x
k
Future Stages Terminal Cost k N
Stage k Future Stages Terminal Cost g
N
(x
N
)
Control u
k
Cost g
k
(x
k
, u
k
) x
x
k
x
k+
x
N
x
N
x
′
N
u ˜
k
u
k
x˜
k+
x
k+
˜x
N
x
N
x
′
N
Φr = Π
( T
(λ) μ
(Φr)
) Π(J
μ
) μ(i) ∈ arg min
u∈U(i)
˜
Q
μ
(i, u, r)
m ˜ ty equivalence Monte Carlo tree search ermanent trajectory P
k
Tentative trajectory T
k
min
u k
E
{ g
k
(x
k
, u
k
, w
k
)+
˜ J
k+
(x
k+
)
} imate Min Approximate E{·} Approximate Cost-to-Go ˜ J
k+
l control sequence {u
,... , u
k
,... , u
∗
N − 1
} Simplify E{·}
problem Time x
k
Future Stages Terminal Cost k N
Future Stages Terminal Cost g
N
(x
N
)
u
k
Cost g
k
(x
k
, u
k
) x
x
k
x
k+
x
N
x
N
x
′
N
k+
x
k+
˜x
N
x
N
x
′
N
(λ)
)
Certainty equivalence Monte Carlo tree search Rollout, Model Predictive Control b
k
b
k
Permanent trajectory P
k
Tentative trajec
min
uk
E
{ g
k
(x
k
, u
k
, w
k
)+
˜ J
k+
(x
k+
)
} Approximate Min Approximate E{·} Approxima Optimal control sequence {u
,... , u
k
,... , u
∗
N −
Tail subproblem Time x
k
Future Stages Termina
Stage k Future Stages Terminal Cost g
N
(x
N
)
Control u
k
Cost g
k
(x
k
, u
k
) x
x
k
x
k+
x
N
x
N
x
˜u
k
u
k
x˜
k+
x
k+
˜x
N
x
N
x
′
N
Φr = Π
( T
(λ) μ
(Φr)
) Π(J
μ
) μ(i) ∈ arg min
u∈U(i)
˜
Q m ˜ Certainty equivalence Monte Carlo tree search Parametric approximation Neural nets Rollout, Model Predictive Control b
k
b
k
Permanent trajectory P
k
Tentative trajectory T
k
min
u k
E
{ g
k
(x
k
, u
k
, w
k
)+
˜ J
k+
(x
k+
)
} Approximate Min Approximate E{·} Approximate Cost-to-Go ˜ J
k+
Optimal control sequence {u
,... , u
k
,... , u
∗
N − 1
} Simplify E{·}
Tail subproblem Time x
k
Future Stages Terminal Cost k N
Stage k Future Stages Terminal Cost g
N
(x
N
)
Control u
k
Cost g
k
(x
k
, u
k
) x
x
k
x
k+
x
N
x
N
x
′
N ′
nte Carlo tree search
n Neural nets Discretization Control ry P
k
Tentative trajectory T
k
x
k
, u
k
, w
k
)+
˜ J
k+
(x
k+
)
} imate E{·} Approximate Cost-to-Go ˜ J
k+
{u
,... , u
k
,... , u
∗
N − 1
} Simplify E{·}
k
Future Stages Terminal Cost k N
minal Cost g
N
(x
N
k
) x
x
k
x
k+
x
N
x
N
x
′
N
x
′
N
) μ(i) ∈ arg min
u∈U(i)
˜
Q
μ
(i, u, r)
ℜ
m
} Based on
˜ J
μ
(i, r) J
μ k
(i, u, j) +
˜ J(j) ) Computation of ˜ J: oor Approximation σ(ξ) = ln(1 + e
ξ
)
ONE-STEP LOOKAHEAD min
u k ,μ k+ ,...,μ k+ℓ− 1
E
{ g
k
(x
k
, u
k
, w
k
k+ℓ− 1
m=k+
g
k
(
x
m
m
(x
m
), w
m
)
˜ J
k+ℓ
(x
k+ℓ
)
} Nonlinear Ay(x) + b φ 1 (x, v) φ 2 (x, v) φm(x, v) r x Initial Selective Depth Lookahead Tree σ(ξ) ξ 1 0 -1 Encoding y(x) min
u k ,μ k+ ,...,μ k+ℓ− 1
E
{ g
k
(x
k
, u
k
, w
k
k+ℓ− 1
m=k+
g
k
(
x
m
m
(x
m
), w
m
)
First ℓ Steps “Future” Nonlinear Ay(x) + b φ
1
(x, v) φ
2
(x, v) φ
m
(x, v) r x Initial
Selective Depth Lookahead Tree σ(ξ) ξ 1 0 -1 Encoding y(x Linear Layer Parameter v = (A, b) Sigmoidal Layer Linear W Cost Approximation r
′
φ(x, v)
Feature Extraction Features: Material Balance, u
k
d k
(
x
k
min
u k ,μ k+ ,...,μ k+ℓ− 1
E
{ g
k
(x
k
, u
k
, w
k
k+ℓ− 1
m=k+
g
k
First ℓ Steps “Future”
Nonlinear Ay(x) + b φ
1
(x, v) φ
2
(x, v) φ
m
Selective Depth Lookahead Tree σ(ξ) ξ 1
Linear Layer Parameter v = (A, b) Sigmo Cost Approximation r
′
φ(x, v)
Feature Extraction Features: Material B Approximations: Computation of ˜ J
k+ℓ
: (Could be approximate)
DP minimization Replace E{·} with nominal values (certainty equivalent control) Limited simulation (Monte Carlo tree search) Simple choices Parametric approximation Problem approximation Rollout u
k
u
k
u
k
u
k
u
k
Constraint Relaxation U U
U
At State x
k
min
u k ,μ k+ ,...,μ k+ℓ− 1
E
{ g
k
(x
k
, u
k
, w
k
k+ℓ− 1
m=k+
g
k
(
xm, μm(xm), wm )
˜ J
k+ℓ
(x
k+ℓ
)
Subspace S = {Φr | r ∈ ℜ
s
} x
x˜
l problem approximation u
k
u
k
u
k
u
k
u
k
Constraint Relaxation U U
U
tate x
k
Current state x
... MCTS Lookahead Minimization Cost-to-go Approximation
pty schedule LOOKAHEAD MINIMIZATION ROLLOUT States x
k+
Tail problem approximation u
k
u
k
u
k
u
k
u
k
Constraint Relaxation U U
U
At State x
k
Current state x
... MCTS Lookahead Minimization Cost-to-go Approximatio
Empty schedule LOOKAHEAD MINIMIZATION ROLLOUT States x
k+
approximation u
k
u
k
u
k
u
k
u
k
Constraint Relaxation U U
U
k
Current state x
... MCTS Lookahead Minimization Cost-to-go Approximation
ule LOOKAHEAD MINIMIZATION ROLLOUT States x
k+
MULTISTEP LOOKAHEAD
Bertsekas (M.I.T.) Reinforcement Learning 11 / 36
On-Line and Off-Line Lookahead Implementations
min
u k
,μ k+
,...,μ k+ℓ− 1
E
g
k
(x
k
, u
k
, w
k
k+ℓ− 1
m=k+
g
k
x
m
m
(x
m
), w
First ℓ Steps “Future”
Nonlinear Ay(x) + b φ
(x, v) φ
(x, v) φ
m
(x, v) r x Initi
Selective Depth Lookahead Tree σ(ξ) ξ 1 0 -1 Encoding
Linear Layer Parameter v = (A, b) Sigmoidal Layer Line
Cost Approximation r
φ(x, v)
Feature Extraction Features: Material Balance, u
k
Mobility, Safety, etc Weighting of Features Score Positi
States x
k+
States x
k+
State x
k
Feature Vector φ
k
(x
k
) Approximator r
k
k
(x
k
x
x
k
i
m− 1
i
m
... (0, 0) (N, −N ) (N, 0)
i (N, N ) −N 0
N i
s i
i
m− 1
i
m
... (0, 0) (N, −N ) (N, 0)
i (N, N ) −N 0 g(
i
Approximations: Computation of
J
k+ℓ
DP minimization Replace E{·} with nominal values
(certainty equivalent control)
Limited simulation (Monte Carlo tree search)
Simple choices Parametric approximation Problem approximation
Rollout
min
u k
,μ k+
,...,μ k+ℓ− 1
E
g
k
(x
k
, u
k
, w
k
k+ℓ− 1
m=k+
g
k
x
m
m
(x
m
), w
m
J
k+ℓ
First ℓ Steps “Future”
Nonlinear Ay(x) + b φ
(x, v) φ
(x, v) φ
m
(x, v) r x Initial
Selective Depth Lookahead Tree σ(ξ) ξ 1 0 -1 Encoding y(x)
Linear Layer Parameter v = (A, b) Sigmoidal Layer Linear Weightin
Cost Approximation r
φ(x, v)
min
u k
,μ k+
,...,μ k+ℓ− 1
E g
k
(x
k
, u
k
, w
k
m=k+
g
k
x
m
m
(x
m
), w
m
J
k+ℓ
(x
k+ℓ
First ℓ Steps “Future” First Step
Nonlinear Ay(x) + b φ
(x, v) φ
(x, v) φ
m
(x, v) r x Initial
Selective Depth Lookahead Tree σ(ξ) ξ 1 0 -1 Encoding y(x)
Linear Layer Parameter v = (A, b) Sigmoidal Layer Linear Weighting
Cost Approximation r
φ(x, v)
Feature Extraction Features: Material Balance, u
k
d
k
x
k
(I
k
Mobility, Safety, etc Weighting of Features Score Position Evaluator
States x
k+
States x
k+
State x
k
Feature Vector φ
k
(x
k
) Approximator r
k
k
(x
k
x
x
k
i
m− 1
i
m
... (0, 0) (N, −N ) (N, 0)
i (N, N ) −N 0 g(i)
I N − 2
N i
s i
i
m− 1
i
m
... (0, 0) (N, −N ) (N, 0)
i (N, N ) −N 0 g(i)
I N − 2 N
i
Approximations: Computation of
J
k+ℓ
: (Could be approximate)
DP minimization Replace E{·} with nominal values
(certainty equivalent control) Computation of
J
k+
Limited simulation (Monte Carlo tree search)
Simple choices Parametric approximation Problem approximation
Rollout
min
u k
E
g
k
(x
k
, u
k
, w
k
J
k+
(x
k+
min
u k
,μ k+
,...,μ k+ℓ− 1
E
g
k
(x
k
, u
k
, w
k
k+ℓ− 1
m=k+
g
k
x
m
m
(x
m
), w
m
J
k+ℓ
(x
k+ℓ
First ℓ Steps “Future” First Step
Nonlinear Ay(x) + b φ
(x, v) φ
(x, v) φ
m
(x, v) r x Initial
Selective Depth Lookahead Tree σ(ξ) ξ 1 0 -1 Encoding y(x)
Linear Layer Parameter v = (A, b) Sigmoidal Layer Linear Weighting
Cost Approximation r
φ(x, v)
s t
j
j
j
`
j
` 1
j
Nodes j 2 A(
j
`
) Path P
j
, Length L
j
Aggregation
Is d
i
+ a
ij
< UPPER h
j
j
f
= 1 if j 2 I ¯
f
x
a 0 1 2 t b C Destination
J(x
k
)! 0 for all p-stable ⇡ from x
with x
2 X a
within W
p
Prob. u Prob. 1 u Cost 1 Cost 1
p
u
J(1) = min
c, a
J(2) = b +
s t
j
j
j
`
j
` 1
j
Nodes j 2 A(
j
`
) Path P
j
, Length L
j
Aggregation Adaptive simulation Monte-Carlo Tree Search
Is d
i
+ a
ij
< UPPER h
j
j
f
= 1 if j 2 I ¯
f
x
a 0 1 2 t b C Destination
J(x
k
)! 0 for all p-stable ⇡ from x
with x
2 X and ⇡ 2 P
p,x 0
W
p
+ = {J 2 J | J
J} W
p
ithin W
p
Prob. u Prob. 1 u Cost 1 Cost 1
p
u
J(1) = min
c, a + J(2)
J(2) = b + J(1)
J
J
μ
J
μ
0
J
μ
00
J
μ
0 J
μ
1 J
μ
2 J
μ
3 J
μ 0
b
k
b
k
Permanent trajectory P
k
Tentative trajectory T
k
Approximate Min Approximate E{·} Computation of
J
k+
Optimal control sequence {u
,... , u
k
,... , u
N − 1
Tail subproblem Time x
k
Future Stages Terminal Cost k N
Stage k Future Stages Terminal Cost g
N
(x
N
Control u
k
Cost g
k
(x
k
, u
k
) x
x
k
x
k+
x
N
x
N
x
N
˜u
k
u
k
x˜
k+
x
k+
x˜
N
x
N
x
N
Φr = Π
T
(λ)
μ
(Φr)
Π(J
μ
) μ(i) ∈ arg min
u∈U(i)
Q
μ
(i, u, r)
Subspace M = {Φr | r ∈ ℜ
m
} Based on
J
μ
(i, r) J
μ
k
min
u∈U(i)
n
j=
p
ij
(u)
g(i, u, j) +
J(j)
Computation of
J:
Good approximation Poor Approximation σ(ξ) = ln(1 + e
ξ
max{ 0 , ξ}
J(x)
Cost 0 Cost g(i, u, j) Monte Carlo tree search First Step “Future”
Feature Extraction
Node Subset S
S
N
Aggr. States Stage 1 Stage 2 Stage 3 Stage N − 1
Candidate (m+2)-Solutions (˜u
,... , u˜
m
, u
m+
, u
m+
) (m+2)-Solution
Set of States (u
) Set of States (u
, u
) Set of States (u
, u
, u
Run the Heuristics From Each Candidate (m+2)-Solution (˜u
,... , u˜
m
, u
m+
Set of States (˜u
) Set of States (˜u
, u˜
) Neural Network
k
b
k
Permanent trajectory P
k
Tentative trajectory T
k
pproximate Min Approximate E{·} Computation of
J
k+
ptimal control sequence {u
,... , u
k
,... , u
N − 1
ail subproblem Time x
k
Future Stages Terminal Cost k N
tage k Future Stages Terminal Cost g
N
(x
N
ontrol u
k
Cost g
k
(x
k
, u
k
) x
x
k
x
k+
x
N
x
N
x
N
k
u
k
x˜
k+
x
k+
x˜
N
x
N
x
N
r = Π
T
(λ)
μ
(Φr)
Π(J
μ
) μ(i) ∈ arg min
u∈U(i)
Q
μ
(i, u, r)
ubspace M = {Φr | r ∈ ℜ
m
} Based on
J
μ
(i, r) J
μ
k
in
u∈U(i)
n
j=
p
ij
(u)
g(i, u, j) +
J(j)
Computation of
J:
ood approximation Poor Approximation σ(ξ) = ln(1 + e
ξ
ax{ 0 , ξ}
J(x)
ost 0 Cost g(i, u, j) Monte Carlo tree search First Step “Future”
e Extraction
ode Subset S
S
N
Aggr. States Stage 1 Stage 2 Stage 3 Stage N − 1
b
k
b
k
Permanent trajectory P
k
Tentative trajectory T
k
min
u
k
E
g
k
(x
k
, u
k
, w
k
J
k+
(x
k+
Approximate Min Approximate E{·} Computation of
J
k+
Optimal control sequence {u
,... , u
k
,... , u
N − 1
Tail subproblem Time x
k
Future Stages Terminal Cost k N
Stage k Future Stages Terminal Cost g
N
(x
N
Control u
k
Cost g
k
(x
k
, u
k
) x
x
k
x
k+
x
N
x
N
x
N
˜u
k
u
k
x˜
k+
x
k+
x˜
N
x
N
x
N
Φr = Π
T
(Φr)
Π(J
) μ(i) ∈ arg min
u∈U(i)
Q
(i, u, r)
Subspace M = {Φr | r ∈ ℜ
m
} Based on
J
(i, r) J
k
min
u∈U(i)
n
j=
p
ij
(u)
g(i, u, j) +
J(j)
Computation of
J:
Good approximation Poor Approximation σ(ξ) = ln(1 + e
max{ 0 , ξ}
J(x)
b
k
b
k
Permanent trajectory P
k
Tentative trajectory T
k
min
u k
E
g
k
(x
k
, u
k
, w
k
J
k+
(x
k+
Approximate Min Approximate E{·} Approximate Cost-to-Go
J
k+
Optimal control sequence {u
,... , u
k
,... , u
N − 1
Tail subproblem Time x
k
Future Stages Terminal Cost k N
Stage k Future Stages Terminal Cost g
N
(x
N
Control u
k
Cost g
k
(x
k
, u
k
) x
x
k
x
k+
x
N
x
N
x
N
u ˜
k
u
k
˜x
k+
x
k+
˜x
N
x
N
x
N
Φr = Π
T
(λ)
μ
(Φr)
Π(J
μ
) μ(i) ∈ arg min
u∈U(i)
Q
μ
(i, u, r)
Subspace M = {Φr | r ∈ ℜ
m
} Based on
J
μ
(i, r) J
μ
k
min
u∈U(i)
n
j=
p
ij
(u)
g(i, u, j) +
J(j)
Computation of
J:
Good approximation Poor Approximation σ(ξ) = ln(1 + e
ξ
max{ 0 , ξ}
J(x)
Cost 0 Cost g(i, u, j) Monte Carlo tree search First Step “Future”
Feature Extraction
Node Subset S
S
N
Aggr. States Stage 1 Stage 2 Stage 3 Stage N − 1
Certainty equivalence Monte Carlo tree search
b
k
b
k
Permanent trajectory P
k
Tentative trajectory T
k
min
u k
E
g
k
(x
k
, u
k
, w
k
J
k+
(x
k+
Approximate Min Approximate E{·} Approximate Cost-to-Go
J
k+
Optimal control sequence {u
,... , u
k
,... , u
N − 1
} Simplify E{·}
Tail subproblem Time x
k
Future Stages Terminal Cost k N
Stage k Future Stages Terminal Cost g
N
(x
N
Control u
k
Cost g
k
(x
k
, u
k
) x
x
k
x
k+
x
N
x
N
x
N
u ˜
k
u
k
x˜
k+
x
k+
x˜
N
x
N
x
N
Φr = Π
T
(λ)
μ
(Φr)
Π(J
μ
) μ(i) ∈ arg min
u∈U(i)
Q
μ
(i, u, r)
Subspace M = {Φr | r ∈ ℜ
m
} Based on
J
μ
(i, r) J
μ
k
min
u∈U(i)
n
p
ij
(u)
g(i, u, j) +
J(j)
Computation of
J:
ainty equivalence Monte Carlo tree search
k
Permanent trajectory P
k
Tentative trajectory T
k
min
u k
E
g
k
(x
k
, u
k
, w
k
J
k+
(x
k+
roximate Min Approximate E{·} Approximate Cost-to-Go
J
k+
mal control sequence {u
,... , u
k
,... , u
N − 1
} Simplify E{·}
ubproblem Time x
k
Future Stages Terminal Cost k N
e k Future Stages Terminal Cost g
N
(x
N
rol u
k
Cost g
k
(x
k
, u
k
) x
x
k
x
k+
x
N
x
N
x
N
k
˜x
k+
x
k+
˜x
N
x
N
x
N
T
(λ)
μ
(Φr)
Π(J
μ
) μ(i) ∈ arg min
u∈U(i)
Q
μ
(i, u, r)
m ˜
Certainty equivalence Monte Carlo tree search
Rollout, Model Predictive Control
b
k
b
k
Permanent trajectory P
k
Tentative trajector
min
u k
E
g
k
(x
k
, u
k
, w
k
J
k+
(x
k+
Approximate Min Approximate E{·} Approximate
Optimal control sequence {u
,... , u
k
,... , u
N − 1
Tail subproblem Time x
k
Future Stages Terminal C
Stage k Future Stages Terminal Cost g
N
(x
N
Control u
k
Cost g
k
(x
k
, u
k
) x
x
k
x
k+
x
N
x
N
x
N
˜u
k
u
k
x˜
k+
x
k+
x˜
N
x
N
x
N
Φr = Π
T
(λ)
μ
(Φr)
Π(J
μ
) μ(i) ∈ arg min
u∈U(i)
Q
μ
(i
Subspace M = {Φr | r ∈ ℜ
m
} Based on
J
μ
(i, r) J
μ
min
u∈U(i)
n
p
ij
(u)
g(i, u, j) +
J(j)
Computat
Certainty equivalence Monte Carlo tree search
Parametric approximation Neural nets
Rollout, Model Predictive Control
b
k
b
k
Permanent trajectory P
k
Tentative trajectory T
k
min
u k
E
g
k
(x
k
, u
k
, w
k
J
k+
(x
k+
Approximate Min Approximate E{·} Approximate Cost-to-Go
J
k+
Optimal control sequence {u
,... , u
k
,... , u
N − 1
} Simplify E{·}
Tail subproblem Time x
k
Future Stages Terminal Cost k N
Stage k Future Stages Terminal Cost g
N
(x
N
Control u
k
Cost g
k
(x
k
, u
k
) x
x
k
x
k+
x
N
x
N
x
N
u ˜
k
u
k
˜x
k+
x
k+
˜x
N
x
N
x
N
Φr = Π
T
(λ)
(Φr)
Π(J ) μ(i) ∈ arg min
Q (i, u, r)
onte Carlo tree search
tion Neural nets Discretization
ive Control
ctory P
k
Tentative trajectory T
k
k
(x
k
, u
k
, w
k
J
k+
(x
k+
roximate E{·} Approximate Cost-to-Go
J
k+
ce {u
,... , u
k
,... , u
N − 1
} Simplify E{·}
x
k
Future Stages Terminal Cost k N
Terminal Cost g
N
(x
N
k
, u
k
) x
x
k
x
k+
x
N
x
N
x
N
N
x
N
J
μ
) μ(i) ∈ arg min
u∈U(i)
Q
μ
(i, u, r)
r ∈ ℜ
m
} Based on
J
μ
(i, r) J
μ
k
g(i, u, j) +
J(j)
Computation of
J:
n Poor Approximation σ(ξ) = ln(1 + e
ξ
Monte Carlo tree search First Step “Future”
Off-line methods: All the functions
J
k+ 1
are computed for every k, before the
control process begins.
Examples of off-line methods: Neural network and other parametric
approximations; also aggregation.
On-line methods: The values
J
k+ 1
(x
k+ 1
) are computed only at the relevant next
states x
k+ 1
, and are used to compute the control to be applied at the N time steps.
Examples of on-line methods: Rollout and model predictive control.
On-line methods are well-suited for on-line replanning.
The minimizing controls μ˜
k
(x
k
) are computed on-line for many-state problems
(because of the storage issue, as well as an off-line excessive computation issue).
Bertsekas (M.I.T.) Reinforcement Learning 13 / 36
Approximation in Policy Space: A Major Alternative
System
Environment
Cost
Uncertainty
Control
Controller
Current State
I u = ˜μ(I, r) ˜μ(·, r)
Corrected
J
J J
Cost
J
μ
F (i), r
of i ⇡ J
μ
(i) J
μ
(i) Feature Map
J
μ
F (i), r
: Feature-based parametric architecture State
r: Vector of weights Original States Aggregate States
Position “value” Move “probabilities” Simplify E{·}
Choose the Aggregation and Disaggregation Probabilities
Use a Neural Network or Other Scheme Form the Aggregate States
I
I
q
Use a Neural Scheme or Other Scheme
Possibly Include “Handcrafted” Features
Generate Features F (i) of Formulate Aggregate Problem
Generate “Impoved” Policy ˆμ by “Solving” the Aggregate Problem
Same algorithm learned multiple games (Go, Shogi)
i u = ˜μ(i, r) ˜μ(·, r)
Corrected
J
J J
Cost
J
μ
F (i), r
of i ⇡ J
μ
(i) J
μ
(i) Feature Map
J
μ
F (i), r
: Feature-based parametric architecture State
r: Vector of weights Original States Aggregate States
Position “value” Move “probabilities” Simplify E{·}
Choose the Aggregation and Disaggregation Probabilities
Use a Neural Network or Other Scheme Form the Aggregate States
I
I
q
Use a Neural Scheme or Other Scheme
Possibly Include “Handcrafted” Features
Generate Features F (i) of Formulate Aggregate Problem
Generate “Impoved” Policy ˆμ by “Solving” the Aggregate Problem
Same algorithm learned multiple games (Go, Shogi)
Aggregate costs r
`
Cost function
J
(i) Cost function
J
(j)
Approximation in a space of basis functions Plays much better than
all chess programs
Cost ↵
k
g(i, u, j) Transition probabilities p
ij
(u) W
p
i u = ˜μ(i, r) ˜μ(·, r)
Corrected
J
J J
Cost
J
μ
F (i),
J
μ
F (i), r
: Feature-based param
r: Vector of weights Original Stat
Position “value” Move “probabili
Choose the Aggregation and Disa
Use a Neural Network or Other S
I
I
q
Use a Neural Scheme or Other Sc
Possibly Include “Handcrafted” F
Generate Features F (i) of Formu
Generate “Impoved” Policy ˆμ by
Same algorithm learned multiple
Aggregate costs r
`
Cost function
Approximation in a space of basi
Parametrize policies with a parameter vectors r. Each r defines a policy.
The idea is to optimize some measure of performance with respect to the r
k
Important advantage: On-line computation of controls is often easier.
Five contexts where approximation in policy space is helpful
Problems with natural policy parametrizations (like supply chain problems)
Approximation in policy space on top of approximation in value space (e.g., train in
value space, use a neural network to “learn" the lookahead policy).
Problems with natural value parametrizations, where policy training works well.
Learning from a software or human expert.
Unconventional information structures, e.g., multiagent systems with local info.
Bertsekas (M.I.T.) Reinforcement Learning 15 / 36
Problem Approximation: Simplify the Tail Problem and Solve it Exactly
min
u k ,μ k+ ,...,μ k+ℓ− 1
E g
k
(x
k
, u
k
, w
k
k+ℓ− 1
m=k+
g
k
(
x
m
m
(x
m
), w
m
)
First ℓ Steps “Future” Nonlinear Ay(x) + b φ
(x, v) φ
(x, v) φ
m
(x, v) r x Initial
Selective Depth Lookahead Tree σ(ξ) ξ 1 0 -1 Encoding y( Linear Layer Parameter v = (A, b) Sigmoidal Layer Linear Cost Approximation r
φ(x, v)
Feature Extraction Features: Material Balance, u
k
d k
(
x Mobility, Safety, etc Weighting of Features Score Position States x
k+
States x
k+
State x
k
Feature Vector φ
k
(x
k
) Approximator r
k
k
(x
k
)
x
x
k
i
m− 1
i
m
... (0, 0) (N, −N ) (N, 0)
¯ i (N, N ) −N 0 g(i N i s i
i
m− 1
i
m
... (0, 0) (N, −N ) (N, 0)
¯ i (N, N ) −N 0 g(i) I i u
k
u
k
u
k
u
k
Selective Depth Adaptive Simulation Tree Pro
Leafs of the Tree Approximations: Computation of ˜ J
k+ℓ
:
DP minimization Replace E{·} with nominal values (certainty equivalent control) Limited simulation (Monte Carlo tree search) Simple choices Parametric approximation Problem approximation Rollout min
u k ,μ k+ ,...,μ k+ℓ− 1
E
{ g
k
(x
k
, u
k
, w
k
k+ℓ− 1
m=k+
g
k
(
x
m
m
(x
m
), w
m
)
˜ J
k+ℓ
(x
k+
First ℓ Steps “Future”
Nonlinear Ay(x) + b φ
1
(x, v) φ
2
(x, v) φ
m
(x, v) r x Initial
Selective Depth Lookahead Tree σ(ξ) ξ 1 0 -1 Encoding y(x) Linear Layer Parameter v = (A, b) Sigmoidal Layer Linear Weighting Cost Approximation r
′
φ(x, v)
Feature Extraction Features: Material Balance, u
k
d k
(
x
k
(I
k
)
) min
u k ,μ k+ ,...,μ k+ℓ− 1
E g
k
(x
k
, u
k
, w
k
m=k+
g
k
x
m
m
(x
m
), w
m
+
˜ J
k+ℓ
(x
k+ℓ
)
First ℓ Steps “Future” First Step Nonlinear Ay(x) + b φ
(x, v) φ
(x, v) φ
m
(x, v) r x Initial
Selective Depth Lookahead Tree σ(ξ) ξ 1 0 -1 Encoding y(x) Linear Layer Parameter v = (A, b) Sigmoidal Layer Linear Weighting Cost Approximation r
φ(x, v)
Feature Extraction Features: Material Balance, u
k
d k
(
x
k
(I
k
)
) Mobility, Safety, etc Weighting of Features Score Position Evaluator States x
k+
States x
k+
State x
k
Feature Vector φ
k
(x
k
) Approximator r
k
k
(x
k
)
x
x
k
i
m− 1
i
m
... (0, 0) (N, −N ) (N, 0)
¯ i (N, N ) −N 0 g(i) ¯ I N − 2 N i s i
i
m− 1
i
m
... (0, 0) (N, −N ) (N, 0)
¯ i (N, N ) −N 0 g(i) ¯ I N − 2 N i u
k
u
k
u
k
u
k
Selective Depth Adaptive Simulation Tree Projections of
Approximations: Computation of J
k+ℓ
: (Could be approximate)
DP minimization Replace E{·} with nominal values (certainty equivalent control) Computation of ˜ J
k+
:
Limited simulation (Monte Carlo tree search) Simple choices Parametric approximation Problem approximation Rollout min
u k
E
{ g
k
(x
k
, u
k
, w
k
) +
˜ J
k+
(x
k+
)
} min
u k ,μ k+ ,...,μ k+ℓ− 1
E
{ g
k
(x
k
, u
k
, w
k
k+ℓ− 1
m=k+
g
k
(
x
m
m
(x
m
), w
m
)
˜ J
k+ℓ
(x
k+ℓ
)
} First ℓ Steps “Future” First Step Nonlinear Ay(x) + b φ
1
(x, v) φ
2
(x, v) φ
m
(x, v) r x Initial
Selective Depth Lookahead Tree σ(ξ) ξ 1 0 -1 Encoding y(x) Linear Layer Parameter v = (A, b) Sigmoidal Layer Linear Weighting Cost Approximation r
′
φ(x, v)
Feature Extraction Features: Material Balance, u
k
d k
(
x
k
(I
k
)
) s t ¯ j
1
¯
j
2
¯
j
`
¯
j
` 1
¯
j
1
Nodes j 2 A(
¯ j
`
) Path P
j
, Length L
j
· · ·
Aggregation Is d
i
+ a
ij
< UPPER h
j
j ¯ f
= 1 if j 2 I
¯ f
x
0
a 0 1 2 t b C Destination
J(x
k
)! 0 for all p-stable ⇡ from x
0
with x
0
2 X and
within W
p
Prob. u Prob. 1 u Cost 1 Cost 1
p u J(1) = min c, a + J(2) = b + J( J
⇤
J
μ
J
μ
0 J
μ
00 J
μ
0 J
μ
1 J
μ
2 J
μ
3 J
μ 0
s t
¯ j
1
¯
j
2
¯
j
`
¯
j
` 1
¯
j
1
Nodes j 2 A(
¯ j
`
) Path P
j
, Length L
j
· · ·
Aggregation Adaptive simulation Monte-Carlo Tree Search Is d
i
+ a
ij
< UPPER h
j
j ¯ f
= 1 if j 2 I ¯
f
x
0
a 0 1 2 t b C Destination
J(x
k
)! 0 for all p-stable ⇡ from x
0
with x
0
2 X and ⇡ 2 P
p,x 0
W
p
+ = {J 2 J | J
J} W
p
+ from
within W
p
Prob. u Prob. 1 u Cost 1 Cost 1
p u J(1) = min c, a + J(2) J(2) = b + J(1) J
⇤
J
μ
J
μ 0
J
μ 00
J
μ
0 J
μ
1 J
μ
2 J
μ
3 J
μ 0
f (x; ✓
k
) f (x; ✓
k+
) x
k
F (x
k
) F (x) x
k+
F (x
k+
) x
k+
x
⇤
= F (x
⇤
) F
μ k
(x) F
μ k+
(x)
b
k
b
− k
Permanent trajectory P
k
Tentative trajectory T
k
Approximate Min Approximate E{·} Computation of
˜ J
k+
Optimal control sequence {u
∗ 0
,... , u
∗ k
,... , u
∗ N − 1
}
Tail subproblem Time x
∗ k
Future Stages Terminal Cost k N
Stage k Future Stages Terminal Cost g
N
(x
N
)
Control u
k
Cost g
k
(x
k
, u
k
) x
0
x
k
x
k+
x
N
x
N
x
′ N
˜u
k
u
k
˜x
k+
x
k+
x˜
N
x
N
x
′ N
Φr = Π
( T
(λ) μ
(Φr)
) Π(J
μ
) μ(i) ∈ arg min
u∈U(i)
˜
Q
μ
(i, u, r)
Subspace M = {Φr | r ∈ ℜ
m
} Based on
˜ J
μ
(i, r) J
μ k
min
u∈U(i)
n j=
p
ij
(u)
( g(i, u, j) + ˜ J(j) ) Computation of ˜ J: Good approximation Poor Approximation σ(ξ) = ln(1 + e
ξ
)
max{ 0 , ξ} ˜ J(x) Cost 0 Cost g(i, u, j) Monte Carlo tree search First Step “Future” Feature Extraction Node Subset S 1 S
N
Aggr. States Stage 1 Stage 2 Stage 3 Stage N − 1
Candidate (m+2)-Solutions (˜u
1
,... , u˜
m
, u
m+
, u
m+
) (m+2)-Solution
Set of States (u
1
) Set of States (u
1
, u
2
) Set of States (u
1
, u
2
, u
3
)
Run the Heuristics From Each Candidate (m+2)-Solution (˜u
1
,... , u˜
m
, u
m+
)
Set of States (˜u
1
) Set of States (˜u
1
, u˜
2
) Neural Network
Set of States u = (u
1
,... , u
N
) Current m-Solution (˜u
1
,... , ˜u
m
)
b
k
b
− k
Permanent trajectory P
k
Tentative trajectory T
k
Approximate Min Approximate E{·} Computation of
˜ J
k+
Optimal control sequence {u
∗ 0
,... , u
∗ k
,... , u
∗ N − 1
}
Tail subproblem Time x
∗ k
Future Stages Terminal Cost k N
Stage k Future Stages Terminal Cost g
N
(x
N
)
Control u
k
Cost g
k
(x
k
, u
k
) x
0
x
k
x
k+
x
N
x
N
x
′ N
u ˜
k
u
k
x˜
k+
x
k+
˜x
N
x
N
x
′ N
Φr = Π
( T
(λ) μ
(Φr)
) Π(J
μ
) μ(i) ∈ arg min
u∈U(i)
˜
Q
μ
(i, u, r)
Subspace M = {Φr | r ∈ ℜ
m
} Based on
˜ J
μ
(i, r) J
μ k
min
u∈U(i)
n j=
p
ij
(u)
( g(i, u, j) + ˜ J(j) ) Computation of ˜ J: Good approximation Poor Approximation σ(ξ) = ln(1 + e
ξ
)
max{ 0 , ξ} ˜ J(x) Cost 0 Cost g(i, u, j) Monte Carlo tree search First Step “Future” ature Extraction Node Subset S
1
S
N
Aggr. States Stage 1 Stage 2 Stage 3 Stage N − 1
Candidate (m+2)-Solutions (˜u
1
,... , ˜u
m
, u
m+
, u
m+
) (m+2)-Solution
Set of States (u
1
) Set of States (u
1
, u
2
) Set of States (u
1
, u
2
, u
3
)
b
k b − k Permanent trajectory P k Tentative trajectory T k min u
k
E
{ g k (x k , u k , w k )+ ˜ J k+ (x k+ ) } Approximate Min Approximate E{·} Computation of ˜ J k+ Optimal control sequence {u ∗ 0 ,... , u ∗ k ,... , u ∗ N − 1 } Tail subproblem Time x ∗ k Future Stages Terminal Cost k N Stage k Future Stages Terminal Cost g N (x N ) Control u k Cost g k (x k , u k ) x 0 x k x k+ x N x N x ′ N u ˜ k u k x˜ k+ x k+ x˜ N x N x ′ N Φr = Π ( T (λ) μ (Φr) ) Π(J μ ) μ(i) ∈ arg min u∈U(i) ˜ Q μ (i, u, r) Subspace M = {Φr | r ∈ ℜ m } Based on ˜ J μ (i, r) J μ
k
min
u∈U(i) ∑ n j= p ij (u) ( g(i, u, j) + ˜ J(j) ) Computation of ˜ J: Good approximation Poor Approximation σ(ξ) = ln(1 + e ξ ) max{ 0 , ξ} ˜ J(x) Cost 0 Cost g(i, u, j) Monte Carlo tree search First Step “Future” b
k
b
− k
Permanent trajectory P
k
Tentative trajectory T
k
min
u k
E
{ g
k
(x
k
, u
k
, w
k
)+
˜ J
k+
(x
k+
)
} Approximate Min Approximate E{·} Approximate Cost-to-Go ˜ J
k+
Optimal control sequence {u
∗ 0
,... , u
∗ k
,... , u
∗ N − 1
}
Tail subproblem Time x
∗ k
Future Stages Terminal Cost k N
Stage k Future Stages Terminal Cost g
N
(x
N
)
Control u
k
Cost g
k
(x
k
, u
k
) x
0
x
k
x
k+
x
N
x
N
x
′ N
˜u
k
u
k
˜x
k+
x
k+
x˜
N
x
N
x
′ N
Φr = Π
( T
(λ) μ
(Φr)
) Π(J
μ
) μ(i) ∈ arg min
u∈U(i)
˜
Q
μ
(i, u, r)
Subspace M = {Φr | r ∈ ℜ
m
} Based on
˜ J
μ
(i, r) J
μ k
min
u∈U(i)
n j=
p
ij
(u)
( g(i, u, j) + ˜ J(j) ) Computation of ˜ J: Good approximation Poor Approximation σ(ξ) = ln(1 + e
ξ
)
max{ 0 , ξ} ˜ J(x) Cost 0 Cost g(i, u, j) Monte Carlo tree search First Step “Future” Feature Extraction Node Subset S
1
S
N
Aggr. States Stage 1 Stage 2 Stage 3 Stage N − 1
Candidate (m+2)-Solutions (˜u
1
,... , u˜
m
, u
m+
, u
m+
) (m+2)-Solution
Set of States (u 1 ) Set of States (u 1 , u 2 ) Set of States (u 1 , u 2 , u 3 ) Certainty equivalence Monte Carlo tree search b
k
b
− k
Permanent trajectory P
k
Tentative trajectory T
k
min
u k
E
{ g
k
(x
k
, u
k
, w
k
)+
˜ J
k+
(x
k+
)
} Approximate Min Approximate E{·} Approximate Cost-to-Go ˜ J
k+
Optimal control sequence {u
∗ 0
,... , u
∗ k
,... , u
∗ N − 1
} Simplify E{·}
Tail subproblem Time x
∗ k
Future Stages Terminal Cost k N
Stage k Future Stages Terminal Cost g
N
(x
N
)
Control u
k
Cost g
k
(x
k
, u
k
) x
0
x
k
x
k+
x
N
x
N
x
′ N
˜u
k
u
k
˜x
k+
x
k+
x˜
N
x
N
x
′ N
Φr = Π
( T
(λ) μ
(Φr)
) Π(J
μ
) μ(i) ∈ arg min
u∈U(i)
˜
Q
μ
(i, u, r)
Subspace M = {Φr | r ∈ ℜ
m
} Based on
˜ J
μ
(i, r) J
μ k
min
u∈U(i)
n j=
p
ij
(u)
( g(i, u, j) + ˜ J(j) ) Computation of ˜ J: Good approximation Poor Approximation σ(ξ) = ln(1 + e
ξ
)
Certainty equivalence Monte Carlo tree search b
k
b
− k
Permanent trajectory P
k
Tentative trajectory T
k
min
u k
E
{ g
k
(x
k
, u
k
, w
k
)+
˜ J
k+
(x
k+
)
} Approximate Min Approximate E{·} Approximate Cost-to-Go ˜ J
k+
Optimal control sequence {u
∗ 0
,... , u
∗ k
,... , u
∗ N − 1
} Simplify E{·}
Tail subproblem Time x
∗ k
Future Stages Terminal Cost k N
Stage k Future Stages Terminal Cost g
N
(x
N
)
Control u
k
Cost g
k
(x
k
, u
k
) x
0
x
k
x
k+
x
N
x
N
x
′ N
˜u
k
u
k
˜x
k+
x
k+
x˜
N
x
N
x
′ N
Φr = Π
( T
(λ) μ
(Φr)
) Π(J
μ
) μ(i) ∈ arg min
u∈U(i)
˜
Q
μ
(i, u, r)
Subspace M = {Φr | r ∈ ℜ
m
} Based on
˜ J
μ
(i, r) J
μ k
min
u∈U(i)
n j=
p
ij
(u)
( g(i, u, j) + ˜ J(j) ) Computation of ˜ J: Certainty equivalence Monte Carlo tree search Rollout, Model Predictive Control b
k
b
− k
Permanent trajectory P
k
Tentative trajectory T
min
u k
E
{ g
k
(x
k
, u
k
, w
k
)+
˜ J
k+
(x
k+
)
} Approximate Min Approximate E{·} Approximate Co Optimal control sequence {u
∗ 0
,... , u
∗ k
,... , u
∗ N − 1
} Sim
Tail subproblem Time x
∗ k
Future Stages Terminal Cost
Stage k Future Stages Terminal Cost g
N
(x
N
)
Control u
k
Cost g
k
(x
k
, u
k
) x
0
x
k
x
k+
x
N
x
N
x
′ N
˜u
k
u
k
˜x
k+
x
k+
x˜
N
x
N
x
′ N
Φr = Π
( T
(λ) μ
(Φr)
) Π(J
μ
) μ(i) ∈ arg min
u∈U(i)
˜
Q
μ
(i, u,
Subspace M = {Φr | r ∈ ℜ
m
} Based on
˜ J
μ
(i, r) J
μ k
min
u∈U(i)
n j=
p
ij
(u)
( g(i, u, j) + ˜ J(j) ) Computation Good approximation Poor Approximation σ(ξ) = Certainty equivalence Monte Carlo tree search Parametric approximation Neural nets Rollout, Model Predictive Control b
k
b
− k
Permanent trajectory P
k
Tentative trajectory T
k
min
u k
E
{ g
k
(x
k
, u
k
, w
k
)+
˜ J
k+
(x
k+
)
} Approximate Min Approximate E{·} Approximate Cost-to-Go ˜ J
k+
Optimal control sequence {u
∗ 0
,... , u
∗ k
,... , u
∗ N − 1
} Simplify E{·}
Tail subproblem Time x
∗ k
Future Stages Terminal Cost k N
Stage k Future Stages Terminal Cost g
N
(x
N
)
Control u
k
Cost g
k
(x
k
, u
k
) x
0
x
k
x
k+
x
N
x
N
x
′ N
˜u
k
u
k
˜x
k+
x
k+
x˜
N
x
N
x
′ N
Φr = Π
( T
(λ) μ
(Φr)
) Π(J
μ
) μ(i) ∈ arg min
u∈U(i)
˜
Q
μ
(i, u, r)
Subspace M = {Φr | r ∈ ℜ
m
} Based on
˜ J
μ
(i, r) J
μ k
Use as cost-to-go approximation
˜ J
k+ 1
the exact cost-to-go of a simpler problem
Many problem-dependent possibilities: Probabilistic approximation
I
Certainty equivalence: Replace stochastic quantities by deterministic ones (makes the
lookahead minimization deterministic)
I
Approximate expected values by limited simulation
Enforced decomposition of coupled subsystems
I
One-subsystem-at-a-time optimization
I
Constraint decomposition
I
Lagrangian relaxation
Aggregation: Group states together and view the groups as aggregate states
Bertsekas (M.I.T.) Reinforcement Learning 17 / 36
On-Line Rollout for Deterministic Infinite-Spaces Problems
Belief State p
k
Controller μ
k
Control u
k
k
(p
k
)...
x
x
x
k
x
N
u
k
x
k+
Initial State x
s Terminal State t Length = 1
x
a 0 1 2 t b C Destination
J(x
k
)! 0 for all p-stable ⇡ from x
with x
2 X and ⇡ 2 P
p,x 0
W
p
within W
p
Prob. u Prob. 1 u Cost 1 Cost 1
p u J(1) = min c, a + J(2) J(2) = b + J(1) J
J
μ
J
μ 0
J
μ 00
J
μ
0 J
μ
1 J
μ
2 J
μ
3 J
μ 0
f (x; ✓
k
) f (x; ✓
k+
) x
k
F (x
k
) F (x) x
k+
F (x
k+
) x
k+
x
= F (
Improper policy μ (N ) c(N − 1) k k + 1 m x
k+
= f
k
(x
k
, u
k
, w
k
) x
k
Observations
= μ
k
(p
k
)... Q-Factors Current State x
k
x
k+
h = 1
h x
∈ X and π ∈ P
p,x 0
W
p
+ = {J ∈ J | J
≤ J} W
p
+ from
min { c, a + J(2) } (2) = b + J(1) (k) c(k + 1) c(N − 1) Parking Spaces − 1) k k + 1 = f
k
(x
k
, u
k
, w
k
) x
k
Observations
... Q-Factors Current State x
k
and π ∈ P
p,x 0
W
p
+ = {J ∈ J | J
≤ J} W
p
+ from
, a + J(2) }
- J(1) ity Current Partial Tour Next Cities Next States t Neighbor Heuristic
) = min
uk+1∈Uk+1 (xk+1)
E
{ g
k+
(x
k+
, u
k+
, w
k+
)
˜ J
k+
(
f
k+
(x
k+
, u
k+
, w
k+
)
) } , Lookahead (onestep lookahead plus one step approx- ty equivalence Monte Carlo tree search Lookahead tree ℓ-Step problem x
k
x
k
States x
k+
States x
k+
u u
ted Rollout Terminal Cost Approximation
˜ J etric approximation Neural nets Discretization etric approximation Neural nets Discretization nction Approximation ˜ J
k+ℓ
, Model Predictive Control
Permanent trajectory P
k
Tentative trajectory T
k
Sample Q-Factors Simulation Control 1 States x
k+`
Complete Tours Current Partial Tour Next Cities Next States
Q
1 ,n
+ R
1 ,n
Q
2 ,n
+ R
2 ,n
Q
3 ,n
+ R
3 ,n
Simulation Nearest Neighbor Heuristic Move to the Right Possible
Path ˜ J
k+
(x
k+
) = min
u k+
2 U
k+ (x k+
E
n g
k+
(x
k+
, u
k+
, w
k+
)
˜ J
k+