HomeWorkAboutContact

Case · AI · Optimization

School Timetable Solver

Research toward school timetabling as a constraint problem — not something to hand an LLM.

Role
Sole engineer
Year
2026
Status
Research · ongoing
Stack
OR-Tools · Python · .NET
Problem

School timetables are a constraint problem, not something an LLM should guess.

My role

Solo — research and design

Status

Ongoing: interviewing teachers and designing the solver before writing the first line of solver code.

01The problem

Schools often buy timetable tools they only use a few times a year. The hard part is avoiding clashes across teachers, rooms, classes, and rules. That is a constraint problem — so the plan is to solve it with an OR-Tools CP-SAT solver, not guess it with an LLM that cannot guarantee a clash-free result.

02What I've explored

  • Interviewing teachers to learn how Malaysian schools actually build timetables today, and where the current tools hurt.
  • Researched the market and the KSSR curriculum hour rules (for example, Bahasa Melayu at 11 periods a week in Year 4) so the model is grounded in real requirements.
  • Designed the system end to end — CP-SAT solver, an independent verifier, and plain-language conflict explanations — in a plan that went through three separate design-review passes.

03Key decisions

LLM stays in its lane

The model is only meant to turn plain-language constraints into structure. The timetable itself will come from a deterministic CP-SAT solver — and the product copy will say so plainly.

Solver chosen for its licence, too

OR-Tools (Apache-2.0) is the planned solver over strong alternatives like FET, whose AGPL licence would force the whole product open-source.

Verify independently of the solver

The design calls for a separate verifier that re-checks every timetable against the full rule set, rather than trusting the solver's own feasibility result.

04Trade-offs

  • An LLM cannot create the timetable. If a teacher's rule cannot be structured clearly, it needs clarification rather than a guess.
  • A constraint solver is less 'magical' than an LLM, but it can guarantee no clashes and explain exactly why a schedule is impossible.

05Where it's heading

A scheduling tool grounded in how schools really work, honest about using a solver — not an LLM — for the part that has to be correct. The research phase is shaping what gets built first.

06What's next

  • Turn the teacher interviews into a first concrete constraint set to model against.
  • Build the CP-SAT solver and the independent verifier as the first coding milestone, test-first.
  • Validate generated timetables with a pilot school before widening the scope.