1. It calculates complete rounds
The scheduler converts the start and end time into minutes, including sessions that cross midnight. It divides that duration by the selected slot length and uses only complete rounds. A 120-minute session with 20-minute slots produces six rounds. A 110-minute session produces five complete rounds with ten minutes left over.
2. It calculates active capacity
MyCourtSlot currently schedules doubles, so each active court requires four players. The number of matches in a round is the smaller of the available court count and the number of complete four-player groups. Ten adults on two courts therefore produce two matches and two waiting players per round.
3. It spreads waiting turns
For every player, the scheduler tracks how many rounds they have waited and how many they have played. When players must sit out, it first considers the people with the fewest previous sit-outs. Ties are resolved using play count and then rating. This is intended to stop the same person from repeatedly carrying the waiting burden.
Exact equality is not always mathematically possible. If the session ends before a complete fairness cycle, some players may receive one more round than others. The relevant test is whether the difference is explainable by total capacity—not whether every row looks identical.
4. It tries different groups of four
Active players are shuffled into possible quartets. The scheduler makes up to twenty attempts to avoid repeating exactly the same four-player group from the previous round. Because this search includes randomness, generating twice can produce different valid drafts.
5. It chooses the best team split inside each quartet
Four players can be divided into two teams in three distinct ways. MyCourtSlot scores all three. The score combines the difference between the teams’ summed ratings with a penalty for players who have already been teammates. The lowest score wins.
This is deliberately modest. Ratings guide the split; they do not override all partner variety forever.
6. It changes court assignments
Completed matches are shuffled across court rows each round so the same group is less likely to remain on Court 1, Court 2, or Court 3 throughout the session. Court assignment itself is not treated as a skill ranking.
How junior or child groups are handled
A player name containing parentheses is currently marked for the separate kids pool—for example, Hassan (u16),3.5. When that pool is present, one court is reserved for it. A kids match needs four players; otherwise the schedule displays that the kids court is waiting. This convention is functional but intentionally simple, so hosts should review it carefully.
What the algorithm does not know
- Who needs to arrive late or leave early.
- Medical, accessibility, coaching, or safeguarding constraints.
- Personal conflicts or requested partnerships.
- Whether ratings are current or accurate.
- Whether a particular court has different conditions.
- Local club policies that were never entered into the tool.
How hosts should review a draft
- Check that every expected player appears.
- Compare total sit-outs over the full session, not one round in isolation.
- Inspect consecutive teammate repeats and obvious skill mismatches.
- Apply real-world constraints at clean slot boundaries.
- Explain the club’s fairness rule before play starts.
The scheduler is useful because it makes the first draft fast and the underlying goals visible. It is not useful if a host treats generated output as morally binding.