16 Commits

Author SHA1 Message Date
189ea1b037 Refactor: unified rating (use singles_rating for all matches, update leaderboard) 2026-02-26 12:15:00 -05:00
2533b589a0 Add detailed old system explanation, tanh critique, and conflict of interest disclaimer 2026-02-26 12:04:03 -05:00
858636018b Update v3 report: sassy title, real comparison data table 2026-02-26 11:57:16 -05:00
16e21346c2 Fix elo_analysis: use correct timestamp column, show real ratings 2026-02-26 11:55:40 -05:00
03a3d44149 Add comprehensive verification checklist for ELO refactoring 2026-02-26 11:41:38 -05:00
9b99e04b9f Add handoff report for ELO refactoring task 2026-02-26 11:41:11 -05:00
42d0269e56 Major refactor: Convert from Glicko-2 to pure ELO rating system
- Created new ELO module (src/elo/) with:
  - Simple rating-only system (no RD or volatility tracking)
  - Standard ELO expected score calculation
  - Per-point performance scoring
  - Effective opponent formula for doubles
  - Full test suite (21 tests, all passing)

- Updated main.rs to use ELO calculator:
  - Per-point scoring: performance = points_scored / total_points
  - Effective opponent in doubles: Opp1 + Opp2 - Teammate
  - K-factor = 32 for casual play

- Created analysis tool (src/bin/elo_analysis.rs):
  - Reads match history from database
  - Recalculates all ratings using pure ELO
  - Generates before/after comparison (JSON + Markdown)

- Updated documentation:
  - New LaTeX report (rating-system-v3-elo.tex)
  - Simplified explanations (no volatility/RD complexity)
  - Plain English examples and use cases
  - FAQ section

- All tests passing (21/21 ELO tests)
- Code compiles without errors
- Release build successful
2026-02-26 11:35:07 -05:00
5df7e54b2e Update report title to 'The Carry Problem' — sassy but substantive
Changed from: 'How Bad Am I, Actually? Building a Pickleball Rating System That Doesn't Lie'

New title: 'The Carry Problem: When Your Rating Doesn't Match Your Ego'
With subtitle: 'A Mathematically Principled Approach to Rating Pickleball Players
               (And Finally Proving Whether Your Partner Is Holding You Back)'

RATIONALE:
- 'The Carry Problem' directly addresses v2's innovation (effective opponent formula)
- Funny and relatable without being mean-spirited
- Hooks both casual players and technical readers
- Self-deprecating sass matches the rec pickleball vibe
- More memorable than academic title

The rest of the document (intro, TL;DR, content) already had the right tone.
2026-02-26 11:05:07 -05:00
4a8ffa12fc Add final handoff summary for complete project 2026-02-26 11:03:43 -05:00
4d96b93aa0 Add complete project summary and handoff checklist 2026-02-26 11:03:13 -05:00
8bb9e1c96c Add .gitignore for LaTeX artifacts 2026-02-26 11:02:38 -05:00
4e8c9f53bf Add comprehensive LaTeX documentation for rating system v2.0
DOCUMENTATION ADDED:

1. docs/rating-system-v2.tex (681 lines, ~9,000 words)
   - Complete technical report on system redesign
   - Includes: introduction, mathematical foundation, v1 review
   - Motivation for all 4 changes with detailed explanations
   - Complete v2.0 formulas with clear notation
   - Worked example: concrete doubles match (v1 vs v2)
   - Discussion of advantages, edge cases, future work
   - Professional typesetting for blog/website publication
   - 36 subsections with table of contents

2. docs/README.md
   - How to compile the LaTeX document
   - File overview and contents summary
   - Compilation instructions for macOS, Linux, Docker, Overleaf
   - Publishing guidance (HTML conversion, blog extraction)
   - Citation format for references

3. docs/FORMULAS.md
   - Quick reference card for all formulas
   - Match outcome calculation (singles & doubles)
   - Effective opponent examples
   - RD distribution formula with worked examples
   - Expected point win probability table
   - Parameter meanings and initial values
   - Summary of v1 vs v2 changes
   - FAQ section

STATUS: Ready for publication 
- LaTeX file is syntactically correct
- All formulas verified against code
- Example calculations match implementation
- Suitable for recreational audience + technical rigor
- Can be compiled to PDF or converted to HTML/blog format
2026-02-26 11:02:35 -05:00
f8211e924e Add completion summary for ELO refactoring work 2026-02-26 11:00:31 -05:00
9ae1bd37fd Refactor: Implement all four ELO system improvements
CHANGES:

1. Replace arbitrary margin bonus with per-point expected value
   - Replace tanh formula in score_weight.rs
   - New: performance = actual_points / total_points
   - Expected: P(point) = 1 / (1 + 10^((R_opp - R_self)/400))
   - Outcome now reflects actual performance vs expected

2. Fix RD-based distribution (backwards logic)
   - Changed weight from 1.0/rd² to rd²
   - Higher RD (uncertain) now gets more change
   - Lower RD (certain) gets less change
   - Follows correct Glicko-2 principle

3. Add new effective opponent calculation for doubles
   - New functions: calculate_effective_opponent_rating()
   - Formula: Eff_Opp = Opp1 + Opp2 - Teammate
   - Personalizes rating change by partner strength
   - Strong teammate → lower effective opponent
   - Weak teammate → higher effective opponent

4. Document unified rating consolidation (Phase 1)
   - Added REFACTORING_NOTES.md with full plan
   - Schema changes identified but deferred
   - Code is ready for single rating migration

All changes:
- Compile successfully (release build)
- Pass all 14 unit tests
- Backwards compatible with demo/example code updated
- Database backup available at pickleball.db.backup-20260226-105326
2026-02-26 10:58:10 -05:00
d4c0bb889b docs: comprehensive documentation for all modules and handlers
- README.md: full project docs with features, API endpoints, Glicko-2 explanation
- main.rs: doc comments for all 18 HTTP handlers
- db/mod.rs: schema and migration documentation
- models/mod.rs: Player struct and Glicko-2 parameter docs
- Fixed route syntax (:id instead of {id}) for Axum 0.7 compatibility
2026-02-07 19:19:50 -05:00
ada961f35d Initial commit: Pickleball ELO Tracker with Glicko-2 2026-02-07 18:45:31 -05:00