5.1.6 · HinglishReinforcement Learning Foundations

Discount factor and returns

2,046 words9 min readRead in English

5.1.6 · AI-ML › Reinforcement Learning Foundations


HUM KYA define kar rahe hain?

  • myopic agent: sirf immediate reward matter karta hai.
  • far-sighted agent: door ke rewards bhi almost utna hi count karte hain jitna paas ke.

HUM DISCOUNT KARTE HI KYUN HAIN?

Teen independent reasons, sab ek hi direction mein point karte hain:

  1. Mathematical convergence. Un tasks mein jo kabhi khatam nahi hote (continuing tasks), infinite ho sakta hai. se discounting sum ko finite rakhti hai (neeche prove kiya gaya hai).
  2. Future ke baare mein uncertainty. ko ek "survival probability" ki tarah socho — har step par ek chance hai ki process ruk jaaye. Woh reward jo tumhe shayad milega hi nahi, usse kam count karna chahiye.
  3. Preference / economics. Interest rates ki tarah: paisa (reward) abhi reinvest ho sakta hai, isliye genuinely worth zyada hai baad mein same amount se.

KAISE: bounded-return result scratch se derive karo

Claim: Agar har reward bounded hai, , aur , toh finite hai.

Step 1 — Har term ko bound karo. Yeh step kyun? Triangle inequality absolute value ko andar le jaati hai, phir hum har reward ko uske worst case se replace kar dete hain.

Step 2 — Geometric series sum karo. Maano . se multiply karo: Yeh step kyun? Ek shifted copy subtract karne se beech ke saare terms telescope ho jaate hain — classic geometric-series trick, valid hai kyunki se ho jaata hai.

Step 3 — Combine karo. Toh return finite hai. Dhyan do: jaise , yeh bound blow up ho jaata hai — long horizons mein care chahiye.


Figure — Discount factor and returns

Effective horizon ( ka 80/20)

Weights geometrically shrink hote hain. Do related "horizon" numbers saamne aate hain — inhe confuse mat karo:

1. scale. Yeh (total weight) ki value hai aur woh characteristic scale hai jiske upar weights -ish tak decay hote hain. Yahi number usually rough planning horizon ke roop mein quote kiya jaata hai.

2. True mean step jisko tum dekh rahe ho. Weights ko ek probability distribution mein normalize karo (inki sum 1 hai). Iska mean index hai: Yeh step kyun? use karke aur normalizer se multiply karne par milta hai — dhyan do numerator mein extra hai, isliye mean se ek kam hai.

(scale) (mean step) roughly matlab
"agle ~10 steps"
"agle ~100 steps"
"bahut short-sighted"

Worked examples


Common mistakes (Steel-manned)


Flashcards

RL mein return kya hota hai?
Step se total discounted future reward: .
kaun se reward index se start hota hai, aur kyun?
se — reward time par action ke baad milta hai.
Discount factor kya hai aur iska range kya hai?
mein ek weight jo scale karta hai ki future rewards kitna count karein; har future step ek extra se multiply hota hai.
kya produce karta hai?
Ek myopic agent jo sirf immediate reward ki care karta hai.
kya produce karta hai?
Ek far-sighted agent jo distant rewards ko almost utna hi weight karta hai jitna near ones ko.
Return ki recursive form kya hai?
.
Episodic task mein return recursion ko kaun si terminal condition chahiye?
Final reward ke baad (termination ke baad kuch nahi aata).
Bounded reward ke saath ka upper bound kya hai?
.
Geometric series ka sum kya hai?
jab .
ke saath hamesha constant reward ka return kya hai?
.
Kisi diye gaye ke liye decay-scale horizon kya hai?
(total weight / characteristic scale).
Normalized discount weights ke under mean step index kya hai?
(decay scale se ek kam; par agree karte hain).
Continuing tasks mein discount kyun karte hain?
Infinite reward sum ko finite (convergent) rakhne ke liye.
Kya bada hamesha return badhata hai?
Nahi — yeh future ko amplify karta hai, isliye net-negative future rewards ke saath return ghatta hai.

Recall Feynman: 12-saal ke bachche ko explain karo

Socho tum candies collect kar rahe ho. Jo candy tumhe abhi milti hai usse tum pakka enjoy kar sakte ho. Jo candy koi agle hafte dene ka promise karta hai woh thodi kam worth hai — shayad tum shift kar jao, shayad woh bhool jaaye. Toh tum decide karte ho "agle hafte ki candy aaj ki candy ka 90% worth hai." Uske agli hafte, 90% ka 90%, aur aise chalte jaata hai. Return bas yahi hai — apni saari future candies ko add karo, door waali ko shrink karne ke baad. (jaise ) tumhara "kitna future par trust karta hoon" number hai.

Connections

  • Markov Decision Process — returns MDP trajectories par define hote hain.
  • Value functions and Bellman equations directly par build hota hai.
  • Episodic vs continuing tasks — decide karta hai ki allowed hai ya nahi.
  • Reward hypothesis's kya represent karte hain.
  • Geometric series — woh math jo convergence aur horizon ko power karta hai.
  • Temporal Difference learning — return ko bootstrap karne ke liye recursive form use karta hai.

Concept Map

summed into

weights

equals 0 gives

near 1 gives

justify

less than 1 enables

yields

proven finite by

peel first term

leads to

Future rewards

Return Gt

Discount factor gamma

Myopic agent gamma=0

Far-sighted gamma to 1

Why discount

Geometric series sum

Bounded return Rmax over 1-gamma

Recursive form Gt = Rt+1 + gamma Gt+1

Bellman equation