How to Play

Game Instructions

1 Understand the Challenge

The Capacitated Vehicle Routing Problem (CVRP) is a logistics optimization problem: Find the most efficient routes for a fleet of vehicles with limited capacity to serve all customers and return to the depot.

This is an extension of the Traveling Salesperson Problem with additional constraints: each customer has a demand, and your vehicles have limited capacity. You'll need to balance:

  • Minimizing the total distance traveled
  • Minimizing the number of vehicles used
  • Ensuring no vehicle exceeds its capacity

2 Choose Your Difficulty

Select a difficulty level from the dropdown menu:

  • Beginner: Vehicle capacity of 25 - Good for learning
  • Medium: Vehicle capacity of 50 - Moderate challenge
  • Hard: Vehicle capacity of 100 - Difficult optimization
  • Expert: Vehicle capacity of 200 - Very challenging
  • Custom: Set your own capacity and number of customers

Each customer's demand is randomly generated based on the vehicle capacity. Higher capacities mean more complex routes.

Tip:

For beginners, start with the "Beginner" level to learn the mechanics, then gradually increase the difficulty.

3 Understand the Map

On the game board, you'll see:

  • Depot: The purple square where all vehicles start and end their routes
  • Customers: Circles with numbers inside showing each customer's demand
  • Routes: Colored lines showing the paths your vehicles follow

The capacity bar at the top shows how much cargo your current vehicle is carrying relative to its maximum capacity.

Map Strategy:

Try to group nearby customers with similar demands into the same route to minimize vehicle trips.

4 Build Your Routes

To create routes:

  1. Each vehicle starts at the depot (purple square)
  2. Click on customers to add them to your current route
  3. Watch your vehicle's capacity - don't exceed the maximum!
  4. Return to the depot to complete the current route
  5. A new vehicle will automatically start from the depot
  6. Continue until all customers are served

As you build routes, customers change color to show they've been visited, and the capacity bar updates.

Capacity Management:

If you're about to exceed capacity, you can either return to the depot to finish your route or use the "Undo" button to change your last selection.

5 Complete All Routes

Your goal is to serve all customers using the fewest vehicles and shortest total distance.

After all customers are served, the game shows your performance compared to algorithmic solutions.

Your score considers both total distance and number of vehicles used.

6 Compare with Algorithms

The game provides three algorithm solutions for comparison:

💰 Clarke-Wright Savings

A classic CVRP algorithm that starts with individual routes and merges them based on "savings" when combined.

🧭 Sweep Algorithm

A geometric approach that clusters customers by angle from the depot, then solves TSP for each cluster.

🚀 Enhanced Solution

Uses multiple optimization techniques including local search and advanced route improvement for a high-quality solution.

Challenge:

Try to beat the Sweep Algorithm first, then aim for the Clarke-Wright solution. Beating the Enhanced Solution is extremely difficult and often requires multiple attempts!

7 Game Controls

Use these controls to aid your gameplay:

  • Undo Last: Remove the last location from your current route
  • Reset Route: Clear your current vehicle's route
  • Finish Route: Return to depot and complete current route
  • Clear All Routes: Start over with all routes
  • Location Size: Adjust the size of locations for better visibility
  • Algorithm Buttons: View solutions from each algorithm

Why CVRP Matters

The Capacitated Vehicle Routing Problem has important real-world applications:

By playing this game, you're experiencing the same challenges faced by logistics planners worldwide!

Play Now!