Automated Timetabling Algorithm

Generate and revise a university timetable under course, room, instructor, and student constraints.

← Explore Research

Explore Research

Try the app

Open the interactive DATA demo ↗

The sample workbook loads automatically in a full browser simulation of DATA, or you can choose your own. The timetable engine runs locally through WebAssembly; your workbook is not uploaded.

Question

How can a university timetable be generated and revised while respecting courses, rooms, instructors, and students?

Goals

  • Produce a complete timetable without instructor, student, or classroom conflicts.
  • Respect course structure, room capacity, available times, preferences, and limits on teaching days.
  • Give administrators a practical app for review, revision, requests, saving, and distribution.

Method

DATA treats timetabling as a constraint-search problem, while leaving final review and adjustment in the hands of an administrator. It is a try-and-error search, but the retry strategy changes whenever the search becomes stuck.

  • Import course, room, instructor, and student-plan data from a workbook.
  • Place highly constrained courses first and try an allowed time and suitable room for each one.
  • Reject clashes and other rule violations. When no valid choice remains, move the troublesome course earlier and retry from a previous point.
  • Review the result visually, move course blocks, check new conflicts, undo changes, and save the timetable.

The core idea: adaptive backtracking

Ordinary try-and-error can loop if it repeatedly returns to the same recent decision. DATA keeps a backward-step value for the course that could not be placed. The first retry steps back a little; if the same position fails again, the step grows and the course is moved ahead of more previously placed courses. After reaching the start of the active search, the step cycles. This changing jump distance explores a different ordering instead of replaying one short loop.

  1. Try a valid time-and-room candidate for the current course.
  2. If every candidate conflicts, increase that course's backward step.
  3. Jump back by that distance, move the difficult course earlier in the order, clear the affected later placements, and try again.
  4. Continue until every included course has a valid assignment or the run is cancelled.

Source

DATA project repository ↗