Skip to content

Finding the optimal route that a taxi has to take to pick up and drop a customer

Notifications You must be signed in to change notification settings

pranav-0309/taxi_route_optimization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crowded city

In the quest for efficiency and effectiveness in urban transportation, finding the optimal routes to take passengers from their initial locations to their desired destinations is paramount. This challenge is not just about reducing travel time; it's about enhancing the overall experience for both drivers and passengers, ensuring safety, and minimizing environmental impact.

The goal of this task is to revolutionize the way taxis navigate the urban landscape, ensuring passengers reach their destinations swiftly, safely, and satisfactorily. A reinforcement learning agent needs to be built that solves this problem within a simulated environment.

The Taxi-v3 environment

The Taxi-v3 environment is a strategic simulation, offering a grid-based arena where a taxi navigates to address daily challenges similar to those faced by a taxi driver. This environment is defined by a 5x5 grid where the taxi's mission involves picking up a passenger from one of four specific locations (marked as Red, Green, Yellow, and Blue) and dropping them off at another designated spot. The goal is to accomplish this with minimal time on the road to maximize rewards, emphasizing the need for route optimization and efficient decision-making for passenger pickup and dropoff.

Key Components:

  • Action Space: Comprises six actions where 0 moves the taxi south, 1 moves north, 2 moves east, 3 moves west, 4 picks up a passenger, and 5 drops off a passenger.
  • Observation Space: Comprises 500 discrete states, accounting for 25 taxi positions, 5 potential passenger locations, and 4 destinations.
  • Rewards System: Includes a penalty of -1 for each step taken without other rewards, +20 for successful passenger delivery, and -10 for illegal pickup or dropoff actions. Actions resulting in no operation, like hitting a wall, also incur a time step penalty.

Taxi-v3 environment snapshot

All my code is written in the notebook.ipynb file, do check it out! and have a look at the output stored in taxi_agent_behavior.gif.

About

Finding the optimal route that a taxi has to take to pick up and drop a customer

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages