🤖 How the Roster Algorithm Works
Transparency in scheduling — here's exactly how we assign players
🎯 The Goal
Our algorithm has two objectives: fairness and competitive balance. We want every player to get their fair share of court time, while also creating matches where teams are evenly skilled.
⭐ Guaranteed Players
Players who request 15 or fewer sessions for the season are designated as "Guaranteed Players." They get priority placement for ALL their requested slots before the main algorithm runs.
Why? If you can only make a few sessions, we want to make sure you actually get to play. Players with broader availability have more flexibility.
| Player Type | Availability | Priority |
|---|---|---|
| ⭐ Guaranteed | ≤15 sessions requested | Gets ALL requested sessions (subject to same-date rule) |
| Regular | >15 sessions requested | Fairness algorithm balances play time |
⚖️ The Fairness Algorithm
For regular players, we use a "utilization score" to ensure fair distribution:
utilization = sessions_assigned / sessions_requested
// Lower utilization = higher priority
// If you've played 2 of 20 requested (10%), you get priority
// over someone who's played 15 of 20 (75%)
This means players who haven't played much yet get picked first, naturally evening out everyone's court time over the season.
🔢 Step-by-Step Process
Load Availability
Pull every player's submitted availability for all 45 time slots.
Identify Guaranteed Players
Mark anyone with ≤15 total available slots as "guaranteed."
Process Each Session
Go through all 68 sessions chronologically (Oct 1 → Dec 17).
Place Guaranteed Players First
Any guaranteed player available for this session gets placed automatically.
Fill Remaining Spots
From available regular players, find the best combination that:
- Prioritizes players with lower utilization (less court time so far)
- Gets the combined rating close to 14.0
Enforce Same-Date Rule
A player can only be on ONE court per date (no double-booking on 2-court nights).
📊 Rating Balance
When filling remaining spots, we test all possible 4-player combinations and score them:
// Lower score = better pick
// We accept any combo with rating between 12.5 and 15.5
This balances two goals: give underplayed people more time, but also keep matches competitive. A 2.5 + 4.0 + 4.0 + 3.5 team (14.0 total) is ideal.
❓ FAQ
Why didn't I get all my requested sessions?
If you requested more than 15 sessions, you're in the regular pool where fairness balancing applies. The algorithm spreads court time evenly, so players who request many sessions won't get all of them — that would crowd out others.
Why can't I play both courts on Monday?
The same-date rule prevents any player from being scheduled on multiple courts on the same night. This ensures more players get to participate each session.
What if my rating changes?
Ratings are set at the start of the season. If you improve significantly, we can adjust for the next season. The algorithm uses whatever ratings are in the system when the roster is generated.
Can I request specific partners or opponents?
Not currently — the algorithm doesn't account for player preferences. It purely optimizes for fairness and rating balance. Partner matching is random within the constraints.
🤝 Fair Play
This algorithm is the same for everyone. No manual overrides, no favoritism. Submit your availability, and the math handles the rest.
Questions? Talk to the commissioner.