About the System

The Smart Room Allocation System is a final-year mini project that demonstrates the application of Constraint Satisfaction Problem (CSP) techniques in a real-world hostel management scenario. The system collects student preferences, applies constraints, and uses a greedy best-first search to assign students to rooms.

This project was developed as part of an Artificial Intelligence course to explore how basic AI problem-solving strategies can automate administrative tasks in academic institutions.

CSP Formulation

  • Variables Each student (unassigned)
  • Domain All available rooms
  • Constraint 1 Room capacity ≤ max
  • Constraint 2 Gender must match
  • Constraint 3 One room per student

Search Strategy

  • Heuristic Most Constrained Variable (MCV)
  • Selection Best-first greedy search
  • Scoring Preference-based fit score
  • Agent Decision function per student

Features

  • ✓ Add / Edit / Delete students
  • ✓ Add / Edit / Delete rooms
  • ✓ Run allocation multiple times
  • ✓ View results in table format
  • ✓ Preference score display

Tech Stack

  • Backend Node.js + Express
  • Database SQLite (better-sqlite3)
  • Frontend HTML + CSS + JS
  • Algorithm CSP + Greedy Search
Get started →

Add New Student

Registered Students 0

No students added yet.

Add New Room

Available Rooms 0

No rooms added yet.

How the Algorithm Works

1
Sort students by number of valid rooms available (Most Constrained Variable heuristic)
2
Check constraints — gender match and capacity for each room
3
Score each valid room using the decision agent (type preference + roommate match)
4
Assign best-fit room to each student using greedy selection
Total Students
Total Rooms
Total Capacity

No allocation results yet. Run the allocation algorithm first.