← ClaudeAtlas

algo-rank-elolisted

"Implement Elo rating system to rank items or players from pairwise comparison outcomes. Use this skill when the user needs to rank items from head-to-head matchups, build a competitive rating system, or evaluate relative quality from comparison data — even if they say 'player rating', 'ranking from comparisons', or 'competitive scoring system'.".
charlieviettq/awesome-agent-skill · ★ 25 · AI & Automation · score 80
Install: claude install-skill charlieviettq/awesome-agent-skill
# Elo Rating System ## Overview Elo assigns numerical ratings that update after each pairwise comparison. Winner gains points, loser loses points. The amount exchanged depends on expected vs actual outcome. Originally for chess, now used for sports, games, and A/B preference testing. Update runs in O(1) per match. ## When to Use **Trigger conditions:** - Ranking items from pairwise comparison data (A vs B outcomes) - Building competitive rating systems for games or sports - Crowdsourced quality evaluation through pairwise preferences **When NOT to use:** - When you have absolute scores, not pairwise comparisons (use direct ranking) - When team dynamics matter more than individual skill (use TrueSkill) ## Algorithm ``` IRON LAW: Elo Assumes Each Matchup Is Independent and Stationary Rating changes are based on surprise: beating a higher-rated opponent gains more points than beating a lower-rated one. K-factor controls update speed: high K (32) = volatile, fast adaptation. Low K (16) = stable, slow adaptation. Choose K based on how quickly skill changes. ``` ### Phase 1: Input Validation Initialize all participants at base rating (typically 1500). Collect match results: winner, loser (or draw). **Gate:** Valid match data, no self-matches. ### Phase 2: Core Algorithm 1. Expected score: E_A = 1 / (1 + 10^((R_B - R_A)/400)) 2. Actual score: S_A = 1 (win), 0.5 (draw), 0 (loss) 3. Update: R_A_new = R_A + K × (S_A - E_A) 4. Process all matches sequentially (order matters for