Inspiration
“Roommate failure can cost more than a breakup — because you still have to pay rent.”
Most roommate-finding apps focus on helping people discover roommates through profile browsing and messaging. In practice, this behaves more like a social platform than a compatibility system.
But many roommate situations already begin with friends deciding to live together. The real problem is not simply finding someone — it is understanding whether two people can actually share a living space comfortably.
Differences in sleep schedules, cleanliness, noise tolerance, or social habits can create persistent conflict in shared spaces.
This led us to ask a different question:
What if roommate matching could be treated as an optimization problem rather than a social guessing game?
What it does
RoomMatch AI is a system for algorithmic roommate matching and compatibility analysis.
Students receive a survey via email through the Gmail API and specify preferences such as:
- sleep schedule
- cleanliness
- noise tolerance
- visitor frequency
Each dimension also includes an importance weight from 1–10, allowing users to express how strongly they care about each factor.
Using this information, the system can:
1. Automatically match roommates
The system models housing assignment as a constraint-aware optimization problem that minimizes lifestyle conflict across all rooms.
We define compatibility cost between two users as:
$$ cost_q(i,j) = \alpha_q \cdot dist_q(i,j) \cdot weight_q(i,j) $$
where:
- (dist_q(i,j)) measures preference differences
- (weight_q(i,j)) reflects how strongly users care about the dimension
The total conflict cost for a room is:
$$ roomCost = \sum_{q} cost_q(i,j) $$
The global objective is:
$$ totalCost = \sum_{rooms} roomCost $$
2. Compatibility score interface
In addition to automated matching, the system can compute compatibility scores between two specific users.
This allows friends who already plan to live together to evaluate potential lifestyle conflicts before signing a lease.
Before you sign the lease — check your compatibility score.
How we built it
The system consists of three major components.
Survey & Data Collection
We built a survey interface with slider-based preference weights and distributed the questionnaire through Gmail API integration.
This allows administrators to send survey links directly to student email accounts.
Optimization Engine
The matching engine models roommate allocation as a constraint-aware optimization problem.
We implemented a ReAct-style multi-agent loop:
- Planner Agent proposes assignment edits
- Critic Agent reviews proposals
- CHECK module evaluates constraints and computes compatibility scores
Local search operations such as:
MOVE(student, room)
SWAP(studentA, studentB)
are used to iteratively improve assignments until the global conflict cost stops decreasing.
Web Interface
The frontend was built using Vite and vanilla JavaScript, featuring:
- Apple-style dark UI
- slider-based preference controls
- an administrator dashboard for sending surveys and generating matches
Challenges we ran into
One of the biggest challenges was designing a compatibility metric that meaningfully captures lifestyle conflicts while remaining computationally efficient.
Preferences are multi-dimensional and subjective, so we needed a scoring system that is:
- interpretable
- scalable
- suitable for optimization
Another challenge was ensuring the evaluation engine remains deterministic, meaning identical inputs always produce identical outputs. This makes the system auditable and reproducible.
What we learned
This project showed us that many social decisions can be reframed as structured optimization problems.
By translating lifestyle compatibility into a mathematical cost model, we were able to explore how algorithmic systems might support more stable and transparent housing assignments.
We also learned how multi-agent architectures can explore solution spaces while maintaining objective evaluation.
What's next
Future improvements include:
- scaling the system to larger housing datasets
- adding fairness constraints to roommate assignments
- generating detailed Roommate Compatibility Reports
- integrating persistent databases and real-time matching systems.
Log in or sign up for Devpost to join the conversation.