Reinforcement Learning
The agency wants software that adjusts a listing's asking rent each week. Nobody can hand it a table of "correct" prices; the only feedback arrives later, when a tenant signs or the flat sits empty. Learning from delayed rewards, by trial and error, is reinforcement learning (RL).
The rule
An agent acts, the world replies with reward; learn actions that maximise total reward.
The parts, for the pricing problem:
- Agent: the pricing program.
- Environment: the rental market it acts in.
- State: what the agent knows now: weeks listed, current asking rent, enquiries so far.
- Action: raise by ₹1 thousand, keep, or lower by ₹1 thousand.
- Reward: a number after each step, such as the rent earned when a tenant signs, minus a penalty for every empty week.
- Policy: the agent's rule for choosing an action in each state. This is what RL learns.
Unlike supervised learning, the agent is never told the right action. It only sees a reward after acting, and rewards may come many steps later. Future rewards are usually discounted by a factor between 0 and 1, because a reward sooner is worth more. With and rewards 0, 0, 22 over three weeks, the return is
The central tension is exploration versus exploitation. Exploiting means choosing the action the agent currently rates best. Exploring means trying something else, in case it is better. An agent that only exploits never discovers that a lower price might fill the flat two weeks sooner. A simple balance is ε-greedy: with probability ε (say 0.1) pick a random action, otherwise pick the best-known one.
Methods such as Q-learning estimate the value of each action in each state from experience, and the policy then picks the highest-valued action. The same ideas power game-playing agents and robot controllers.
The shortcut
Find the agent, the actions and the reward. If you cannot name a reward that arrives after acting, it is not RL.
Week 1
State: new listing at 24. The agent keeps the price. No tenant: reward 0.
Drills
Answer fast — trust the rule.
Which of these is a reinforcement learning problem?
With discount 0.9, the rewards over three steps are 0, 0 and 22. What is the discounted return?
An ε-greedy agent uses ε = 0.1. What share of its actions are random?
What is the key difference from supervised learning?
Remember
- An agent acts, the world replies with reward; learn actions that maximise total reward.
- Shortcut: name the agent, the actions and the reward.
- Trap: an agent that never explores, and so never finds a better action.
