Roomify
CSP-based intelligent room allocation for hostel management
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
Student Management
Register and manage students for room allocation
Add New Student
Registered Students 0
Room Management
Add and manage hostel rooms and their properties
Add New Room
Available Rooms 0
Run Allocation
Execute the CSP-based room assignment algorithm
How the Algorithm Works
Allocation Results
View room assignments and preference scores
No allocation results yet. Run the allocation algorithm first.