





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!






S T U D E N T H A N D O U T · A R T I F I C I A L I N T E L L I G E N C E · W E E K 6
O N E - L I N E A N S W E R No. The MDP is the problem (the world and its rules). Q-Learning is one method to solve that problem.
Reinforcement Learning
Problem = MDP
Value Iteration model-based
Policy Iteration model-based
Q-Learning model-free SARSA · Deep Q Network
Figure 1 — The MDP defines the problem; algorithms like Q-Learning learn how to act within it.
02 What Exactly Is an MDP?
Component Meaning Warehouse-robot example
States S "Where am I right now?" Shelf A, Shelf B, Charging Station, Delivery Point
Actions A "What can I do next?" Move Left, Move Right, Pick Item, Drop Item
Transition T(s,a,s′)
P(s′|s,a) — where do I actually end up?
Move right → 95% actually moves right, 5% wheel slips
Reward R Was that move good or bad?
Deliver +100 · Collision −100 · Each step −
Discount γ How much are future rewards worth? 0 < γ < 1, e.g. γ = 0.
START
UP · 0.
slip · 0. stay · 0.
T(UP | START, UP) = 0. T(RIGHT | START, UP) = 0. T(START | START, UP) = 0. Σ = 1.0 ✓ Probabilities over all outcomes of one action always sum to 1.
Markov Property: the future depends only on the current state and action — never on how you got there. Google Maps doesn't need yesterday's route; it only needs where you are now. This is what makes MDPs tractable.
02a·ii Gamma in Plain Words
Before any formula, it helps to see γ as a simple human question. Gamma answers:
T H E Q U E S T I O N γ A N S W E R S “How much do I value something I get later ?”
L O W γ = 0. 5
You heavily reduce the value of future money.
₹100 today → ₹ 100 ₹100 much later → feels like a much smaller amount
H I G H γ = 0. 9 9
You don't reduce the value of future money very much.
₹100 today → ₹ 100 ₹100 later → still feels close to ₹ 100
Gamma does not change the actual money. If someone promises you ₹100 tomorrow, you still receive ₹ 100. Gamma only determines how valuable that future ₹100 is to you now , when making your decision.
You are a taxi driver right now. You have two offers:
Ride A (^) ₹ 10 takes 10 minutes Ride B (^) ₹ 70 takes 30 minutes
The environment says: Ride A pays ₹10, Ride B pays ₹70. Those rewards don't change. Gamma asks the driver a different question: “How much importance should I give to money I will receive later?”
W I T H L O W γ , T H E D R I V E R S A Y S
W I T H H I G H γ , T H E D R I V E R S A Y S
T H I N K O F γ A S A M I N D S E T
02a·iii Choosing γ: How Far Ahead Is the Payoff?
The choice of γ depends on how long the agent must wait for the rewards that matter. Problems that need a long sequence of decisions need patience-based decision making, so γ should be large. Problems where the payoff comes quickly can use a smaller γ.
Type of problem Suitable γ Why Long sequence of decisions reward arrives only at the end
high · 0.95–0.99 A higher γ preserves the value of the future reward, so it still influences the decision made today. Immediate / short-term decisions reward arrives within a few steps
lower · e.g. 0.5–0.9 Only the near future matters, so a lower γ is appropriate and makes learning faster and more stable.
Roughly, the agent pays attention to about 1 / (1 − γ) steps into the future.
γ = 0. ≈ 2 steps very short-sighted
γ = 0. ≈ 10 steps medium range
γ = 0. ≈ 100 steps far-sighted
This is why, on the next page, the γ = 0.9 driver loses interest in a ride that pays after 30 minutes, while the γ = 0.99 driver still values it.
The final goal, becoming a successful, established institution, may take many years and many decisions. A higher γ means the agent gives greater importance to that future outcome while making decisions today, rather than focusing only on immediate rewards.
L O W γ · S H O R T - S I G H T E D
H I G H γ · L O N G - S I G H T E D
No. A very high γ makes learning slower and less stable, because the agent must account for rewards far into the future. Pick γ to match how far ahead the important rewards really are.
O N E S E N T E N C E F O R T H E B O A R D γ does not tell us how much reward we get. γ tells us how much importance we give to future rewards when making a decision now.
03 Q-Learning and Q-Values
Restaurant
Road 1 20 min
Road 2 15 min
Road 3 8 min
Destination
REWARD PER ROAD Road 1: +100 − 20 = + Road 2: +100 − 15 = + Road 3: +100 − 8 = +
After many deliveries the rider's experience converges to these expected rewards — without ever being told the travel times.
EPISODE 0 — KNOWS NOTHING
State Road 1 Road 2 Road 3
Restaurant 0 0 0
→
AFTER MANY DELIVERIES State Road 1 Road 2 Road 3 Restaurant (^80 85 92) ★
Key insight: a Q-table does not store routes. It stores the quality (expected future reward) of each action in each state. By picking the highest Q-value at every state, the agent naturally follows the optimal route
without ever storing the path.
04 Route vs. Policy π*
ROUTE Restaurant → Road 3 → Destination A sequence of states and actions from start to goal. The blue line on Google Maps.
OPTIMAL POLICY π* : S → A Restaurant → go to Junction A Junction A → take Road 3 Junction C → go straight Destination → stop The voice guidance: "given your current state, do this." Take a wrong turn and it still knows the best action from wherever you are.
Remember: Route = one path. Policy π = a rule "state → action". Optimal policy π* = the best such rule — following it from any starting state produces the best route.
05 MDP vs. Q-Learning at a Glance
MDP — the problem Q-Learning — one solver
Defines the environment Learns how to act in the environment
Contains states, actions, rewards Learns values Q(s, a) for state–action pairs
Knows transition probabilities (part of the world) Never told them — discovers behaviour through experience
Static description; no learning Dynamic learning process (model-free)
Can also be solved by Value / Policy Iteration when T and R are known Assumes an underlying MDP exists
Every Q-Learning problem assumes an underlying MDP — but not every MDP is solved with Q-Learning. When the transition model and rewards are already known, model-based methods (Value Iteration, Policy Iteration) solve it directly.