An Advanced Operations Research project solving the Traveling Tournament Problem (TTP) for the Brazilian Football Championship (Serie B). The solution utilizes Genetic Algorithms (GA) to minimize the total travel distance of 20 teams across a continental-sized country.
The Brazilian Serie B involves 20 teams playing a double round-robin tournament (380 matches total). Due to Brazil's continental dimensions, logistics are a critical cost driver and performance factor.
- The Goal: Construct a schedule that minimizes total travel distance while satisfying strict CBF (Brazilian Football Confederation) constraints.
- Complexity: The problem is modeled as a variation of the TTP, known to be NP-Hard.
Unlike standard scheduling, this project separates the problem into two layers:
- Opponent Sequencing: Generated via the Polygon Method (Canonical 1-factorization).
- Home/Away Assignment: Optimized via a Genetic Algorithm to find the best travel patterns.
- Population: 200 Chromosomes
- Generations: 1000
- Crossover Rate: 80%
- Mutation Rate: 5%
- Selection: Tournament Method
- Fitness Function: Total Distance + Penalties (for rule violations)
The model was benchmarked against the official CBF schedule and historical data.
| Metric | Official Schedule | Optimized Model (GA) | Improvement |
|---|---|---|---|
| Total Distance | ~880,515 km | ~777,721 km | -10.91% |
| Logistics Efficiency | Low | High | Verified |
Impact: The solution achieved a reduction of approximately 102,794 Km in total travel distance compared to the official table, demonstrating significant potential for cost savings and player fatigue reduction.
- Language: Python
- Libraries: NumPy (Matrix operations), Math (Haversine distance).
- Logic: Evolutionary Computation, Combinatorial Optimization.
- Clone the repo:
git clone [https://github.com/SeuUsuario/ttp-serie-b-solver.git](https://github.com/SeuUsuario/ttp-serie-b-solver.git)
- Run the Optimizer:
python src/genetic_algorithm.py
- Output: The script prints the best schedule found, the total distance, and validation of constraints.
Caio Toledo
Academic Advisor: Júnior César Bonafim - FATEC Ribeirão Preto