← All projects
Python Intermediate

Timetabler

Timetable generator with a genetic algorithm

Generate clash-free college timetables that respect teacher availability, room sizes and lab slots.

SHIPSTACK · PROJECT Timetabler Timetable generator with agenetic algorithm Intermediate Python 1 Inputs 2 Population 3 Evolve 4 Best timetable 5 milestones

The scenario

Timetabler encodes a timetable as a chromosome and evolves it: hard constraints (no clashes, room capacity) and soft ones (no back-to-back labs, teacher preferences) become a fitness score. A small web UI lets you edit constraints and export the result.

System architecture

01 Inputs Courses, rooms, teachers
02 Population Random timetables
03 Evolve Select · cross · mutate
04 Best timetable Export

High-level flow of Timetabler, from input to output.

What you will learn

  • Genetic algorithms from scratch
  • Encoding constraints as fitness
  • Performance tuning in Python

What you will build

  • GA engine
  • Constraint editor
  • Export to PDF/Excel

Build plan

  1. Data model
  2. Fitness function
  3. GA loop
  4. UI
  5. Export

Tech stack

PythonNumPyFastAPIHTMX