🚕 Taxi-v3 — Q-Learning Agent
A tabular Q-Learning agent trained on Gymnasium's Taxi-v3 environment.
The agent starts from a randomly generated state where the taxi, passenger, and destination may be in different locations. It learns how to navigate to the passenger, pick them up, and deliver them to the correct colored destination while avoiding unnecessary moves and illegal pickup/dropoff actions. During training, it uses an epsilon-greedy strategy to balance exploration with exploitation and learns the best action for each state through a Q-Table.
Started with random rides. Ended with almost optimal routes. 🚕💨
⚙️ Training
| Configuration | Value |
|---|---|
| Environment | Taxi-v3 |
| Algorithm | Tabular Q-Learning |
| Training Episodes | 10,000 |
| Learning Rate (α) | 0.7 |
| Discount Factor (γ) | 0.95 |
| Initial Epsilon | 1.0 |
| Minimum Epsilon | 0.01 |
| Epsilon Decay | 0.999 |
| Framework | Gymnasium |
📊 Results
| Metric | Result |
|---|---|
| Mean Reward | 7.84 |
| Standard Deviation | 2.62 |
| Evaluation Score (Mean − Std) | 5.22 |
| Success Rate | 100% |
| Average Steps | 13.16 |
| Optimal Route Rate | 98.9% |
The learned policy required only 0.02 extra steps on average compared with shortest paths calculated using Breadth-First Search (BFS).
🔗 Course
Part of the Hugging Face Deep RL Course — Unit 2.
Built as an educational reinforcement learning project based on the Hugging Face Deep RL Course.
Evaluation results
- mean_reward on Taxi-v3self-reported7.84 +/- 2.62