How I Built an AI Timetable Generator (SIH Project)

2025-08-15

Introduction

During my Smart India Hackathon (SIH) project, my team and I faced a complex scheduling challenge: how do we automatically generate conflict-free timetables for colleges while satisfying hundreds of academic, infrastructural, and NEP-based constraints?

A typical timetable involves multiple departments, subjects, faculty availability, classroom capacities, lab requirements, and optional courses. Creating this manually can take days and still lead to clashes. This inspired me to build an AI-driven Timetable Generator capable of producing optimized schedules in minutes.


Why a Genetic Algorithm?

Timetabling is a mix of constraint satisfaction and optimization. Traditional approaches break down because the search space is massive, hard constraints must always be met, and soft constraints improve the overall quality.

Genetic Algorithms (GAs) excel because they explore large solution spaces, evolve solutions over generations, and avoid local optima through mutation and crossover.


System Architecture

Backend

Frontend


How the Algorithm Works

Chromosome Structure

Each chromosome represents a full timetable encoded as: course → faculty → room → day → time slot

Selection

Tournament selection picks the best-performing schedules.

Crossover

Swapping timetable segments creates new potential solutions.

Mutation

Random adjustments maintain diversity in the population.

Fitness Calculation

Penalties are applied for:


Results


Conclusion

Building this AI Timetable Generator helped me combine Genetic Algorithms, FastAPI, optimization logic, and full-stack engineering to solve a real-world scheduling problem. It remains one of my most impactful and technically challenging projects.