You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Match students into groups of 3-5, taking preferences into consideration, but prioritizing primarily including as many students in the match as possible.
14
+
15
+
### Step 0: Prepare Clusters
16
+
17
+
Students are assigned to "clusters" representing the potential start-times of an event.
18
+
Since events take 45 minutes, a student is added to cluster 1 (11:00 - 11:45) if they are available in time-slots 1 (11:00 - 11:15) , 2 (11:15-11:30) and 3 (11:30-11:45).
19
+
A single student can be assigned to multiple clusters.
20
+
21
+
### Step 1: Eliminate Dead Clusters
22
+
23
+
Meet@Mensa groups must be made up of at least 3 students. Clusters containing less than 2 students therefore are considered "dead" and are removed.
24
+
If removing a cluster would remove a student's last entry in any cluster, that student is considered unmatchable.
25
+
26
+
### Step 2: Determine Critical Candidate
27
+
28
+
Our priority is ensuring as many students are matched as possible.
29
+
To enable this, we next determine which user is in the fewest clusters, and therefore most at risk of becoming unmatchable.
30
+
In case of ties we select the most flexible student (with the fewest filters set) as critical.
31
+
32
+
### Step 3: Construct Minimal Group around Critical Candidate
33
+
34
+
The algorithm then generates all possible 3-person groups that can include the critical candidate and checks them for quality.
35
+
Group quality is determined by the preferences of each user in said group.
36
+
For all users with preferences in the group, one "quality point" is awarded every time another student in the group fulfills one of their preferences.
37
+
Students without preferences are treated as if all their preferences were fulfilled.
38
+
The algorithm then selects the highest quality group that includes the Critical Candidate.
39
+
40
+
### Step 4: Remove Matched Users from Clusters
41
+
42
+
All entries corresponding to the 3 users are then removed from the clusters
43
+
44
+
### Step 5: Loop
45
+
46
+
Repeat Steps 1-4 until all clusters are empty
47
+
48
+
### Step 6: Attempt to fit Unmatchable Students
49
+
50
+
Finally, the algorithm check for any possibility to include students that were previously set as unmatchable into one of the matched groups.
51
+
If multiple such groups are possible, the one with the highest quality is picked.
52
+
Because of the nature of the clusters, at most 2 unmatchable users should left per cluster, meaning group sizes will not exceed 5.
0 commit comments