



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!




1
Reinforcement Learning
2
3
Sequential Decisions
4
g
Sequential Decisions
Sequential Decisions
6
Right might end up with you actually going Right, Right, Up, Up, Right with probability (0.1 4 )(0.8)=0.
Transition Model
7
reaching state s from s depends only on s and not on the history of earlier states (aka The Markov Property)
Markov Property Example
Suppose s 0 = (1,1), s 1 = (1,2), s 2 = (1,3)
s If I go right from state s^2 , the
s (^1)
s 2 s (^3)
8
2 probability of going to s 3 only depends on the fact that I am at state s 2 and not the entire state history {s 0 , s 1 , s 2 }
s (^0)
The Reward Function
9
Utility Function Example
R(4,3) = +1 (Agent wants to get here) R(4,2) = โ 1 (Agent wants to avoid this R(s) = โ0.04 (for all other states) U(s 1 , โฆ, sn) = R(s 1 ) + โฆ + R(sn)
10
If the states an agent goes through are Up, Up, Right, Right, Right, the utility of this environment history is: -0.04-0.04-0.04-0.04-0.04+
Utility Function Example
If thereโs no uncertainty, then the agent would find the sequence of actions that maximizes the sum of the rewards of the visited states
11
Markov Decision Process
The specification of a sequential decision problem for a fully observable environment with a Markovian transition model and additive rewards is called a Markov Decision Process (MDP) A MDP h th f ll i t
12
An MDP has the following components:
Nonstationary Policies
19
Utility of a State Sequence
Under stationarity, there are two ways to assign utilities to sequences:
20
U(s 0 , s 1 , s 2 , โฆ) = R(s 0 ) + R(s 1 ) + R(s 2 ) + โฆ
The Discount Factor
21
Utilities
We assume infinite horizons. This means that if the agent doesnโt get to a terminal state, then environmental histories are infinite, and utilities with additive rewards are infinite. How do we deal with this? Discounted rewards makes utility finite. A i l t ibl d i R d 1
22
Assuming largest possible reward is Rmax and ฮณ < 1 ,
max max 0
0
0 1 2
ฮณ
ฮณ
ฮณ
โ
โ โ =
R R
Us s s Rs
t
t
t t
t
Computing Optimal Policies
23
The Optimal Policy
โฅ โฆ
โค โข โฃ
โก โ
โ
0
( ) | t
t E ฮณ t^ Rs ฯ
24
โฃ t = 0 โฆ
โฅ โฆ
โค โข โฃ
โก = (^) โ
โ
= 0
t ฯ E ฮณ t^ Rs ฯ ฯ
25
evaluate all policiesโฆtoo many of them
26
( ) g
Start at state (1,1). Letโs suppose we choose the action Up.
27
Reward for current state
Start at state (1,1). Letโs choose the action Up.
Prob of moving up
Prob of moving right
Prob of moving left (into the wall) and staying put
Now letโs throw in the
29
discounting factor
U(1,1) = R(1,1) + ฮณ* 0.8U(1,2) + ฮณ 0.1U(2,1) + ฮณ 0.1*U(1,1)
'
( ) () (, , ') (') s
If we choose action a at state s, expected future rewards (discounted) are:
Reward at current state s Probability of moving from state s to state sโ by doing action a Expected sum of future discounted rewards starting at state sโ
Expected sum of future discounted rewards starting at state s