Swiss tournament automation for StartGG. Supports variable player counts. Made for Microspacing Vancouver.
This is V2 of the original Daness controller.
Round 1: Seed-based (seed 1 vs seed N/2+1, seed 2 vs N/2+2, etc.)
Round 2+:
- Group players by W-L record
- Apply date-based randomness (seed: YYYYMMDD) for weekly variance
- Within groups: pair by seed ± small random offset
- Backtracking ensures zero rematches
- Quality checks prevent close-seed matchups in early rounds (1v2, 2v3, etc.)
- Power-of-2: strict within-group pairing
- Non-power-of-2: allows cross-group pairing when needed
Scoring: Points = (Wins × 100) + Base seed points + Win quality + Cinderella bonus
Cinderella: Lower seeds get higher multipliers for overperformance
# Calculate recommended rounds based on setup constraints (run before R1)
python daness_v2.py <event-slug> setup <num-players> <num-setups>
# Example: 31 players, 13 setups → 4 rounds (~160min)
# Setup next unstarted round (autodetect)
python daness_v2.py <event-slug>
# Or specify a round number
python daness_v2.py <event-slug> <round-number>
# Calculate Swiss final standings
python daness_v2.py <event-slug> standings
# Generate bracket split (after all Swiss rounds)
python daness_v2.py <event-slug> bracket
# Splits 50/50: 32→16/16, 28→14/14, 24→12/12
# Analyze player pairings
python daness_v2.py <event-slug> why <player-name>git clone https://github.com/danbugs/daness
cd daness
python3 -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
# Set API token
export STARTGG_TOKEN="your_token_here"
# Or create .env file: echo "STARTGG_TOKEN=your_token" > .envSwiss + Brackets:
- Swiss phases (Round 1-N, where N = recommended rounds)
- Main Bracket phase
- Redemption Bracket phase
- Final Standings phase (custom schedule)
Swiss Only:
- Swiss phases (Round 1-N)
- Final Standings phase (custom schedule)
- Seed players in Round 1 phase manually
python daness_v2.py <slug> setup <players> <setups>- calculate recommended roundspython daness_v2.py <slug> 1- setup Round 1 pairings- Start Round 1 in StartGG, complete matches
python daness_v2.py <slug> 2- setup Round 2 (uses results from R1)- Repeat for remaining rounds
python daness_v2.py <slug> bracket- generate bracket seeding- Manually seed bracket phases with displayed seeding
- Run brackets
python daness_v2.py <slug> standings- update Final Standings phase
- Zero rematches: Backtracking algorithm guarantees no repeat pairings
- Weekly variance: Date-based randomness varies pairings week-to-week
- Smart pairing: Prevents close-seed matchups in early rounds (heavy penalty for adjacent seeds)
- Cinderella bonuses: Lower seeds get higher rewards for overperformance
- Stream recommendations: Identifies compelling matchups by storyline
- Variable player counts: Works with 32, 28, 24, or any count
- Tool never modifies match results, only seeding order
- Pairing randomness is deterministic per day (same date = same pairings)
- Cross-group pairing noted in output for non-power-of-2 tournaments
- Bracket split always 50/50, main bracket gets extra on odd counts
- Initial seeding saved to file (e.g.,
tournament-example-event-singles-seeding.txt) - Points system rewards quality wins and penalizes bad losses
- Cinderella bonuses scale based on seed percentile
python test_daness_v2.pyTests include: 32/28/24/20 players, date variance, odd counts, rematch avoidance, bracket fairness.