Built to order

Automated Timetable Generator using Genetic Algorithm

This project builds an Automated Timetable Generator that uses a genetic algorithm to produce a clash-free timetable from subjects, teachers, rooms and constraints. The app runs the search live — tournament selection, crossover and mutation over 120 candidate timetables — rendering the winning grid with a fitness chart and constraint report. The demo build reached zero hard-constraint violations in 16–38 generations (median 27) over 10 seeded runs, each under a second. Suitable for B.E./B.Tech final-year projects in Computer Engineering and Information Technology.

Computer / IT GitHTML5 · CSS3 · JavaScriptCanvas APISingle-file appGenetic algorithm engineCSV export via Blob APIPrint-optimized CSSSoftware
Automated Timetable Generator using Genetic Algorithm — project thumbnail preview
More project photos (2)

The problem

Most college timetables are still assembled by hand: a coordinator juggles subject periods, teacher availability, room sharing and lab requirements in a spreadsheet, and every change risks a clash — a teacher booked in two rooms at once, or two divisions assigned the same lab. Timetabling is a combinatorial problem where the possible arrangements grow far faster than any exhaustive search can handle, which is why it is a classic application of evolutionary optimization. This project builds a web app that treats the weekly timetable as a search problem: a genetic algorithm evolves a population of candidate timetables, scoring each against the college's hard constraints, until it finds a fully clash-free schedule. The search runs live in the browser on realistic sample data — two divisions, seven subjects, six teachers, four rooms — with a fitness chart showing the population improving each generation, and the final grid rendered as printable weekly tables. Throughout, the project is honest: the genetic algorithm is an optimization technique, not AI, and the report explains selection, crossover, mutation and fitness design in defendable terms.

How it works

  1. The inputs are loaded — subjects with weekly periods, teachers with availability rules, shared rooms, and the six hard constraints; the demo ships a realistic two-division dataset.
  2. Each chromosome encodes a full weekly plan: a subject order per division plus room choices for all 50 slots; the initial population of 120 timetables is generated by random shuffling.
  3. Every timetable is scored: hard-constraint violations (teacher or room double-booked in a slot, blocked-day assignments, daily-load and lab-room rule breaks) carry heavy penalties, soft preferences add small ones, and fitness = 1 / (1 + total penalty).
  4. Tournament selection (size 3) picks parents, order crossover (rate 0.85) mixes subject orders, swap mutation (rate 0.12) reorders periods, and the 2 best timetables survive unchanged through elitism.
  5. Generations repeat — the fitness chart updates live — until a timetable scores zero hard-constraint violations (16–38 generations, median 27, measured in the demo build) or the 150-generation cap is reached.
  6. The winning timetable renders as color-coded weekly grids for each division with a constraint checklist, one-click CSV export and a print-ready layout.

Tech stack:

  • HTML5 · CSS3 · JavaScript (ES6)
  • Canvas API (fitness chart)
  • Genetic algorithm engine (vanilla JS)
  • CSV export via Blob API
  • Print-optimized CSS
  • Single-file app (no build step)
  • Git
Parameter Value
Timetable size 2 divisions × 25 slots (5 days × 5 periods per day)
Population 120 candidate timetables per generation (GA setting)
Convergence 16–38 generations, median 27 (measured across 10 seeded runs in the demo build)
Compute time Well under 1 second per run in the browser (measured; hardware-dependent)
Hard constraints 6 enforced (teacher/room clashes, lab-room minimums, blocked days, daily load, consecutiveness)
GA operators Tournament selection (size 3), order crossover (rate 0.85), swap mutation (rate 0.12), elitism (2)
Generation cap 150 per run (configurable)
Delivery Single-file HTML app, runs offline after download

Project features

  • [Live genetic-algorithm scheduler] A real evolutionary search runs in the browser: a population of 120 candidate timetables is scored, selected, crossed over and mutated until one scores zero hard-constraint violations.
  • [Realistic sample dataset] Two divisions, seven subjects with weekly periods, six teachers with availability rules, and four shared rooms (two lecture halls, two labs) — a believable college scenario preloaded.
  • [Fitness-history chart] Best and average fitness are plotted per generation as the search runs, making the optimization process visible and viva-friendly.
  • [Constraint report] The winning timetable is verified against every hard constraint and presented as a checklist with zero violations shown.
  • [Printable timetable grids] Color-coded weekly grids per division with subject, teacher and room in every cell, with print styling for a clean hard copy.
  • [CSV export] The complete schedule for both divisions downloads as a CSV in one click.
  • [Tunable GA parameters] Population size, crossover and mutation rates, tournament size and the generation cap are adjustable (configurable) for experimentation.

What is included

  • Complete scheduler web app (single-file HTML/CSS/JS) with the working genetic algorithm
  • Realistic sample dataset (2 divisions, 7 subjects, 6 teachers, 4 rooms, constraints)
  • Fitness-chart visualization and constraint-report screens
  • CSV export and print-ready timetable layouts
  • Project report PDF (background, GA theory, constraint modeling, methodology, measured results)
  • PPT presentation for final review
  • Viva Q&A preparation document (evolutionary algorithms, fitness design, operators, limitations)

Limitations & prerequisites

  • The genetic algorithm is a heuristic search, not an exact solver: it finds a valid timetable but cannot prove optimality, and different seeds produce different valid grids.
  • Soft preferences (spreading subjects across days, avoiding last-period labs) are minimized by the fitness function, not guaranteed to reach zero.
  • The demo ships one fixed sample dataset; a real college with many more divisions scales the search space and needs the tunable parameters adjusted.
  • Very tight constraint sets (too few rooms for the slot count, for example) can exhaust the 150-generation cap without a fully clash-free result — the app reports the remaining violations instead of hiding them.
  • Browser compute time is hardware-dependent; the measured sub-second runs apply to the demo build's dataset, not to arbitrarily large inputs.
  • The app is single-user and stateless — no login, saved timetables or multi-user editing in the base build (available as customization).

Frequently Asked Questions

Is a genetic algorithm "AI"?

No. A genetic algorithm is an optimization and search technique inspired by evolution — it searches a huge space of candidate timetables using selection, crossover and mutation. No machine-learning model is trained, and the project makes no AI claim.

Which constraints does the scheduler enforce?

Six hard constraints: no teacher or room is double-booked in a slot, lab subjects hold at least 2 lab-room periods per division, teacher unavailability days are respected, no teacher exceeds 4 periods a day, and no subject runs 3+ consecutive periods. Soft preferences are minimized on top.

How fast does it find a timetable?

In the demo build, 10 seeded runs converged to zero hard-constraint violations in 16–38 generations (median 27), each run completing in well under a second in the browser.

Can it be customized for a real college?

Yes. Editable inputs for real subjects, teachers and rooms, additional divisions, extra constraints (electives, shared labs) and a backend with login and saved timetables are realistic customizations.

Is this project suitable for a final-year project?

Yes — for Computer Engineering and Information Technology programs. It demonstrates evolutionary algorithms, constraint modeling, fitness-function design and a complete working web application, which is strong viva material on optimization.

Components & software requirements
  • HTML5 · CSS3 · JavaScript (ES6)
  • Canvas API (fitness chart)
  • Genetic algorithm engine (vanilla JS)
  • CSV export via Blob API
  • Print-optimized CSS
  • Single-file app (no build step)
  • Git
Delivery information

Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.

Support terms

Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.

Download free synopsis (PDF)

Enter your name and WhatsApp number — the synopsis PDF downloads immediately. We may send occasional project updates on WhatsApp; no spam.

Get a quotation