Uses the current Q-table to select an action. During training it usually chooses the best-known action, but sometimes explores.
1 · The environment: vacuum-cleaner world
Untrained agentThe agent starts each training episode in the same room. It receives rewards for cleaning and a penalty for each action. Obstacles are fixed.
Learning progress
No training episodes yet.
Recent experience
- The agent is ready. Try one action or train an episode.
2 · Inside the learning agent (Russell & Norvig architecture)
Compares observed outcomes with the performance standard
Observe location and dirt in the current cell
Updates Q-values from reward and experience
Chooses an action using the current Q-values
Suggests exploratory actions to discover better behaviour
Move or vacuum · action changes the environment
The room changes when the agent moves or cleans
Train the agent or perform one action. The highlighted components show which parts of the learning-agent architecture are involved.
Performance standard and critic
Performance standard: clean all five dirty locations using as few actions as possible.
| Event | Critic's feedback |
|---|---|
| Clean a dirty cell | +10 reward |
| Each action | −1 cost |
| Clean the whole room | +20 completion bonus |
| Episode exceeds 80 actions | −10 timeout penalty |
What is the agent learning?
The performance element uses a Q-table: an estimate of the long-term value of each action in each state. The learning element updates it using the temporal-difference rule.
Q(s,a) ← Q(s,a) + α [r + γ max Q(s′,a′) − Q(s,a)]
Recent learning signals
Observes the result and evaluates it against the performance standard, producing a numerical reward.
Uses the reward and next state to update Q-values, improving future action selection.
Encourages actions that gather useful experience. Here, ε controls the chance of trying a random action.