Skip to content
Koza-TTP

Demo · Fair travel between teams

Generate a calendar and Measure how much each team travels.

La IA (programación genética) busca calendarios donde el viaje sea corto y parejo. ¿Quieres tus propios equipos? Usa la guía de 5 pasos.

Optimization results

Click the tree to expand

Total Travel Cost:7934.38 km
Rule Violations:0

Run optimization

It takes a few seconds.

Note: the thesis version didn't beat a random calendar. The new engine did, in preliminary tests. For a school project, that's an advantage: you have a baseline and an improvement that you can measure.

Schedule: 4T2S6G

Date Local Away
11/05/2026 ARI PIT
11/05/2026 CHA WAS
12/05/2026 ARI PIT
12/05/2026 CHA WAS
13/05/2026 ARI PIT
13/05/2026 CHA WAS
14/05/2026 ARI CHA
14/05/2026 WAS PIT
16/05/2026 ARI CHA
16/05/2026 WAS PIT
18/05/2026 ARI WAS
18/05/2026 CHA PIT

Configuration 4

Population size:100
Number of generations:20
Probability of crossing:0.8
Mutation Probability:0.2

To introduce it to your team

The answers that you will be asked for in class.

  • Where is the AI?

    Genetic programming

    A calendar is a tree that evolves. The code is in programa_genetico/ and uses the DEAP library.

  • What patterns do you use?

    MVT, Facade, Template Method

    Django separates model, view, and template. ProgramaFacadeView It hides the engine behind a single input.

  • How do I adapt it?

    Change teams and rules

    Teams and coordinates are recorded in the guide. An idea for your team: use the Strategy pattern for the "fair trip" measure.

  • Can I use it?

    Yes, with GPL-3.0

    You can modify it. Keep the credit and cite the thesis. How to cite

Run it on your computer

git clone https://github.com/lespam/koza-ttp
cd koza-ttp
pip install -r requirements.txt
python manage.py migrate
python manage.py runserver

Ask your AI assistant for help

Copy this question and paste it into the wizard you use, along with the programa_genetico/programagenetico.py file.

Explain to me step-by-step how this genetic program creates and evaluates a schedule. Then tell me what you would change so that the measure of "fair travel" is the difference between the team that travels the most and the one that travels the least.

Check what it tells you against the code. AI can get it wrong.