A React TypeScript application that helps organize badminton players into court assignments using manual or image-based player list extraction.
- ๐ธ Image Upload & OCR: Take a picture of a player list and automatically extract names using Tesseract.js
- โ๏ธ Manual Player Entry: Add players manually - one at a time or multiple at once
- ๐ฅ Player Management: Toggle player presence, remove players
- ๐ Optimised Court Assignment: Automatically assigns players to courts using a cost-based engine that maximises fairness over time
- Doubles (4 players) preferred
- Singles (2 players) for odd numbers
- Automatic bench assignment for extra players
- ๐ Team Rotation: Rotate team compositions on a court without reshuffling everyone
- ๐ฑ Responsive Design: Works on desktop and mobile devices
The engine assigns players to courts by minimising a cost function across these rules:
- Bench rotation fairness โ players who have sat out more often get priority to play next.
- Singles match rotation fairness โ players who have played fewer singles matches get priority.
- Partner variety โ players who have already been teammates many times are less likely to be paired again.
- Opponent variety โ players who have faced each other frequently are less likely to be opponents again.
- Balanced matches โ wins and losses are spread so teams stay competitive (no "super teams" or weak pairings).
- Proper game formats โ courts always have either singles (2) or doubles (4), never 3 players.
- Optimal team pairings โ for each doubles match, the system tries all possible team splits and picks the fairest.
See analysis/ for simulation scripts and benchmarks.
See .github/CONTRIBUTING.md for development setup and available scripts.
AGPL-3.0 ยฉ sylhare
