×
How Your Schedule is Made
The schedule isn't just random; it's the result of a sophisticated process designed to be as fair and varied as possible. Here’s a look under the hood:
Step 1: The Simulation
Instead of creating just one schedule, the algorithm generates hundreds of different valid schedules. This massive simulation creates a diverse pool of options to choose from.
Step 2: The Scoring System
Each of these schedules is graded based on a strict set of criteria, prioritized in this order:
- Priority 1: Minimize Current Repetition. The top priority is to reduce the number of times players have the same teammate or opponent within the current session.
- Priority 2: Maximize Playing Time. The algorithm then rewards schedules that have the most total games played.
- Priority 3: Avoid Historical Repeats. If you're logged in, it checks your last two schedules and penalizes schedules that repeat teammate or opponent pairings you've had recently.
- Priority 4: Ensure Fairness. As a final tie-breaker, it prefers schedules where the total number of games played is most evenly distributed among all players (lowest variance).
Step 3: Building a Single Schedule
Each individual schedule is built round-by-round with its own set of rules:
- Prioritize Unique Games: The algorithm first tries to schedule games from a pre-calculated pool of "perfect" matchups where no one has repeated a partner or opponent. It runs hundreds of simulations per round to find the best way to "pack" the courts with these unique games, prioritizing players who have played the least.
- Smart Filler Games: If a court is empty after all possible unique games for that round have been scheduled, the algorithm creates a "filler" game.
- It selects players who have the lowest total play time to join the filler game.
- It then arranges them into teams by testing all possible pairings. The chosen pairing is the one that best avoids players who have played with or against each other in the last 3 games. If there's a tie, it then picks the pairing with the fewest repeats across the entire schedule.
Step 4: The Final Result
After generating and scoring all possible schedules, the algorithm simply picks the one with the best score and presents it to you. You can see how the top schedules compared in the "Math & Stuff" tab!