Reinforcement Learning: Russell and Norvig: CH 21
Reinforcement Learning: Russell and Norvig: CH 21
Reinforcement Learning: Russell and Norvig: CH 21
Reinforcement Learning
Supervised (inductive) learning is the simplest and
most studied type of learning
How can an agent learn behaviors when it doesnt
have a teacher to tell it how to perform?
Reinforcement Learning
(cont.)
The goal is to get the agent to act in the
world so as to maximize its rewards
The agent has to figure out what it did that
made it get the reward/punishment
Reinforcement learning on
the web
Nifty applets:
for blackjack
for robot motion
for a pendulum controller
Formalization
Given:
a state space S
a set of actions a1, , ak
reward value at the end of each trial
(may be positive or negative)
Output:
Policy
(Reactive/Closed-Loop
Strategy)
3
+1
-1
1
1
Approaches
Learn policy directly function
mapping from states to actions
Learn utility values for states (i.e.,
the value function)
Value Function
The agent knows what state it is in
The agent has a number of actions it can
perform in each state.
Initially, it doesn't know the value of any of the
states
If the outcome of performing an action at a
state is deterministic, then the agent can
update the utility value U() of states:
Exploration
The agent may occasionally choose to explore
suboptimal moves in the hopes of finding better
outcomes
Q-Learning
Q-learning augments value iteration
by maintaining an estimated utility
value Q(s,a) for every action at every
state
The utility of a state U(s), or Q(s), is
simply the maximum Q value over all
the possible actions at that state
Learns utilities of actions (not states)
model-free learning
Q-Learning
foreach state s
foreach action a
Q(s,a)=0
s=currentstate
do forever
a = select an action
do action a
r = reward from doing a
t = resulting state from doing a
Q(s,a) = (1 ) Q(s,a) + (r + Q(t))
s=t
The learning coefficient, , determines how quickly our
estimates are updated
Normally, is set to a small positive constant less than 1
Selecting an Action
Simply choose action with highest
(current) expected utility?
Problem: each action has two effects
Exploration policy
Wacky approach (exploration): act
randomly in hopes of eventually
exploring entire environment
Greedy approach (exploitation): act to
maximize utility using current estimate
Reasonable balance: act more wacky
(exploratory) when agent has little idea
of environment; more greedy when the
model is close to correct
Example: n-armed bandits
RL Summary
Active area of research
Approaches from both OR and AI
There are many more
sophisticated algorithms that we
have not discussed
Applicable to game-playing, robot
controllers, others