Dynamic Programming & Markov Processes
Dynamic Programming & Markov Processes
RONALD A. HOWARD
Published jointly by
PREFACE
INTRODUCTION
CHAPTER 1 Markov Processes
The Toymaker Example—State Probabilities
The z-Transformation
z-Transform Analysis of Markov Processes
Transient, Multichain, and Periodic Behavior
CHAPTER 2 Markov Processes with Rewards
Solution by Recurrence Relation
The Toymaker Example
z-Transform Analysis of the Markov Process with Rewards
Asymptotic Behavior
CHAPTER 3 The Solution of the Sequential Decision Process by
Value Iteration 26
Introduction of Alternatives 26
The Toymaker’s Problem Solved by Value Iteration 28
Evaluation of the Value-Iteration Approach 30
CHAPTER 4 The Policy-Iteration Method for the Solution of Sequential
Decision Processes 32
The Value-Determination Operation 34
The Policy-Improvement Routine 37
The Iteration Cycle 38
The Toymaker’s Problem 39
A Proof of the Properties of the Policy-Iteration Method 42
vit
vite CONTENTS
CHAPTER 5 Use of the Policy-Iteration Method in Problems of
Taxicab Operation, Baseball, and Automobile Replace-
ment
An Example—Taxicab Operation 44
A Baseball Problem 49
The Replacement Problem 54
CHAPTER 6 The Policy-Iteration Method for Multiple-Chain Processes 60
The Value-Determination Operation 61
The Policy-Improvement Routine 63
A Multichain Example 65
Properties of the Iteration Cycle 69
CHAPTER 7 The Sequential Decision Process with Discounting 76
The Sequential Decision Process with Discounting Solved
by Value Iteration 79
The Value-Determination Operation 81
The Policy-Improvement Routine 83
An Example 84
Proof of the Properties of the Iteration Cycle 86
The Sensitivity of the Optimal Policy to the Discount
Factor 87
The Automobile Problem with Discounting 89
Summary 91
CHAPTER 8 The Continuous-Time Decision Process 92
The Continuous-Time Markov Process 92
The Solution of Continuous-Time Markov Processes by
Laplace Transformation 94
The Continuous-Time Markov Process with Rewards 99
The Continuous-Time Decision Problem 104
The Value-Determination Operation 106
The Policy-Improvement Routine 107
Completely Ergodic Processes 109
The Foreman’s Dilemma 111
Computational Considerations 112
The Continuous-Time Decision Process with Discounting 114
Policy Improvement 116
An Example 119
Comparison with Discrete-Time Case 120
CHAPTER 9 Conclusion 123
APPENDIX: The Relationship of Transient to Recurrent Behavior 127
REFERENCES 133
INDEX 135
Introduction
> py =1
j=1
where the probability that the system will remain in 7, pi, has been
included. Since the fi; are probabilities,
O< fy <1
P = [py] = F25 :
A corresponding transition diagram of the system showing the states
and transition probabilities in graphical form is
4
2
A 3
2 5
2
5
>ml (1.1)
m(l) = mR =(1 oF F
1
and
m1) =[2 3]
After one week, the toymakeris equally likely to be successful or un-
successful. After two weeks,
m(2) = n(1)P = [3 3] [F | —
and
m(2) =[z0 20
so that the toymakeris slightly more likely to be unsuccessful.
6 MARKOV PROCESSES
After three weeks, m(3) = 2(2)P = [#55 330], and the probability
of occupying each state is little changed from the values after two
weeks. Note that since
p3 — fe
g9 111
4
lil 139
250 2950
or absolute state probabilities. It follows from Eq. 1.3 that the vector
m™ must obey the equation
m= rP (1.5)
and, of course, the sum of the components of must be 1.
> mm = | (1.6)
We may use Eqs. 1.5 and 1.6 to find the limiting state probabilities
for any process. For the toymaker example, Eq. 1.5 yields
2
3
Tt2 = 41 + Bie
The z-Transformation
¢ f(1)
@ f(0)
f(2)
f(3)
0 1 2 3 n
Fig. 1.1. An arbitrary discrete-time function.
The relationship between /f(m) and its transform f(z) is unique; each
time function has only one transform, and the inverse transformation
of the transform will produce once more the original time function.
The z-transformation is useful in Markov processes because the prob-
ability transients in Markov processes are geometric sequences. The
z-transform providesus with a closed-form expressionfor such sequences.
Let us find the z-transforms of the typical time functions that we
shall soon encounter. Consider first the step function
1 n = 0,1, 2,3, ---
f(n) =
0 n<0Q0
The z-transform is
— 1
f(z) — Dfne — LT+z24+ 224
2 B84...
234 or f(z) —
T=3
Note that if
then
a f(z) = S nangn-1
dz MX
and
From these and other easily derived results, we may compile the table
of z-transforms shown as Table 1.3. In particular, note that, if a time
function f(m) with transform f(z) is shifted to the right one unit so as
to become /(z + 1), then the transform of the shifted function 1s
f(n) f(z
film) + fe(n) f(z) + fa(z)
hf (n) (k is a constant) kf (z)
fin — 1) zf(z)
f(n + 1) z- Lele) — f(0)]
an 1 — az
1 (unit step) 1
1-2
nan “
* (1 — az)?
n (unit ramp) i ae
By comparison with Eq. 1.4 we see that H(m) = P”, and that we
have found a convenient way to calculate the mth powerof the tran-
sition-probability matrix in closed form. The state-probability vector
at time ” can thus be found by postmultiplying the initial-state-prob-
ability vector by the response matrix H(m). The zjth element of the
matrix H(n) represents the probability that the system will occupy
state 7 at time 7, given that it occupied state z at time = 0. If the
toymaker starts in the successful state 1, then x(0) =[1 0] and
n(n) =[$ 3] + (Fo)"[3 —$] or wi(m) = $ + $(z0)”, m2(m) = § — 3 (Fo).
Note that the expressions for 71(m) and me(m) are exact analytic
representations for the state probabilities found in Table 1.1 by matrix
multiplication. Note further that as m becomes very large 71(m) tends
to $ and ze(m) tends to 3; they approachthelimiting state probabilities
of the process.
If the toymakerstarts in state 2, then x(0) = [0 1], x(n) =[$ 3
+ (¥o)"[-—$ $], so that mi(m) = § — $(zo)” and me(m) = 3 + $(z6)”.
We have now obtained analytic forms for the data in Table 1.2. Once
more wesee that for large m the state probabilities becomethe limiting
state probabilities of the process.
It is possible to make some general statements about the form that
H(n) maytake. First it will always have among its component matrices
at least one that is a stochastic matrix and that arises from a term of
(I — zP)-1 of the form 1/(1 — z). This statement is equivalent to
saying that the determinant of I — zP vanishes for z = 1 or that a
stochastic matrix always has at least one characteristic value equalto 1.
If the process is completely ergodic, then there will be exactly one
stochastic matrix in H(z). Furthermore, the rows of this matrix will
be identical and will each be the limiting-state-probability vector of the
process. Wecall this portion of H(m) the steady-state portion and
give it the symbolS since it is not a function of 1.
The remainder of the terms of H(z) represent the transient behavior
of the process. These terms are matrices multiplied by coefficients of
the form «”, na", m2a", and soon. Naturally, |«| must not be greater
than 1, for if any a were greater than 1, that component of probability
would grow without bound, a situation that is clearly impossible.
The transient matrices represent the decreasing geometric sequences of
probability components that are typical of Markov processes. The
transient component of H(m) may be given the symbol T(m) sinceit is
a function of m. Since for completely ergodic processes |«| < 1 forall
a, the transient component T(m) vanishes as becomes very large.
The matrices that compose T(z) are also of interest because they sum
to zero across each row. The transient components must sum to zero
12 MARKOV PROCESSES
To gain further insight into the Markov process, let us use the
z-transform approachto analyze processesthat exhibit typical behavior
patterns. In the toymaker’s problem, both states had a finite proba-
bility of occupancy after a large numberof transitions. It is possible
even in a completely ergodic process for some of the states to have a
limiting state probability of zero. Such states are called transient
states because we are certain that they will not be occupied after a
long time. A two-state problem with a transient state is described by
p_ (i 3
=|o il
with transition diagram
i
4
a -2) =| 1 — 32
0
‘ —iz
1-2
"|
and
1-—2z Lz
a By (1 — z)(1— gz) (1 — 2)(1 — 32)
— gP)-i =
0 1 — 32
@-)i-% 7-70-®
TRANSIENT, MULTICHAIN, AND PERIODIC BEHAVIOR 13
1 fo 1 1 fl -1
(I
_
2B)"
—1 _
7 lo | TT slo 0
ee
Thus
am) = (5 + @\y
If the system is started in state 1 so that x(0) = [1 0], then z1i(m) =
(3), me(m) = 1 — (#)". If the system is started in state 2 with
x(0) = [0 1], then naturally m1(m) = 0, me(m) = 1. In either case
we see that the limiting state probability of state 1 is zero, so our
assertion that it is a transient state is correct. Of course the limiting
state probabilities could have been determined from Eqs. 1.5 and 1.6
in the mannerdescribed earlier.
A transient state need not lead the system into a trappingstate.
The system may leave a transient state and enter a set of states that
are connected by possible transitions in such a way that the system
makes jumps within this set of states indefinitely but never jumps
outside the set. Such a set of states is called a recurrent chain of the
Markov process; every Markov process must have at least one recurrent
chain. A Markov process that has only one recurrent chain must be
completely ergodic because no matter where the processis started it
will end up making jumps among the membersof the recurrent chain.
However, if a process has two or more recurrent chains, then the
completely ergodic property no longer holds, for if the system is started
in a State of one chain then it will continue to make transitions within
that chain but never to a state of another chain. In this sense, each
recurrent chain is a generalized trapping state; onceit is entered, it can
never be left. We may now think of a transient state as a state that
the system occupies before it becomes committed to oneof the recurrent
chains.
The possibility of many recurrent chainsforces us to revise our think-
ing concerning S, the steady-state component of H(m). Since the
limiting state probability distribution is now dependent on how the
system is started, the rowsof the stochastic matrix S are no longer equal.
Rather, the 7th row of S represents the limiting state probability distri-
bution that would exist if the system were started in the zth state. The
ith row of the T(m) matrix is as before the set of transient components
of the state probability if 2 1s the starting state.
Let us investigate a very simple three-state process with two recurrent
chains described by
p= |o
1 0
j
oH et ©
13 13
14 MARKOV PROCESSES
i
3
State 1 constitutes one recurrent chain; state 2 the other. Both are
trapping states, but the general behavior would be unchanged if each
were a collection of connected states. State 3 is a transient state that
may lead the system to either of the recurrent chains. To find H(n)
for this process, we first find
1—2z 0 0
(I — zP) = 0 l-2z 0
—iz —tkz 1-—ikz
and
r (1 — z)(1 — dz 7
Lees ° °
(I — 2P)-! = 0 t = on — s 0
_ —_ I
—
=-,
=
|
oo
TRANSIENT, MULTICHAIN, AND PERIODIC BEHAVIOR 15
aC
1
(I — 2P) = | 1
1 z
(1 — z)(1 + 2) (1 — z)(1 + 2)
(I — zP)-1 =
and
16 MARKOV PROCESSES
1
1
H(n) = k + (— 14]
bolt poles
2
12
This H(z) does represent the solution to the problem because, for
example, if the system is started in state 1, mi(m) = 4[1 + (—1)”] and
to(n) = 4{1 — (—1)"]. These expressions produce the sameresults that
we Saw intuitively. However, whatis to be the interpretation placed on
Sand T(m) inthis problem? The matrix T(m) contains componentsthat
do not die away for larger n, but rather continueto oscillate indefinitely.
On the other hand, T(z) can still be considered as a perturbation to the
set of limiting state probabilities defined by S. The best interpretation
of the limiting state probabilities of S is that they represent the proba-
bility that the system will be found in each of its states at a time
chosen at random in the future. For periodic processes, the original
concept of limiting state probabilities is not relevant since we know
the state of the system at all future times. However, in manypractical
cases, the random-time interpretation introduced above is meaningful
and useful. Whenever we consider the limiting state probabilities of a
periodic Markov process, weshall use them in this sense. Incidentally,
if Eqs. 1.5 and 1.6 are used to find the limiting state probabilities, they
yield x1 = xe = 4, in agreement with our understanding.
Wehavenowinvestigated the behavior of Markovprocesses using the
mechanism of the z-transform. This particular approach is useful
because it circumvents the difficulties that arise because of multiple
characteristic values of stochastic matrices. Many otherwise elegant
discussions of Markov processes based on matrix theory are markedly
complicated bythis difficulty. The structure of the transform method
can be even more appreciated if use is made of the work that has been
done on signal-flow-graph models of Markov processes, but this is
beyond our present scope; references 3 and 4 maybeuseful.
The following chapter will begin the analysis of Markov processes
that have economic rewards associated with state transitions.
Markov Processes with Rewards
One question we might ask concerning this game is: What will be
the player’s expected winningsin the next » jumpsif the frog is now in
state z (sitting on the lily pad numbered 2)? To answer this question,
let us define v;(m) as the expected total earnings in the next transitions
if the system is now in state 7.
17
18 MARKOV PROCESSES WITH REWARDS
LS
Inspection of the q vector showsthat if the toymaker has a successful
toy he expects to make 6 units in the following week; if he has no
successful toy, the expected loss for the next week is 3 units.
Suppose that the toymaker knowsthat heis going to go out of busi-
ness after » weeks. He is interested in determining the amount of
money he may expect to make in that time, depending on whetheror
not he now has a successful toy. The recurrence relations Eq. 2.4
or Eq. 2.5 may be directly applied to this problem, but a set of
boundary values v;(0) must be specified. These quantities represent
the expected return the toymaker will receive on the day he ceases
operation. If the businessis sold to anotherparty, v1(0), would be the
purchase price if the firm had a successful toy on the selling date, and
v2(0) would be the purchase price if the business were not so situated
onthat day. Arbitrarily, for computational convenience, the boundary
values v;(0) will be set equal to zero in our example.
We may now use Eq. 2.4 to prepare Table 2.1 that shows v(m) for
each state and for several values of n.
7L a 7
we
eb
‘e
* |
= 5
> |
gSs |.
_
<4 10 units
£
= 3)
|
Go
2b yl
£ 7
us 1
vo 7
ao
of ! ! ——
: Asymptoteof v. (n) oo
—iE slope = 1 V7 |
-2 NU
2 a |
—3L
2 s a7 Points for 7
Lo Uo (n)
-4 U- ” 7
—5 | | | |
0 1 2 3 4 8 °
n (weeks remaining)
be called v(z) where v(z) = > v(m)z*. Equation 2.5 may be written
n=0
as
vin + 1) = q + Pv(n) n = 0,1, 2,--- (2.6)
_ 1
2z-l[v(z) — v(0)] = To7it Pv(z)
(I — 2P)v(z) = —— q + v(0)
or
Finding the transform v(z) requires the inverse of the matrix (I — zP),
which also appeared in the solution for the state probabilities. This is
not surprising since the presence of rewards does not affect the proba-
bilistic structure of the process.
For the toymaker’s problem, v(Q) is identically zero, so that Eq. 2.7
reduces to
zZ &£ 3s 10 _ 10 > 5
comlt * (ratios 4
_ 9 9 + 9 + 9 9 9
—
-_—_~
~~”
LH
a)
pws
|
N
|
Then
In other words,
V3() =nN+
vo(n) =n —
Cio
|p
are the equations of the asymptotes shownin Fig. 2.1. Note that, for
large n, both vi(m) and ve(m) have slope 1 and vi(m) — ve(n) = 10, as
we Saw previously. For large , the slope of v1() or ve(m) is the average
reward per transition, in this case 1. If the toymaker were many,
many weeks from shutdown, he would expect to make 1 unit of return
per week. Wecall the average reward per transition the “gain’’; in
this case the gain is 1 unit.
Asymptotic Behavior
What can be said in general about the total expected earnings of a
ASYMPTOTIC BEHAVIOR 23
(I — 2B)! = _—_S
— 2
+ F(z) (2.10)
where JF (z) is the z-transform of T(z). If we substitute Eq. 2.10 into
Eq. 2.7, we obtain
z 1
v(z) = (1 — z)? Sq + =
1 F(2)q + 1—z
Sv(0) + F(z)v(0) (2.11)
By inspection of this equation for v(z), we can identify the components
of v(x). The term [z/(1 — z)2] Sq represents a ramp of magnitude Sq.
Partial-fraction expansion showsthat the term [z/(1 — z)] 7(z)q repre-
sents a step of magnitude 7 (1)q plus geometric terms that tend to
zero as m becomesvery large. The quantity [1/(1 — z)] Sv(O) 1s a step
of magnitude Sv(0), whereas J (z)v(0) represents geometric components
that vanish when x is large. The asymptotic form that v(m) assumes
for large is thus
v(m) = nSq + JF(1)q + Sv(0) (2.12)
If a column vector g with componentsg; is defined by g = Sq, then
v(n) = ng + JF(1)q + Sv(0) (2.13)
The quantity g; is equal to the sum of the immediate rewards q;
weighted by the limiting state probabilities that result if the system is
started in the zth state, or
N
gt = > SigQj
j=l
g => mg (2.14)
+=1
a-i=[fils [2 Hl
1-213 3 1 — yozL-$ 4
= +-S8+ Fy)
so that
3 3 $1 81
s<[ ag] 7-Lae “al
Since
v=7()a=[_|
ASYMPTOTIC BEHAVIOR 25
The discussion of Markov processes with rewards has been the means
toanend. This end is the analysis of decisions in sequential processes
that are Markovian in nature. This chapter will describe the type of
process underconsideration and will show a methodof solution based on
recurrence relations.
Introduction of Alternatives
t=] J=1
i=20O J=2
i=3 O J=3
I I
| |
i=NO Oj=N
Fig. 3.1. Diagram of states and alternatives.
Suppose that the toymaker has weeks remaining before his business
will close down. Weshall call x the numberof stages remaining in the
process. The toymaker would like to know as a function of » and his
present state what alternative he should use for the next transition
(week) in order to maximize the total earnings of his business over the
n-week period.
Weshall define d;(m) as the numberof the alternative in the 7th state
that will be used at stage n. We call d;(m) the “‘decision”’ in state z at
the mth stage. When d;(m) has been specified for all 7 and all n, a
‘policy’? has been determined. The optimal policy is the one that
maximizes total expected return for each 2 and n.
To analyze this problem, let us redefine v;(m) as the total expected
TOYMAKER’S PROBLEM SOLVED BY VALUE ITERATION 29
1(7) — 1 2 2 2
do(n) _— 1 2 2 2
The calculation will be illustrated by finding the alternatives and
* Equation 3.1 is the application of the “Principle of Optimality”’ of dynamic
programming to the Markovian decision process; this and other applications are
discussed by Bellman.!
30 THE VALUE-ITERATION METHOD
> mgs
g = +=1 (2.14)
where q; is the expected immediate return in state z defined by Eq. 2.3.
Every completely ergodic Markov process with rewards will have a
gain given by Eq. 2.14. If we have several such processes and we
should lke to know which would be most profitable on a long-term
basis, we could find the gain of each and thenselect the one with highest
gain.
The sequential decision process of Chapter 3 requires consideration
of many possible processes because the alternatives in each state may
be selected independenily. By way of illustration, consider the
32
THE POLICY-ITERATION METHOD 33
k Alternatives
J Succeeding
1-1/ 51,1 lel state
Pra" Piehe Pige hs
i Present state
bp
Poy 72
PodVr
Ted
N
Since > bij = 1, these equations become
j=1
N
Vi(n) = ng + V1 Vo(n) = ng + Ve
The basic equations (Eqs. 1.5 and 1.6) show that this expression is
equivalent to Eq. 2.14:
N
> mgs
g = 1=1 (2.14)
A relevant question at this pointis this: If we are seeking only the gain
of the given policy, why did we not use Eq. 2.14 rather than Eq. 4.1?
As a matterof fact, why are we botheringto find such thingsas relative
values at all? The answer is first, that although Eq. 2.14 does find
the gain of the process it does not inform us about howto find a better
policy. We shall see that the relative values hold the key to finding
better and better policies and ultimately the best policy.
A second part of the answer is that the amount of computational
effort required to solve Eqs. 4.1 for the gain and relative values is about
the same as that required to find the limiting state probabilities using
Eqs. 1.5 and 1.6, because both computations require the solution of NV
linear simultaneous equations. From the point of view of finding the
gain, Eqs. 2.14 and 4.1 are a standoff; however, Eqs. 4.1 are to be pre-
ferred because they yield the relative values that will be shown to be
necessary for policy improvement.
From the point of view of computation,it is interesting to note that
we have considerable freedom in scaling our rewards because of the
linearity of Eqs. 4.1. If the rewards 7; of a process with gain g and
relative values v; are modified by a linear transformation to yield new
rewards 7; in the sense %;’ = arij + 6, then since
N
ge = >, bury
j=1
the new expected immediate rewards q;’ will be gs’ = agi + 6,so that the
gi are subjected to the same transformation. Equations 4.1 become
N
gEtu=
“° + Dba a=1,2,---,N
OT
> put = 1
g=1
gk + > pity;
j=
38 THE POLICY-ITERATION METHOD
using the relative values determined under the old policy. This
alternative k now becomes d;, the decision in the ith state. A new
policy has been determined when this procedure has been performed
for every state.
Wehave now, by somewhatheuristic means, described a method for
finding a policy that is an improvement over our original policy. We
shall soon prove that the new policy will have a higher gain than the
old policy. First, however, we shall show how the value-determination
operation and the policy-improvement routine are combined in an
iteration cycle whose goalis the discovery of the policy that has highest
gain amongall possible policies.
Policy-Improvement Routine
For each state 7, find the alternative k’ that maximizes
N
|___ gi + > pij*v; <¢—|
j=1
using the relative values v; of the previous policy. Then k’
becomes the new decision in the 7th state, g;*’ becomes q;, and
pi®’ becomes py.
There are two states and two alternatives in each state, so that there
are four possible policies for the toymaker, each with associated proba-
bilities and rewards. He would like to know whichof thesefourpolicies
he should follow into the indefinite future to make his average earnings
per week as large as possible.
Let us suppose that we have no a priort knowledge about which policy
is best. Then if we set v1 = vg = 0 andenter the policy-improvement
routine, it will select as an initial policy the one that maximizes expected
immediate reward in each state. For the toymaker, this policy con-
sists of selection of alternative 1 in both states 1 and 2. For this
policy
1 0.5 0.5 6
e= | r= lod "A 7* |_|
Weare now ready to begin the value-determination operation that
will evaluate our initial policy. From Eqs. 4.1,
gtv= 6 + 0.571 + 0.5ve £ + v2 = —3 + 0.4v1 + 0.6v2
2 1 —3 + 0.4(10) + 0.6(0) = 1
2 —5 + 0.7(10) + 0.3(0) = 2<
than does thefirst alternative. Thus the policy composed of the second
alternative in each state will have a higher gain than ouroriginal policy.
THE TOYMAKER’S PROBLEM 4]
However, we must continue our procedure because we are not yet sure
that the new policy is the best we can find. Forthis policy,
Let
N N
If Eq. 4.6 is solved for gi? — q:4 and this result is substituted into
Eq. 4.9, then we have
N N
Or
j=1
A PROOF OF THE POLICY-ITERATION METHOD 43
g = i=1
D> mg
so the solution for g4 in Eqs. 4.11 is
N
gi= > TBy; (4.12)
i=l
where 78 is the limiting state probability of state z under policy B.
Since all 2,2 > 0 and all y; > 0, therefore, g4 > 0. In particular,
g® will be greater than g4 if an improvementin the test quantity can
be made in any state that will be recurrent under policy B. We see
from Eq. 4.12 that the increases in gain caused by improvements in
each recurrent state of the new policy are additive. Even if we
performed our policy improvement on only one state and left other
decisions unchanged, the gain of the system would increase if this
state is recurrent under the new policy.
Weshall now showthatit is impossible for a better policy to exist and
not be found at some timeby the policy-improvement routine. Assume
that, for two policies A and B, g? > g4, but the policy-improvement
routine has converged on policy A. Then in all states, y; < 0, where
yi 1s defined by Eq. 4.6. Since 7? > 0 for all 7, Eq. 4.12 holds that
g2 —gA < 0. But g? > g4 by assumption, so that a contradiction
has been reached. It is thus impossible for a superior policy to remain
undiscovered.
The following chapter will present further examples of the policy-
iteration method that show how it may be applied to a variety of
problems.
Use of the Policy-Iteration Method
in Problems of Taxicab Operation,
Baseball, and Automobile Replacement
An Example—Taxicab Operation
Consider the problem of a taxicab driver whose territory encompasses
three towns, A, B, and C. If he is in town A, he has three alterna-
tives:
1 1 re ¢ 4 r10 4 87 8
2 is 2 ve 8 2 4 2.75
3 | ££ $ 3] | 4 6 44 4.25
2 1 r+ O 3 14 O 18 16
2 is ¢& de 8 16 8 15
3 1 4+ 86406 3 r10 2 87 7
2 4 2 4 6 4 2 4
3 t ve wt | 4 0 8] 4.5
The reward is measured in some arbitrary monetary unit; the num-
bers in Table 5.1 are chosen more for ease of calculation than for any
other reason.
In order to start the decision-making process, suppose that we make
V1, Vz, and vg = O, so that the policy improvement will chooseinitially
the policy that maximizes expected immediate reward. By examining
the q;*, we see that this policy consists of choosing thefirst alternative
in each state. In other words, the policy vector d whose zth elementis
the decision in the 7th state is
d= |1
1
2} 8
P=|i 0 3 q = |16
t 2 3 7
Nowthe value-determination operation is entered, and we solve the
equations
N
Undera policy of always cruising, the driver will make 9.2 units per
trip on the average.
Returning to the policy-improvement routine, we calculate the
quantities
N
1 1 10.53<
2 8.43
3 5.52
2 1 16.67
2 21.62<—
3 1 9.20
2 9.77<—
3 5.97
-f
mized when &k = 1. For 2 = or 3, it is maximized when & = 2.
In other words, our new policy is
owls
iL
A hoje
4
1
a]
1
l
1
8
TAXICAB OPERATION 47
2 1 14.06
2 26.00<—
3 1 9.24
2 13.10<—
3 2.39
f
The new policy is thus
The driver should proceed to the nearest stand, regardless of the town
in which he finds himself.
With this policy
1
= 2.75
a
leo OlN] iBico
16
— |. q = {15
O0|pat o/-
P= 16
I
i
8
4
2 1 15.41
2 24.42<—
3 1 9.87
2 13.34<—
3 4.41
The new policy is
2
d= {2
2
but this is equal to the previous policy, so that the process has con-
verged, and g has attained its maximum, namely, 13.34. The cab
driver should drive to the nearest stand in any city. Following this
policy will yield a return of 13.34 units per trip on the average, almost
half as much again as the policy of always cruising found by maxi-
mizing expected immediate reward. The calculations are summarized
in Table 5.5.
Table 5.5. SUMMARY OF TAXICAB PROBLEM SOLUTION
V1 0 1.33 — 3.88 —1.18
v9 0 7.47 12.85 12.66
U3 0 0 0 0
f
opportunity to check Eq. 4.12. The policy changed as a result of this
routine from a policy A for which
-f
to a policy B described by
The quantities y; defined by Eq. 4.6 may be obtained from Table 5.3.
They are the differences between the test quantities for each policy.
We find y1 = 12.14 — 9.27 = 2.87, whereas yz = y3 = 0 because the
decisions in states 2 and 3 are the samefor both policies A and B.
Application of Eqs. 1.5 and 1.6 to the transition-probability matrix
for policy B yields the limiting state probabilities:
t1 = 0.0672 te = 0.8571 3 = 0.0757
From Eq. 4.12 we then have that
g4 = (0.0672)(2.87) = 0.19
The change of policy from A to B should thus have produced an in-
crease in gain of 0.19 unit. Since g4 = 13.15 and g®? = 13.34, our
prediction is correct.
A Baseball Problem
Single 0.15 1 2 3 H
Double 0.07 2 3 H H
Triple 0.05 3 H H H
Homerun 0.03 H H H H
Base on balls 0.10 1 2 3 (if forced) H (if forced)
Strike out 0.30 Out 1 2 3
Fly out 0.10 Out 1 2 H (if less than
2 outs)
Ground out 0.10 Out 2 3 H (if less than
2 outs)
Double play 0.10 Out The player nearest first is out.
=
0000 1 0.03 3
0100 5 0.05 2
0110 7 0.07 1
0111 8 0.25 0 gai = 0.26
1011 12 0.40 0
1110 15 0.10 0
2010 19 0.10 0
0111 8 0.05 0
1011 12 0.30 0 2— 90
1110 15 0.60 0 qa" =
2010 19 0.05 0
0011 4 0.20 0 3 0
0101 6 0.40 0 ia =
1001 10 0.40 0
starts each inning in state 1, or ‘‘no outs, no men on,’’ then v1 may be
interpreted as the expected numberof runs per inning under the given
policy. The initial policy yields 0.75 for v1, whereas the optimal
policy yields 0.81. In other words, the team will earn about 0.06
more runs per inning on the average if its uses the optimal policy
rather than the policy that maximizes expected immediate reward.
Note that under both policies the gain was zero as expected, since
after an infinite number of movesthe system will be in state 25 and will
always make reward 0. Note also that, in spite of the fact that the
gain could not be increased, the policy-improvement routine yielded
values for the optimal policy that are all greater than or equal to those
for the initial policy. The appendix showsthat the policy-improvement
routine will maximize valuesif it is impossible to increase gain.
The values v; can be used in comparing the usefulness of states. For
example, under either policy the manager would rather be in a position
with two men out and bases loaded than be starting a new inning
(compare Ve4 with v1). However, he would rather start a new inning
than have two men out and men on second and third (compare ve3
with v3). Many other interesting comparisons can be made. Under
the optimal policy, having no men out and a player on first is just about
as valuable a position as having one man out and players on first and
j4 EXAMPLES OF THE METHOD
pig =tti
piy® =<1— pi 7 = 40 fork = 1
0 other 7
pez GW = R-|1
pig® = 41 — pee 7 = 40 fork >1
0 other 7
56 EXAMPLES OF THE METHOD
The actual data used in the problem are listed in Table 5.10 and
graphed in Figure 5.1. The discontinuities in the cost and trade-in
functions were introduced in order to characterize typical model-year
effects.
OO Survival -— 0.90
1600
NS .
SO 4 Probability | 9.80
1200 |- A
Probability
Dollars
Oo
Oo
on
800
400
Years
16 20 24 28 32 36 40
Oo
fp
CO
nN
Periods z
* Of course, chaos for the automobile industry would result if everyone followed
this policy. Where would the 3-year-old cars come from? Economic forces
would increase the price of such cars to a point where the 3 to 64 policy is
no longer optimal. The preceding analysis must assume that there are enough
people in the market buying cars for psychological reasons that so-called
‘“‘rational’’ buyers are a negligible influence.
Table 5.11. AUTOMOBILE REPLACEMENT RESULTS 58
Gain: — $250.00 Gain: — $193.89 Gain: — $162.44 Gain: — $157.07 Gain: — $151.05 Gain: — $150.99 Gain: — $150.95
State Decision Value Decision Value Decision Value Decision Value Decision Value Decision Value Decision Value Adjusted Value
MHAMAENONR OD
36 564 695 775
36 514 632 712
36 464 574 654
36 394 520 600
36 344 470 550
36 304 424 504
36 274 381 461
36 244 342 422
36 224 306 386
273 353
243 323
215 295
189 269
166 246
144 224
126 206
111 191
100 180
90 170
80 160
EXAMPLES OF THE METHOD
70 150
65 145
60 140
55 135
50 130
40 120
35 115
30 110
25 105
15 95
7 87
0 80
A numberin the decision column meanstrade for a car of that age in periods; a K means keep the presentcar. Values and gains are expressed in
dollars. The adjusted value is computed by adding $80, the value of a scrap car, to each of the Iteration 7 values.
THE REPLACEMENT PROBLEM 39
300
250}- =
Cost per period (dollars)
200|- -_
150}— =
100}- =
50;- as
0 | | | | |
=
0 1 2 3 4 5 6 7 8
Iteration number
that had two recurrent chains. Suppose that the process had an
1
expected immediate reward vector q = 2 expressed in dollars. The
3
matrix of limiting-state probability vectors was found in Chapter 1
to be
1 0 QO
S=1|10 1 0O
60
VALUE-DETERMINATION OPERATION 61
1
The gain vector g = Sq = | 2 | and we interpret g as follows: If the
1.5
process were started in state 1, it would earn $1.00 per transition. A
start in state 2 would earn $2.00 per transition. Finally, since the
system is equally likely to enter state 1 or state 2 after many transitions
if it is started in state 3, such a starting position is expected to earn
$1.50 per transition on the average. The averaging involvedis per-
formed over several independent trials starting in state 3, because in
any given trial either $1.00 or $2.00 per transition will be ultimately
earned.
The gain of the system thus depends upon the state in which it is
started. A start in state 7 produces a gain g;, so that we maythinkof
the gain as being a function of the state as well as of the process. Our
new task is to find the policy for the system that will maximize the
gain of all states of the system. We are fortunate that the policy-
iteration method of Chapter 4 can be extended to the case of multiple-
gain processes. Weshall now proceed to this extension.
(n + l)gi + ve = gi + D. Pislngs + v)
j=1
Or
N N
> pugy
gi= jg=1 t= 1,2,---,N (6.3)
62 MULTIPLE-CHAIN PROCESSES
and
N
gi + ve = Gi + > pan; a=1,2,---,N (6.4)
j=1
We now have the two sets of N linear simultaneous equations (Eqs.
6.3 and 6.4) that we mayuse to solve for the Ng; and Nv;. However,
Eqs. 6.3 may not be solved uniquely for the v;. The matrix [I — P]
has a singular determinant, so that the solution for the g; obtained from
Eqs. 6.3 will contain arbitrary constants. The number of arbitrary
constants is equal to the number of recurrent chains in the process.
Equations 6.3 essentially relate the gains of each state to the gains
of each recurrent chain. For example, in an L-chain process there will
be L independent gains. The gains of the states that are transient
will be related by Eqs. 6.3 to the L independent gains and so will be
determined when the independent gains are determined.
The N equations (Eqs. 6.4) must now be used to determine the L
independent gains and also the Nv;. We thus have ZL too many un-
knowns. However, suppose that we extend our former procedure by
setting equal to zero the v; for one state in each recurrent chain, so
that a total of Lv; will be equated to zero. Weshall generally choose
the highest numbered state in each chain to be the one whose 1, Is
set equal to zero. Wefind that Eqs. 6.4 may now besolved for the L
independent gains and for the remaining (N — L)v,.
The v; determined by the solution of Eqs. 6.4 maystill be called
relative values if we remember that they are relative within a chain.
The difficulty of solving Eqs. 6.3 and 6.4 is about the same as that of
finding the limiting-state-probability matrix S for a multiple-chain
process. Weshall see that the relative values v; are as useful as the
true limiting v; defined by Eqs. 2.15, as far as the search for the optimal
policy is concerned.
To illustrate these remarks, let us find the gain andrelative values of
the two-chain process discussed at the beginning of this section.
Equations 6.3. yield
fitm=14+1 £2 +g = 24+ ve
£3 + vg = 3 + 3U1 + 3U2 + $U3
If we now express g3 in termsof g1 and ge and then set equal to zero
the relative value of one state in each recurrent chain so that
V1 = ve = O, we obtain
are the gains and relative values for each state of the process. The
gains are of course the sameas those obtainedearlier.
Or
N N
> diskg
j=1
64 MULTIPLE-CHAIN PROCESSES
Policy Evaluation
Use p;; and gq; for a given policy to solve the double set of
equations
w= She FHLBN
N
j=1
N
wt =U + > Py? 7=1,2,---,N
j=l
for all v; and g;, by setting the value of one v; in each recurrent
chain to zero.
Policy Improvement
>, Pike;
j=l
using the gains of the previous policy, and make it the new
decision in the zth state.
If
N
> pijkgy
j=1
is the same for all alternatives, or if several alternatives are
equally good according to this test, the decision must be made
on the basis of relative values rather than gains. Therefore,
if the gain test fails, break the tie by determining the alter-
native k that maximizes
N
gk + > pigho;
j=l
using the relative values of the previous policy, and by making
it the new decision in the 7th state.
Regardless of whether the policy-improvementtest is based
on gains or values, if the old decision in the zth state yields as
high a value of the test quantity as any other alternative,
leave the old decision unchanged. This rule assures conver-
gence in the case of equivalent policies.
When this procedure has been repeated for all states, a
new policy has been determined and new [f,;] and [g¢;] ma-
trices have been obtained. If the new policy is the same as
the previous one, the iteration process has converged, and the
best policy has been found; otherwise, enter the upper box.
Fig. 6.1. General iteration cycle for discrete sequential decision processes.
MULTICHAIN EXAMPLE 65
the gain test quantity, using the gains of the old policy. However,
whenall alternatives have the same value of
N
> dikes
j=1
or when a group of alternatives have the same maximum value of the
gain test quantity, the tie is broken by choosing the alternative that
maximizes the value test quantity,
N
A Multichain Example
Let us find the optimal policy for the three-state system whose
transition probabilities and rewards are shown in Table 6.1. The
transition probabilities are all 1 or 0, first for ease of calculation and
second to show that no difficulties are introduced by such a structure.
This system has the possibility of multiple-chain policies.
2 1 1 0 0 6
2 0 1 0 4
3 0 0 1 5
3 0
- © ©
~] © 06
oo =
WN =
—
66 MULTIPLE-CHAIN PROCESSES
€1 = §3 §2 = §1 §3 = §2
These results show that there is only one recurrent chain and that
all three states are members of it. If we call its gain g, then
£1 = g2 = g3 = g; the relative valuevg is arbitrarily set equal to zero.
If we use these results in writing Eqs. 6.4, the following equations are
obtained:
gtu= 3 gtve=64+ 4 g= 9+
Their solution is g = 6, v1 = ve = —3, so that
£1 = 6 gz = 6 £3 = 6
and
v1 = —3 vg = —3 v3 = 0
1 1 6 1+ (-—3) = -2
2 6 2+ (-—3) = -1
3 6 °34+ (0) = 3<
2 1 6 6+ (-3)= 3
2 6 4+(-3)= 1
3 6 5+ (0)= 5<
3 1 6 8+(—-3)= 5
2 6 9+(-3)= 6
3 6 7+ (0) = T<
MULTICHAIN EXAMPLE 67
Since the gain test produced ties in all cases, the value test was
necessary. The new policy is
3 0 0 1 3
3 0 0 1 7
This policy must now be evaluated. Equations 6.3 yield
1 = &3 §2 = &3 &3 = &3
We maylet g1 = ge = gs = @, Set vg = 0, and use Eqs. 6.4 to obtain
gtu= 3 gtuve=5 g=7
gi=7 g2=7 gs =7
and
m= -4 v= -2 %=0
The policy-improvementroutine is shown in Table 6.3.
2 1 7 2
2 7 2
3 7 5<
3 1 7 4
2 7 7
3 7 7<
Since once more the gain test was indeterminate,it was necessary to
rely on the relative-value comparison. In state 3, alternatives 2 and
3 are tied in the value test. However, because alternative 3 was our
old decision, it will remain as our new decision. Wehave thus obtained
the same policy twice in succession; it must therefore be the optimal
policy. The optimal policy has a gain of 7 in all states. The policy
3
d = S , which was possible because of the equality of the value test
2
in state 3, is also optimal.
68 MULTIPLE-CHAIN PROCESSES
Although this system had the capacity for multichain behavior, such
behavior did not appear if we chose as our starting point the policy
that maximized expected immediate reward. Nevertheless, other
choices of starting policy will create this behavior.
Let us assume the followinginitial policy:
3 001 3
=f P=|0 1 0 a= [4
1 100 8
To evaluate this policy, we first apply Eqs. 6.3 and obtain
§1 = §3 2 = §2 §3 = §1
There are two recurrent chains. Chain 1 is composedof states 1 and
3, chain 2 of state 2 alone. Therefore, g1 = g3 = 1g, g2 = 2g, and we
may set ve = v3 = 0. Equations 6.4 then yield
lo + v, = 3 29 = 4 le =84+ v4
1 1 43 —¥
2 4 2
3 73 3<-
2 1 12 z
2 4 4
3 “e 5<
3 1 14 an
2 4 9
3 73 i<—
has been producedis the optimal policy that was found earlier, and so
there is no need to continue the procedure because we would only
repeat ourearlier work.
In the preceding example we began with a two-chain policy and ended
with the optimal one-chain policy. The reader should start with such
1 1
policies as d = 2 and d = ; to see how the optimal policy with
3 1
gain 7 for all states may be reached by various routes. Note that in
no case is it necessary to use the true limiting values v;; the relative
values are adequate for policy-improvement purposes.
>, Pidgi4
j=l
Wehave now found that the changes in gains and values must satisfy
the two sets of equations (Eqs. 6.12 and 6.13). Equations 6.13 are
identical to Eqs. 6.4 except that they are written in terms of differences
in gain and value rather than the absolute quantities, and y:; appears
instead of gi. However, Eqs. 6.12 differ from Eqs. 6.3 because of the
term ;; otherwise, if b; were zero, Eqs. 6.12 would bear the same
relation to Eqs. 6.3 that Eqs. 6.13 bear to Eqs. 6.4. Let us investigate
further the nature of Eqs. 6.12.
PROPERTIES OF THE ITERATION CYCLE 71
The policy B described by parameters #,;? and g;2 may of course have
many independent chains. If there are L recurrent chainsin the proc-
ess, then we are able to identify L groups of states with the property
that if the system is started in any state within a groupit will always
make transitions within that group. In addition there will bean L + Ist
group of transient states with the property that if the system is started
in any state of this group it will ultimately make a transition into one
of the Z recurrent chains. By a renumbering of states, it is possible
to write the matrix P# in the form
: 11p 0 0 0
ee oo
efooo)
are re
“aap| ap aptibap
The square submatrices 11p sap .., LLp are the transition matrices
for the chains 1, 2,---, £ after the renumbering; each is itself a stochas-
tic matrix. Submatrices of the form ’sP are composed of zero elements
ifv¢~sandrv4~Ll4+1. The submatrix 2+1,2+1P is the matrix of
transition probabilities among transient states. Some of the elements
of the submatrices 4+1,sP for s = 1, 2,---, L must be positive.
If the same renumbering scheme is used on the vectors g4, v4, , y,
and 7, we obtain a set of vectors composed of L + 1 subvectors; these
vectors are
gd lyA Iw ly
*g° “vA op ay
is started in a state of the vth chain; "x = *x’’P, and the sum of the
components of each "x for 7 = 1,2,---,£is 1. The subvector 4t1x
has all components zero because all states in the group L + 1 are
transient.
Equations 6.12 and 6.13 in vector form are
gi =o + P8g4 (6.14)
git yi=y + PByA (6.15)
If the partitioned forms are used in Eq. 6.14, we obtain
rgh = mp + 7Prgd y=1,2,---,L (6.16)
and
L+1
L+lgA = L+lyy + > L+1,sP sgA (6.17)
s=1
and
L+1
LtlgA 4 L+lyA = Ltly 4 > L+1,sP syA (6.19)
s=1
Suppose that Eq. 6.16 is premultiplied by "x so that
Tac rgA = Tx rb + Tx7rp rgA
Since
To = Tre 7TP
it follows that
Txt) = 0 (6.20)
Becauseall states in the 7th chain are recurrent, "x containsall positive
elements. We know from ourearlier discussion that all |; are greater
than or equal to zero. From Eq. 6.20 we see that, in any of the 7
groups 7 = 1, 2,---, L, b; must be zero. It follows that in each re-
current chain of the policy B the decision in each state must be based
on value rather than gain.
Equations 6.16 thus become
rg — rrp rgd (6.21)
Weknow that the solution of these equationsis that all g;4 = "g4, so
that all states in the 7th group experience the same increase in gain as
the policy is changed from A to B. If this result is used in Eq. 6.18,
wefind that
tgh = Mary (6.22)
PROPERTIES OF THE ITERATION CYCLE 73
Thus the increase in gain for each state in the 7th group is equal to
the vector of limiting state probabilities for the 7th group times the
vector of increases in the value test quantity for that group. Since,
for each group < L,; = 0, then"y; > 0. Equation 6.22 showsthat
an increase in gain for each recurrent state of policy B will occur un-
less policies A and B are equivalent.
Wehave yet to determine whetheror not the gain of the transient
states of policy B is increased. Equation 6.17 showsthat
L
(L+1] — L+1,L+1p)Lt+igA = Lt+ly + > L+1,sP sgA (6.23)
s=1
all states until it converges on the policy that has highest gain in all
states, the optimal policy.
The preceding discussion maybeillustrated by means of the multi-
chain example of Table 6.1. Recall the case when the policy
3 001 3
=f a 1 0 =|
1 10 0 8
fi] ok
changed to the policy
Oo ©
by means of the policy-improvement routine of Table 6.4. The first
policy we havecalled policy A, the second, policy B. From Table 6.4
wesee that
0 0
p= j y= {1
0 3
If the identity of states 3 and 1 is interchanged, we have
1/00 0 z “8”
P2—1/1:0 0O pb = i Y= { = be
1'0 0 0 0 8
Thus L = 1, there is one recurrent chain, and 11P = [1]. We notice
that in the new state 1 (the old state 3) the decision was based on values
rather than gains. The limiting-state-probability vector for s = 1,
1g, is [1]. Hence from Eq. 6.22
IgA =
boles
Since
22p _ 0 0
P F 0
we see from Eq. 6.24 that
so that
PROPERTIES OF THE ITERATION CYCLE 75
gi = > Putis
j=l
76
DISCOUNTING 77
-lv(2) — v(0)] = ——
1-2 4 + BPv(2)
Then
v(z) — v(0) = 7 4 + BzPv()
(I — BzP)v(z) = ;— 4 + v(0)
and finally
v(z) = ~~ (I — BzP)“q + (I — BeP)-1v(0) (7.4)
Wehave thus found the z-transform of v(m). It is now possible to
find a closed-form expression for v(m) in any problem,so that it is not
necessary to rely on the recurrence relation (Eq. 7.3).
78 DISCOUNTING
v(z) = #(z)q
where we consider #(z) to be the z-transform of a response function
H(z). Finally, v(z) = H(n)q.
We mustfirst find
3(2) = -— (1 - BP)
Since B = f,
1 _fi-z — 42
a-em =P a
and
1 — 2 dz
(1 — 32)(1 — goz) (1 — 32)(1 — 2)
(I — 4zP)-1 =
£2 —te
(1 — 32)(1 — goz) (1 — 32)(1 — 262)
Thus
2(1 — x62) 42"
(1 — z)(1 — 32)(1 — goz) (1 — 2)(1 — $2)(1 — go2)
H(z) =
be? “(1 — 2)
(1 — z)(1 — 32)(1 — gez) (1 — 2)(1 — $2)(1 — go)
VALUE ITERATION 79
By partial-fraction expansion
1 (3 4), 1-8 -ae
0-5 ultimele al _8_
19 9
1
321 —
— =v
9
1 100 100
1 171
a=
20
80 i71
i71
se |
and
28 $10 __ 8 _ 10
_ |19 9 1\n 9 9
H(z) — iN 3 + (3) "3 “a
ig 1 9 9
+(f6)"| so _so.
__ 100 100
_1_\n 171 171
7 171
Since v(z) = H(n)q, the problem of finding v(m) has been solved for an
arbitrary q. Forq = |
138 _2 __ 100
ven) = |_| +| 73] + ore Ge
If the toymakeris in state 1 and has m possible stages remaining,
the present value of his expected rewards from the m stagesis v(m)
= 488 — 2(4)" — 4% (s6)". The corresponding quantity if he is in
state 2 is ve(m) = —f§ — 2(4)™ + 88(s5)". Note that v1(0) = vo(0)
= 0, as required. For v(0) = 0, Eqs. 7.2 show that v1(1) = 6 and
vo(1) = —3; these results are also confirmed by our solution. The
z-transform methodis thus a straightforward way to find the present
value of the future rewards of a process at any stage.
We note that as becomes very large vi(m) approaches 33% and
vo(m) approaches —7. For a process with discounting, the expected
future reward does not grow with as it did in the no-discounting case.
Indeed, the present value of future returns approaches a constant
value as ~ becomes very large. We shall have more to say of this
behavior.
qk + B >. Pig*v;(n)
is used as the decision for the zth state at stage m + 1, or di(m + 1).
Since the v;(m) are known for stage u, all the quantities needed to
make the test at stage » + 1 are at hand. Once v(0) is specified, the
procedure can be carried through to any stage desired.
Let us work the toymaker example described by Table 3.1. We shall
assume that B = 0.9, so that either the toymaker has an interest rate
on his operation of 11.1 per cent per week or thereis a probability 0.1
that he will go out of business in each week. The interest rate is
absurdly high, but it illustrates how such a problem is handled. If
transitions were made oncea year, such an interest rate might be more
realistic.
The solution of this problem with use of Eq. 7.5 is shown in Table
7.1. Once more we assume that v1(0) = v2(0) = 0.
As weshall soon prove, the total expected rewards v;() will increase
with ~ and approach the values vi(m) = 22.2 and ve(n) = 12.3 as n
becomes very large. The policy of the toymaker should be to use the
second alternative in each state if > 1. Since we have seen how the
v(m) approach asymptotic values for large , we might ask if there is
any way we can by-pass the recurrencerelation and develop a technique
that will yield directly the optimal policy for the system of very long
duration. The answer is that we do have such a procedure and that
it is completely analogous to the policy-iteration technique used for
VALUE-DETERMINATION OPERATION 81
Let us investigate the behavior of Eq. 7.7 for large n. The coefficient
of v(0) represents terms that decay to zero, so that this term disappears.
The coefficient of q represents a step component that will remain
plus transient components that will vanish. By partial-fraction
expansion the step component has magnitude [1/(1 — B)]S + 7(8).
Thus for large n, v(z) becomes {[1/(1 — z)][1/(1 — B)]S + 7(8)}q.
For large n, v(m) takes the form {[1/(1 — B)]S + 7(8)}q. However,
{[1/(1 — B)]S + 7 (B)} is equal to (I — BP)—1, by Eq. 7.6. Therefore,
for large n, v(m) approachesa limit, designated v, that is defined by
v = (I — BP) "q (7.8)
The vector v may be called the vector of present values, because each
of its elements v; is the present value of an infinite number of future
expected rewards discounted by the discount factor8.
8&2 DISCOUNTING
(I — BP)—q, or Eq.7.8.
The present value of future rewards in each stateis finite and equal
to the inverse of the (I — BP) matrix postmultiplied by the q vector.
Note for future reference that, since P is a matrix with nonnegative
elements, (I — ®BP)-1 = > (8P)3 must have nonnegative elements and,
j=0
moreover, must have numbersatleast as great as 1 on the main diagonal.
This result is understandable from physical considerations because a q
with nonnegative elements must produce a v with nonnegative elements.
Since no rewardsare negative, no present value can be negative.
Weare now in a position to describe the value determination itself.
Because weare interested in the sequential decision process for large n,
we may substitute the present values v; = lim v;(m) for the quantities
v(m) in Eq. 7.2 to obtain the equations
N
process. Weare interested in the present values not only because they
are the quantities that we seek to maximize in the system but also
because they are the key to finding the optimal policy, as weshall see
when we discuss the policy-improvement routine. —
Let us find the present values for 8 = 4 of the toymaker’s policy
defined by
P = 2 2 _ 6
“Tal t= [3
Equations 7.9 yield
v1 = 6 + 4u1 + jue Ve = —3 + $1 + Pove
The solution is v1 = 433, ve = —?¢%. These are the limiting values
for vi(m) and ve(m) found earlier.
Weshall now see how to use the present values for policy improve-
ment.
git + BD pista;
i=
with respect to all alternatives in the zth state.
Suppose that the present values for an arbitrary policy have been
determined. Then a better policy, one with higher present values in
every state, can be found by the following procedure, which wecall
the policy-improvement routine.
For each 2, find the alternative & that maximizes
N
gi* + BD pisko;
j=1
using the v; determined for the original policy. This & now becomes
the new decision in the zth state. A new policy has been determined
when this procedure has been performed for everystate.
The policy-improvement routine can then be combined with the
8&4 DISCOUNTING
Value-Determination Operation
Use pi and q; for given policy to solve the set of equations
N
t= Ga +B > pir; a=1,2,---,N P|
j=l
for all present values vj.
Policy-Improvement Routine
For each state i, find the alternative k’ that maximizes
N
|| gk + =
> pagho; iq
Fig. 7.1. Iteration cycle for discrete decision processes with discounting.
The iteration cycle may be entered ineither box. An initial policy may
be selected and the iteration begun with the value-determination opera-
tion, or an initial set of present values may be chosen andtheiteration
started in the policy-improvementroutine. Ifthereisnoa priori basis for
choosing a close-to-optimal policy, then it is often convenientto start the
process in the policy-improvement routine withall v; set equal to zero.
The initial policy selected will then be the one that maximizes expected
immediate reward, a very satisfactory starting point in mostcases.
The iteration cycle will be able to make policy improvements until
the policies on two successive iterations are identical. At this point it
has found the optimal policy, and the problem is completed. It will
be shown after the example of the next section that the policy-improve-
ment routine must increase or leave unchanged the present values of
every state and that it cannot converge on a nonoptimal policy.
An Example
Let us solve the toymaker’s problem that was solved by value
iteration earlier in this chapter. The data were given in Table 3.1,
AN EXAMPLE 85
and as before B = 0.9. We seek the policy that the toymaker should
follow if his rewards are discounted and he is going to continue his
business indefinitely. The optimalpolicy is the one that maximizesthe
present value of all his future rewards.
Let us choose as the initial policy the one that maximizes his
expected immediate reward. This is the policy formed by the first
alternative in each state, so that
1 0.5 0.5 6
os H P= lo Oe a* |_|
Equations 7.7 of the value-determination operation yield
vi = 6 + 0.9(0.5u1 + 0.5v2) vg = —3 + 0.9(0.401 + 0.6v2)
The solution is v; = 15.5, vg = 5.6. The policy-improvementroutine
is now used as shown in Table7.2.
The second alternative in each state provides a better policy, so that now
a= |] P= lor os] t= [|
The value-determination operation for this policy provides the
equations
v7, = 44 0.9(0.8v1 + 0).2v2) va = —5 + 0.9(0.73 + 0.3v2)
1 1 21.5
2 22.2<-
2 1 11.6
2 12.3<—
The present values of the two states under the optimal policy are 22.2
and 12.3, respectively; these present values must be higher than those
of any other policy. The reader should check the policies d = ,
We have seen that if the discount factor is 0.9 the optimal no-
discounting policy found in Chapter4 is still optimal for the toymaker.
Weshall say more about how the discount factor affects the optimal
policy after we prove the properties of the iteration cycle.
vi = GF + BD dijPoj4 — GA — BD dasA0s4
j=1 j=1
— BD
j=l
patos
If v;4 = v;® — v;,4, the increase in present value in the zth state, then
N
vid = yi + BD dizPoj4
j=1
This set of equations has the same form asouroriginal present-value
equations (Eq. 7.9), but it is written in terms of the zucrease in present
values. We know that the solution in vector form is
v4 = (I — BP8}-1y (7.14)
where y is the vector with components y;. It was shown earlier that
[I — BP#]-1 has nonnegative elements and has values of at least 1 on the
main diagonal. Hence, if any y; > 0, at least one v;4 must be greater
than zero, and no v;4 can be less than zero. Therefore, the policy-
improvement routine must increase the present values of at least one
state and cannot decrease the present values of anystate.
Is it possible for the routine to converge on policy A when policy B
produces a higher present value in some state? No, because if the
policy-improvement routine converges on A, then all y; < 0, and hence,
all v4 < 0. It follows that when the policy-improvement routine has
converged on a policy no other policy can have higher present values.
1 1 1 2
oy 6= [2 =|) e= [2
1 1 2 2
Fig. 7.2. Optimal policy as a function of discount factor for taxicab problem.
For 6 > 0.77, the second alternative in each state is the optimal
policy; the driver should always proceed to the nearest stand. In
Region I, the policy that maximizes expected immediate reward is
optimal; in Region IV, the no-discounting policy is best. An inter-
mediate policy should be followed in Regions II andIII.
The behavior first described enables us to draw several conclusions
THE AUTOMOBILE PROBLEM WITH DISCOUNTING 8&9
Summary
The solution of sequential decision processes is of the same order of
difficulty whether or not discounting is introduced. In eithercaseit is
necessary to solve repeatedly a set of linear simultaneous equations.
Each solution is followed by a set of comparisons to discover an 1m-
proved policy; convergence on the optimal policy is assured. Dis-
counting is useful when the cost of money is important or when there is
uncertainty concerning the duration of the process.
The Continuous-lime
Decision Process
Upon dividing both sides of this equation by dt and taking the limit
as dt > 0, we have
N
£ il) = > (2) ai; = 1, 2,° vy N (8.3)
t=1
Table 8.1 shows some typical time functions and their corresponding
Laplace transforms derived using Eq. 8.5.
The properties of Laplace transforms are widely known and are
thoroughly discussed in such references as Gardner and Barnes.2 The
Laplace transform of a time function is unique; there is a one-to-one
correspondence between the time function and its Laplace trans-
formation. These transforms are particularly suited to the analysis
of systems that can be described by linear constant-coefficient differ-
ential equations.
SOLUTION BY LAPLACE TRANSFORMATION 95
Table 8.1. LAPLACE TRANSFORM PAIRS
Time Function for ¢ > 0 Laplace Transform
F(é) f(s)
filt) + felt) fils) + fas)
bf (t) (k is a constant) kf (s)
1 (unit step) :
“a
teat G+1 ape
Or
II(s)(sI — A) = x(0)
where I is the identity matrix. Finally, we have
II(s) = x(0)(sI — A)-1 (8.6)
The Laplace transform of the state-probability vector is thus the
initial-state-probability vector postmultiphed by the inverse of the
matrix (sI — A). The matrix (sI — A)-1 is the continuous-process
counterpart of the matrix (I — zP)-1. Weshall find that it has proper-
ties analogous to those of (I — zP)—1 and that it constitutes a complete
solution of the continuous-time Markov process.
By inspection, wesee that the solution of Eq. 8.4 is
m(t) = m(O)eAt (8.7)
where the matrix function e4t is to be interpreted as the exponential
series
¢2 t3
P+ iA + —_
5 31
A2@+4 A384...
96 THE CONTINUOUS-TIME DECISION PROCESS
which will converge to e44. For discrete processes, Eqs. 1.4 yielded
m(n) = 7(0)P” n = 0,1, 2,--- (1.4)
Suppose that we wish to find the matrix A for the continuous-time
process that will have the same state probabilities as the discrete
process described by P at the times ¢ = 0, 1, 2,---, where a unit of
time is defined as the time for one transition of the discrete process.
Then, by comparison of Eqs. 8.7 and 1.4 when ¢ = n, wesee that
eA = P
or
A=InP (8.8)
Kecall the toymaker’s initial policy, for which the transition-proba-
bility matrix was
1 1
p=|; ||5 5.
Suppose that we should like to find the continuous process that will
have the same state probabilities at the end of each week for an
arbitrary starting position. Then we would have to solve Eq. 8.8
to find the matrix A. Methods for accomplishing this exist,* and if we
apply them to the toymaker’s P we find
In 10 ,—5 5
aaa oa
Since the constant factor (In 10)/9 is annoying from thepoint of view of
calculation, we may as well solve a problem that 1s analogous to the
toymaker’s problem but that is not encumbered by the constants
necessary for complete correspondence in the sense just described. We
shall let A be simply
A=|"7
—5
jl5 (8.9)
Since we are abandoning complete correspondence, we may as well
treat ourselves to a change in problem interpretations at the same time.
Weshall call this new problem “the foreman’s dilemma.”’ A machine-
shop foreman has a cantankerous machine that may be either working
(state 1) or not working (state 2). Ifit is working, there is a probability
5 dt that it will break down in a short interval d?; if it is not working,
there is a probability 4d¢ that it will be repaired in dt. We thus
obtain the transition-rate matrix (Eq. 8.9). The assumptions regarding
breakdown andrepair are equivalent to saying that the operating time
between breakdowns is exponentially distributed with mean ¢, while
SOLUTION BY LAPLACE TRANSFORMATION 97
4 s+ 5
|s(s + 9) s(s + 9)
Partial-fraction expansion permits
$$ &, -8
ss) 549 st sa 9
(sl — A)-1 =
$ -$ $, 4
st 549 ss 4 9
Or
3 3] s+9l-s §
Let the matrix H(t) be the inverse transform of (sI — A)-!. Then
Eq. 8.6 becomes by meansof inverse transformation
a(t) = 7(0)H(¢) (8.10)
By comparing Eqs. 8.7 and 8.10, we see that H(t) is a closed-form
expression for e4¢,
For the foreman example,
P olen
.9 9
1 — > aij at. On the other hand, the system may make transition
j#t
to some state 7 # 2 during the time interval dt with probability a,j dz.
In this case the system would receive the reward 7;; plus the expected
reward to be madeif it starts in state 7 with time ¢ remaining, v,(t). The
product of probability and reward must then be summed overall
states; # 2 to obtain the total contribution to the expected values.
Using Eq. 8.2, we may write Eq. 8.15 as
vi(t + dt) = (1 + Av dt) res dt + v;(2) | + > aij atlrij + v;(t)]
jHt
or
valt + dt) = Vii dt + v4(t) + aii; (t) dt + > Asiij dt + > AizV;(t) at
j#t jH#t
a N
di vi(t) = 4 + > Arig + > aizv;(C) = 1, 2, ce, N
j#t j=l
or
and finally
Hm |
Thus we find that Eq. 8.19 relates v(s), the Laplace transform of
v(t), to (sI — A)~1, the earning-rate vector q and the termination-
reward vector v(0), respectively. The reward vector v(¢) may be found
by inverse transformation of Eq. 8.19.
Let us apply the result (Eq. 8.19) to the foreman’s problem. The
transition-rate matrix and reward vector are
—5 5 6
Pa ea] 8 [2
A — =
s+4 5
s(s + 9) s(s + 9)
(sI — A)-1 =
4 s+5
s(s + 9) s(s + 9)
102 THE CONTINUOUS-TIME DECISION PROCESS
StH 5
1 s2(s + 9) s2(s + 9)
“(I — A)! =
4 s+5
s#(s + 9) s2(s + 9)
Using partial-fraction expansion, we obtain
i
S484
9
s2
$i —37
s+ 9
a
3
s2
+ ~ 81
S
+ eT
s+ 9
—(sI — A)-! =
4 _4 4 5 4 _ AL
9 4 781, 31 9 4 8r 81
oH LE Hort AL
S
4 5 3 _5 _—58 3B 6
$3 —8r 0 i —s8irjJJL—3
or
1 5 _5
v(t) = | + + os|
] —%3 3
The total expected reward in time ¢ if the system is started in state 1
is thus
vi(t) =t + § — ge-
and if started in state 2 is
ve(t) = t — § + ge-%
Note that regardless of the starting state the machinewill earn, on the
average, $1 per unit time when ¢ is large because the coefficient of ¢
in both vi(¢) and ve(t) is 1. The average reward per unit time for a
system is called the gain of the system by analogy with the discrete-
time case. As before, the gain will depend uponthestarting state if the
system is not completely ergodic. We also see that for large ?, v1(t)
and v2(t) may be written in the form v,(t) = git + v4; in the abovecase,
v1 = 3, vg = —§. Let us prove that this relation holds for a general
continuous-time Markovprocess.
Equation 8.19 is
4
_5
coh» colon
ot — aya = 27?> :| + I |
s+9 4
9 9 9
1
==-S$+ Fs)
S
104 THE CONTINUOUS-TIME DECISION PROCESS
so that
| 7-8
wmlor colon
eC"
N
|
81 81
In addition, q = —3
| From Eq. 8.22, we have g = Sq = |:
1
5
and from Eq.8.23, since v(0) = 0, we have v = J(0)q = ‘|:
©
Therefore by Eq. 8.25, it follows that for large ¢ we may write v1/(t)
and ve(t) in the form
vilt) = ¢ + 3 ve(t) = t — §
Suppose that our machine shop foreman has to decide upon a main-
tenance and repair policy for the machinery. When the system is in
state 1, or working, the foreman must decide what kind of maintenance
he will use. Let us suppose that if he uses normal maintenance pro-
ceduresthefacility will earn $6 per unit time and will have a probability
5 dt of breaking down in a short time @. Note that this is equivalent
to saying that the length of operating intervals of the machine is
exponentially distributed with mean 3.
The foreman also has the option of a more expensive maintenance
procedure that will reduce earnings to $4 per unit time but will also
reduce the probability of a breakdown in di to 2dt. Under neitherof
these maintenance schemes is there a cost associated with the break-
down per se. If we number the two alternatives in state 1 as 1 and 2,
respectively, then we havefor the first alternative
aio) = 5 ri1} = 6 7121 = 0
and for the second alternative
ajo? = 2 ru? = 4 rie = 0
Finally, we obtain by using Eq. 8.16 that
gii=6 and qi?=
CONTINUOUS-TIME DECISION PROBLEM 105
Now we must consider what can happen when the machinery is not
working and the system occupies state 2. Let us suppose that the
foreman also has two alternatives in this state. First, he may have the
repair work done by his own men. Forthis alternative the repair will
cost $1 per unit time that the men are working, plus $0.50 fixed charge
per breakdown, and there is a probability 4 dt that the machine will
be repaired in a short time dé (repair time is exponential with mean }).
The parametersof this alternative are thus
ao11 = 4 7991 = —] Y911 = —0.5
and
go? = —1.5 + 7(-0.5) = —5
The foreman must decide which alternative to use in each state in
order to maximize his profitsin the long run. The data for the problem
are summarized in Table 8.2.
The concepts of alternative, decision, and policy carry over from the
discrete situation. Since each of the four possible policies contained
in Table 8.2 represents a completely ergodic process, each has a unique
gain that is independent of the starting state of the system. The
foreman would like to find the policy that has highest gain; this is the
optimalpolicy.
One wayto find the optimal policy is to find the gain for each of the
four policies and see which gain is largest. Although this is feasible
106 THE CONTINUOUS-TIME DECISION PROCESS
for small problems, it is not feasible for problems that have many
states and manyalternativesin eachstate.
Note also that the value-iteration method available for discrete-time
processesis no longer practical in the continuous-time case. It is not
possible to use simple recursive relations that will lead ultimately to the
optimal policy because we are now dealing with differential rather than
difference equations.
A policy-iteration method has been developed for the solution of the
long-duration continuous-time decision problem. It is in all major
respects completely analogous to the procedure used in discrete-time
processes. As before, the heart of the procedure is an iteration cycle
composed of a value-determination operation and a policy-improvement
routine. Weshall now discuss each section in detail.
g= gi + 2, wiltes + v5)
J
Or
N N
If Eqs. 8.26 are to hold for all large ¢, then we obtain the twosetsof
linear algebraic equations
N
> ag; = 0 i=1,2,---,N (8.27)
4=1
N
B= G+ day 1=1,2,---,N (8.28)
j=
Equations 8.27 and 8.28 are analogous to Eqs. 6.3 and 6.4 for the
discrete-time process. Solution of Eqs. 8.27 expresses the gain of
each state in terms of the gains of the recurrent chains in the process.
POLICY-IMPROVEMENT ROUTINE 107
The relative value of one state in each chain is set equal to zero, and
Eqs. 8.28 are used to solve for the remaining relative values and the
gains of the recurrent chains.
Or
N N
gk + j=1
> aajhos + t j=1
> aashg; (8.30)
as the quantity to be maximized in the7zth state. For large ?, Expression
8.30 is maximized by the alternative that maximizes
N
> aajko;
gi® + j=1 (8.32)
the value test quantity, using the relative values of the old policy. The
relative values may be used for the value test because a constant differ-
ence will not affect decisions within a chain.
The general iteration cycle is shown in Fig. 8.1. It corresponds
completely with Fig. 6.1 for the discrete-time case and has a completely
analogous proof. The rules for starting and stopping the process are
unchanged.
108 THE CONTINUOUS-TIME DECISION PROCESS
Policy Evaluation
Use aj; and qj for a given policy to solve the double set of
equations
N
>, wes = 0 a 1,2,---,N
37=1
N
B=UuUt > ay 3 1,2,---,N
j=1
for all v; and g;, by setting the value of one v; in each recurrent
chain to zero.
Policy Improvement
Policy-Improvement Routine
For each state 2, find the alternative k’ that maximizes
N
-= gk + > aagko; <—
j=l
using the relative values v; of the previous policy. Then hk’
becomes the new decision in the ith state, q;*’ becomes q;, and
aie’ becomes aj;.
N
gA = git + > aiz4u54 (8.36)
j=1
If Eq. 8.36 is subtracted from Eq. 8.35 and if Eq. 8.34 is used to
eliminate g;2 — q:4, we obtain
N
the solution is
N
j=
where 7;is the limiting state probability of state 7 under policy B.
Since all x;2 > 0, and all y; > 0, therefore g4 > 0. In particular,
g® will be greater than g4 if an improvementin the test quantity
N
2 1 —3 + 41) =1
112 LHE CONTINUOUS-TIME DECISION PROCESS
“Botta oly
Weevaluate this policy
Computational Considerations
Wehaveseenthat the solution of the continuous-time decision process
involves about the same amount of computation as thesolution of the
corresponding discrete process. As a matter of fact, the two types of
processes are computationally equivalent, so that the same computer
program maybe used for the solution of both. To see this, let us write
the value-determination equations (Eqs. 6.3 and 6.4) for the discrete
process
.
ge = j=l
> bug; i= 1,2,--,N (6.3)
N
gitu=qat > pur; 2 1,2,---,N (6.4)
j=1 j=
COMPUTATIONAL CONSIDERATIONS 113
x(Diy — S4y)gy = O
k= qu + S (piy — 84y)0;
j=l
where 8;; is the Kronecker delta; 54, = lifs =7andOif7 #7. If we
now let ay = pij — Siz, we have
No
>, 4g; = 0
jai
N
= qi t+ > ay;
j=1
These are the value-determination equations (Eqs. 8.27 and 8.28) for
the continuous-time decision process. Thus if we have a program for
the solution of Eqs. 6.3 and 6.4 for the discrete process, we may use
it for the solution of the continuous process described by the matrix
A by transforming the transition rates to ““pseudo”’ transition proba-
bilities according to the relation pij = aij + S4y.*
Asfar as the policy-improvementroutine is concerned, in the discrete
case we maximize either
N N
in state 2, since only terms dependent upon & affect decisions. In terms
of aiy* = piy* — 3, the quantities to be maximized are
N N
In this equation we assume that rewards are paid at the end of the
interval dt and that the process receives no reward from termination.
Using the definition given by Eq. 8.2, we may rewrite Eq. 8.40 as
vi(t + dt) = (1 _— a dt) (vs + > ars) dt + v4(t) + > Qij at o(0
j#t j=1
and
N
vi(t + dt) = (rs + > ap) dt + v;(t) + > aij at v;(t) —adat v4(t)
j#t j=l
(s + aI —- AJ? =-—+
S+ 4
$4 F(s + @) (8.44)
so that [(s + a)I — A]~! has all transient components. If Eq. 8.44 is
used in Eq. 8.43, we have
_1p 1 7 !
v(s) = ‘\; + ;° + F(s + 2) + |——s + F(s + 2) ¥(0) 7 (8.45)
we have
v= Es + Fa)|4
0
or
v = (al — A)!q (8.46)
Policy Improvement
Weare interested not only in evaluating a given policy but also in
finding the policy that has highest present values in all states. We
should like to be able to solve a problem such as that posed by Table
8.2 when discounting is an important element. Equations 8.47
constitute a value-determination operation; we still require a policy-
improvement routine.
If we desired to maximize the rate of growth of v;,(¢) at time ¢ in
Eq. 8.41, we should maximize
N
Value-Determination Operation
Use aj and q; for a given policy to solve the set of equations
j
for all present values vj.
Policy-Improvement Routine
For each state 2, find the alternative k’ that maximizes
N
— gk + > agko; <—
j=l
using the present values v; from the previous policy. Then ?’
becomesthe new decision in the ith state, g;*’ becomes q;, and
ayj®’ becomesaj.
Fig. 8.3. Iteration cycle for continuous-time decision processes with discounting.
118 THE CONTINUOUS-TIME DECISION PROCESS
Equivalently,
N N
ve = GB + > aigBoj4 — giA — > aytvj4 > 0 for all
j=1 j=1
where y; is the improvement in the test quantity that the policy-
improvement routine was able to achieve in the 7th state. For the
individual policies the value-determination operation yields
N
An Example
Let us use our results to solve the sequential decision problem pre-
sented in Table 8.2 with « = 4. We may interpret this to mean
that the duration of the foreman’s operation is exponentially distrib-
uted with mean 9 hours, or we may think of some investmentsituation
in which the interest rate is important. As is the custom, we shall
choose as ourinitial policy the one that maximizes earningrate; thatis,
Their solution is
783 702
U1 = "82 v2 = 33
t k qk + > aagko;
j=1
1 6 — 5(4#) + 5(B) = 33
2 4 — 20088) + 2(588) = At
2 1 —3 + 4733) — 4 (753*) = $2
Their solution is
v1 = “32 v2 = “32
120 THE CONTINUOUS-TIME DECISION PROCESS
Note that the present values have once more increased. The policy-
improvement routine is entered again, with results shown in Table
8.5.
1 1 32
9 188
2 1 32
2 AB7
where g;’ has been used to distinguish the continuous from the discrete
case. We maydefine ai; = fi; — 8;; and write Eq. 8.48 as
N
and
1 , 1 N
Ta tTkem
If we define 8 = 1/(1 + «) and q = 1/(1 + «)qs’, then we have
N
Ve = ge + BD. Pan;
j=l
a set of equations of the same form as those for the discrete case. Thus
if we have a continuous problem described by «, q’, and A, we may use
the program for the discrete problem described by 6, q, and P by making
the transformations
B=
_ q = 6q : P=A+4+I
gi*§ + BD pisto;
j=
For the continuouscaseit is
N
qk + > ayko;
,
j=1
ga + > pejto;
j=1
and this of course, is proportional to
N
ge + BD pajho;
j=l
whichis the test quantity for the discrete case. Thus the same trans-
formation that allowed us to use a program for the discrete case in the
122 ITHE CONTINUOUS-TIME DECISION PROCESS
vi — > pis +E = 4
j=
When vy = 0,arbitrarily, then
N-1 354 Oift #7
>, (8 — pului + B= H iyij life = 7
j=1
If we define a matrix
UN = 4
then
V1
v2
5 .
UN-1
§
Equation A.1 in the v, and the g can then be written in matrix
form as
Mv = q
or
v = M"1q (A.2)
where q is the vector of expected immediate rewards. The matrix
M~—! will exist if the system is completely ergodic, as we have assumed.
Thus, by inverting M to obtain M-1 and then postmultiplying M-! by q,
vi for 1 < 1 < N — 1 and g will be determined.
Suppose that state N is a recurrent state and a trapping state, so
that py; = 0 for7 # N, and dyn = 1. Furthermore, let there be no
recurrent states among the remaining N — 1 states of the problem.
We knowthat
v = M-lq
:
M =
a 0 0 0 ! 1
RELATIONSHIP OF TRANSIENT TO RECURRENT BEHAVIOR 129
The matrix W or U—! has the form of the matrix [£+1[ — L+1, L+1Pp)]
used in Eq. 6.23 of Chapter 6. Here we would interpret the uw; as the
expected number of times the system will enter one of the transient
states 7 in the group L + 1 before it enters some recurrent chainif it
is started in state 7 of the group L + 1. With this definition, the
elements of [4t1[ — “+1, Z+1P]-1 must all be nonnegative by the same
argument given here.
Using W-! = U, Eq. A.2, and the partitioned form of M1, we may
write
N-1 N-1
Or
N-1 N-1
Ve = > Mag; — B > Uij l<ti<N-1 (A.4)
jal j=1
Since for this particular system we know that these equations are
equivalent to Eq. A.4,
N N
vid = > msBye — gd > Uay8 a=1,2,---,N-—1
7=1
j= j=l
RELATIONSHIP OF TRANSIENT TO RECURRENT BEHAVIOR 131
General References
E. F. Beckenbach, Ed., Modern Mathematics for the Engineer, McGraw-Hill
Book Company, New York, 1956.
R. Bellman, ‘‘A Markovian Decision Process,’”’ J. Math. and Mech., 6, 679 (1957).
J. L. Doob, Stochastic Processes, John Wiley & Sons, New York, 1953.
G. Elving, ‘“‘Zur Theorie der Markoffschen Ketten,’”’ Acta Soc. Sci. Fennicae, 2,
No. 8, 1937.
W. Feller, An Introduction to Probability Theory and Its Applications, Vol. I, 2nd
Ed., John Wiley & Sons, New York, 1957.
B. Friedman, Principles and Techniques of Applied Mathematics, John Wiley &
Sons, New York, 1956.
W. H. Huggins, “Signal-Flow Graphs and Random Signals,” Proc. I.R.E., 45,
74 (1957).
J. G. Kemeny and J. L. Snell, Finite Markov Chains, D. Van Nostrand Com-
pany, Princeton, 1960.
V. I. Romanovsku, Diskretnye Tsept Markova, State Publishers, Moscow, 1949.
T. A. Sarymsakov, Osnovy Teorii Protsessov Markova, State Publishers, Moscow,
1954.
133
Index
Alternatives, 26-28, 33, 104, 105 Gain, changes related to policy changes, 43,
49, 72-75, 111
Barnes, J. L., 94 of a process, 22, 24, 32, 36, 102
Baseball problem, best long-run policy, 52 of a state, 23, 24, 61-63, 103
computational requirements, 52 in multiple-chain processes, 60-63
evaluation of base situations, 53 Gardner, M. F., 94
Bellman, R., 1, 29
Iteration cycle, for continuous-time proc-
Car problem, best long-run policy, 57, 58, esses, 108, 110
89, 90 for continuous-time processes with dis-
computational requirements, 58, 89 counting, 117
solution in special situations, 58, 89 for discrete-time processes, 38, 64
Chain, periodic, 15 for discrete-time processes with discount-
recurrent, 13 ing, 84
Computational considerations, 36, 37, 49-52, for multiple-chain processes, 64
112-114, 120-123
Laplace transforms, definition, 94
Decision, 28, 33, 105 of vectors and matrices, 95
Decision vector, 33 table of, 95
Discount factor, 76
Discount rate, 114 Markovprocesses, definition, 3, 92
Matrices, differential, 12, 23, 94, 98
Earning rate, 100 stochastic, 11, 23, 94, 98
Equivalenceof discrete- and continuous-time
processes, 96, 112-114, 120-122 Partial-fraction expansion, 10
Policy, 28, 33, 105
Foreman’s dilemma, 96-105, 111, 112, 119, optimal, 28, 33, 61, 81, 105, 116
120 Policy improvement by a change in chain
Frog example, 3, 17, 18 structure, 68
135
136 INDEX
A recurrent chain in a Markov process is a set of states connected by possible transitions where the system makes jumps indefinitely within this set but never exits it. Unlike a trapping state which is a single state where the system remains once entered, a recurrent chain consists of multiple states .
The z-transform method is beneficial for analyzing Markov processes because it circumvents the difficulties associated with multiple characteristic values of stochastic matrices. This approach simplifies otherwise complex discussions based on matrix theory, providing a more elegant mathematical handling of the process .
A completely ergodic Markov process is characterized by its limiting state probability distribution being independent of the starting conditions. This means the state-occupancy probabilities are the same regardless of the initial state when the number of transitions becomes very large .
Discounting affects policy decisions in continuous-time Markov processes by influencing the present value of expected rewards. It introduces a discount rate reflecting time preference, potentially altering the optimal policy by prioritizing gains available sooner rather than later, which affects the overall gain maximization strategy .
The Policy-Improvement Routine is used to find a policy with higher gain than the current one by maximizing a test quantity for each state based on relative values from a previous policy. This method iteratively updates policies to improve overall gain until an optimal policy is found .
A trapping state in a Markov process acts as an absorbing state where the system becomes stationary if entered, halting further state transitions. In sequential decision-making, entering a trapping state can irrevocably affect outcomes as all future decisions revolve around remaining in that state .
In continuous-time Markov processes, transition rates define the probability of transitioning from one state to another over a small time interval, which differs from discrete-time processes where fixed probabilities govern transitions at uniform intervals. Transition rates are analyzed through a differential matrix, leading to differential rather than difference equations .
In continuous-time Markov processes, policies adapt through policy-improvement routines by maximizing test quantities calculated from current values of the state. This involves evaluating alternatives for each state and updating to options that yield higher values, iteratively refining the policy to enhance system performance .
The Laplace transform is significant in solving continuous-time Markov processes as it transforms complex differential equations into simpler algebraic forms, facilitating the analysis of systems described by transition rate matrices. This method leverages knowledge from discrete-time processes to handle the continuous-time context .
When a Markov process has multiple recurrent chains, it implies that the process is not completely ergodic. The limiting state probability distribution depends on the starting state, as the system gets confined to the recurrent chain it enters initially and cannot transition between chains .