




























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





























(Agent
wants
to^
get
here)
1 (Agent
wants
to^
avoid
this
R(s)
(for
all
other
states)
U(s
s^ )n
=^ R(s
+^ R(s
)n If^ the
states
an^ agent
goes
through
are^
Up,^ Up,
Right,
Right,
Right,
the^
utility
of^ this
environment
history
is:^ ‐0.
‐0.
‐0.
‐0.
‐
0 04+1 0 .04+
CS^
2
The
specification
of^
a^ sequential
decision
problem
for
a^ fully
p^
q^
p^
y
observable
environment
with
a^ Markovian transition
model
and
additive
rewards
is^ called
a^ Markov
Decision
Process
(MDP)
An^
MDP
has
the
following
components:
1
A finite set of states S along with an initial state S
1.^
A^ finite
set
of^
states
S^ along
with
an^
initial
state
S^0
2.^
A^ finite
set
of^
actions
A
3.^
Transition
Model:
T(s,
a,^ s’)
=^ P(
s’^ |
a,^ s
)
( ,^
,^ )
(^
|^ ,
)
4.^
Reward
Function:
R(s)
CS^
4
Up [1,1]
‐Up [1,2]
‐Up [1 3] Ri ht[1,3]
‐Right [2,3]
‐Right [^
h
[3,3]
‐Right What
if^ we
ended
up
in^ cell
[2,1]?
CS^
5
-^ There
are
obviously
many
different
policies
for
an^
MDP
-^ Some
are
better
than
others
‐‐‐^
we^
would
like
to^
find
the
“best”
one,
i.e.,
the
optimal
policy
π*
-^ How
do^
we^
evaluate
a^ p
olicy?p
y
-^ We
can
look
at^ the
state
sequence
it^ produces
and
compute
its^ utility • But
every
time
we
start
at^ the
initial
state
and
execute
a
y policy,
we
get
a^ different
state
sequence
(due
to^
the
stochastic
nature
of^ the
environment)
-^ This
means
we
get
a^ different
utility
every
time
we
execute
a
g^
y^
y
policy • Need
to^
measure
the
expected
utility (the
utility
we
will
obtain
on^
average
if^ we
apply
the
policy
for
many
times)
CS^
7
R(s)=
‐0.04^ Notice
the^
tradeoff
between
risk^
and^
reward!
CS^
8
-^ Finite
horizon:
fixed
time
N^ after
which
nothing
matters (think of this as a deadline)matters
(think
of^
this
as
a^ deadline)
-^ Suppose
our
agent
starts
at^
R(s)=
and
Then
to
get
to^
the
state,
agent
must
go
up. • If^ N=100,
agent
can
take
the
safe
route
around
CS^
10
-^ Nonstationary
policy
π^ (s, t): the action to take
Nonstationary
policy
π^ (s,
t):
the
action
to
take
depends
both
on
s^ (the
state)
and t
(how
many
time
steps
are
remaining)
-^ With
a^ finite
horizon,
the
optimal
policy
is^ nonstationary
-^ With
an
infinite
horizon,
there
is^ no
incentive
to
behave
differently
in^
the
same
state
at^
different
times
-^ With
an
infinite
horizon,
the
optimal
policy
is^ stationary
(π^ (s)) • We
will
assume
infinite
horizons
and
stationary
policies
CS^
11
We
can
discount
future
rewards,
and
define
the
utility
of a state sequence as:of^ a
state
sequence
as:
U(s
,^ s 0
,^ s 1
,^ …) 2
=^ R(s
)^ + 0 γR(s
)^ + 1
(^2) γR(s
)^ + 2 …
Where 0
≤^ γ
≤^ 1 is the discount factor
Where
γ^ ≤
1 is
the
discount
factor
Assuming
largest
possible
reward
is^ R
max
and
γ^ <
∞
)(
,...), ,(
(^0) max (^21) 0
∞
∞ = R R
sR
ss sU t
t t
t
Discounted
rewards
are
always
finite,
even
for
infinite
) max (^1) ( max 0
γ
γ^
R t
t
CS^
13
y^
state
sequences!
-^ Describes
preference
for
current
rewards
over
future
p
rewards • Compensates
for
uncertainty
in^
available
time
d l
l^
(models
mortality)
-^ Eg.
Being
promised
next
year
is^ only
worth
90% of being promised $10000 now90%
of^
being
promised
now
-^ γ
near
0 means
future
rewards
don’t
mean
anything
-^ γ
= 1 makes discounted rewards equivalent to theγ =^1
makes
discounted
rewards
equivalent
to^
the
simple
additive
rewards
CS^
14
How
(not)
to
computing
optimal
policies
(^
)^
p^
g^
p^
p
-^ Enumerate policiesEnumerate
-^ Caculate
-^ E.g.,
by
simulating
a^ bunch
of^
runs,
average
their
final
utilities
-^ Choose
CS^
16
-^ Idea: some states are better than the others, a goodIdea:
some
states
are
better
than
the
others,
a^ good
policy
may
be
“try
to^
get
to^
a^ good
states”
is^ better
than
because
it^ is
closer
to^
the
goal
state
?
?
CS^
17
Start
at^
state
Let’s
suppose
we
choose
the
action
Up.
+^ ... Reward for current state
CS^
19
Reward
for^ current
state
Start
at^
state
Let’s
h^
h^
i
choose
the
action
Up. b^ f^
h
Prob
of^ moving
right
Prob of moving up
Prob of moving left (into the wall)
Prob
of^ moving
up^
Prob
of^ moving
left^
(into
the^
wall)
and^
staying
put
20
CS^