https://github.com/mohankrishnagr/reinforcement-learning-taxi-v3
A comprehensive solution to the Classic Taxi Problem using Reinforcement Learning (RL) and OpenAI Gym (Taxi-v3). This repository includes Python code for Q-learning implementation, a detailed presentation, and visualizations to demonstrate the agent's learning process. Perfect for anyone exploring RL concepts, Q-learning, or Gym environments.
https://github.com/mohankrishnagr/reinforcement-learning-taxi-v3
artificial-intelligence openai-gym python q-learning reinforcement-learning rl-algorithms taxi-problem
Last synced: 2 months ago
JSON representation
A comprehensive solution to the Classic Taxi Problem using Reinforcement Learning (RL) and OpenAI Gym (Taxi-v3). This repository includes Python code for Q-learning implementation, a detailed presentation, and visualizations to demonstrate the agent's learning process. Perfect for anyone exploring RL concepts, Q-learning, or Gym environments.
- Host: GitHub
- URL: https://github.com/mohankrishnagr/reinforcement-learning-taxi-v3
- Owner: MohanKrishnaGR
- Created: 2025-01-18T17:43:08.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-18T18:17:16.000Z (over 1 year ago)
- Last Synced: 2025-03-27T02:16:06.410Z (about 1 year ago)
- Topics: artificial-intelligence, openai-gym, python, q-learning, reinforcement-learning, rl-algorithms, taxi-problem
- Language: Python
- Homepage:
- Size: 1.07 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Reinforcement-Learning-Taxi-v3
This repository tackles the Taxi-v3 problem from OpenAI Gym, a classic gridworld challenge in Reinforcement Learning (RL). The project demonstrates:
* Training an RL agent using the Q-learning algorithm.
* Visualization of the environment with step-by-step agent actions.
* Insights into the reward system, exploration-exploitation strategies, and training hyperparameters.
Whether you're a student, researcher, or RL enthusiast, this repository provides an accessible starting point for learning RL concepts and applying them in simulated environments.
# π Classic Gym's Taxi Problem: A Reinforcement Learning Case Study
Here's an demonstration on how to solve the **Taxi-v3 problem** using **Reinforcement Learning (RL)**. The project explores Q-Learning, a model-free RL algorithm, and uses **OpenAI Gym** to simulate the Taxi environment. (Refer slides)
### Problem visualization:

## π Repository Contents
- **Code**: Python implementation for training and testing the taxi agent using Q-learning.
- **Presentation**: A detailed PowerPoint presentation explaining the problem, solution approach, and results.
- **Environment Setup**: Instructions to set up the environment for running the code.
---
## π Problem Overview
The Taxi problem involves navigating a taxi through a grid to:
1. **Pick up** a passenger from a designated location.
2. **Drop off** the passenger at the destination.
3. Optimize actions to maximize rewards.
### **Key Concepts**
- **State Space**: Taxi position, passenger location, and destination.
- **Action Space**: Move (North, South, East, West), Pick Up, Drop Off.
- **Rewards**: Positive for successful drops, negative for invalid actions, and step penalties.
---
## π οΈ Getting Started
### Prerequisites
1. **Python** (>=3.7)
2. **OpenAI Gym** (tested with version 0.16.0)
3. **NumPy**
### Installation
1. Clone the repository:
```bash
git clone https://github.com/MohanKrishnaGR/Reinforcement-Learning-Taxi-v3.git
cd Reinforcement-Learning-Taxi-v3
```
2. Install dependencies:
```bash
pip install gym==0.16 numpy
```
---
## π Running the Code
1. Run the Python script:
```bash
python taxi_problem.py
```
2. Watch the agent learn and test the trained model.
---
## π Results
* **Training**: The agent learns the optimal policy over multiple episodes using the Q-learning algorithm.
* **Testing**: The trained agent successfully navigates the gridworld to maximize rewards.
* **Visualization**: The environment is rendered step-by-step to visualize the agentβs behavior after training.
---
## π Presentation
The PowerPoint presentation provides:
* An introduction to Reinforcement Learning and the Taxi Problem.
* A walkthrough of Q-learning and its application to the problem.
* Results with key takeaways.
---
### End Note
Thank you for your interest in this project! We welcome any feedback. Feel free to reach out to us.