elo-rating-systems

Standardize Elo rating implementations across sports with a unified BaseEloRating interface.

Updated Jan 16, 2026
One-click install
npx skills add https://github.com/MGPowerlytics/nhlstats --skill elo-rating-systems
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: elo-rating-systems
Source: https://github.com/MGPowerlytics/nhlstats/tree/main/.github/skills/elo-rating-systems
Command: npx skills add https://github.com/MGPowerlytics/nhlstats --skill elo-rating-systems

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill standardizes and documents Elo rating implementations across multiple sports.

Core Features & Use Cases

  • Unified BaseEloRating: A single abstract class that defines predict, update, get_rating, expected_score, and get_all_ratings to ensure consistency across all sport-specific implementations.
  • Sport-specific parameters: Per-sport K-factor and home_advantage configurations enable accurate modeling for NBA, NHL, MLB, NFL, EPL, Ligue1, NCAAB, WNCAAB, and Tennis.
  • Migration & refactoring support: Encourages refactoring existing sport classes to inherit from BaseEloRating with backward-compatible adapters (legacy methods).
  • Easy extension: Create new sport Elo implementations by inheriting from BaseEloRating and implementing all abstract methods.
  • Testing discipline: Emphasizes TDD for integration and compatibility.

Quick Start

  • Create a new sport Elo rating by extending BaseEloRating and implementing the required methods, then invoke super().init(k_factor, home_advantage, initial_rating) to initialize defaults.

Frequently Asked Questions about elo-rating-systems

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement a unified Elo rating system across multiple sports?

To implement a unified Elo rating system across multiple sports, you create sport-specific classes that inherit from a base abstract class, enforcing a consistent interface for predict, update, and expected_score calculations. This ensures standardized rating logic while allowing per-sport parameters like K-factor and home advantage.

What is the expected score formula used for in an Elo rating calculation?

The expected score formula in an Elo rating calculation is used to determine the anticipated probability of a team winning before the match. It is a required method in the unified interface, providing the baseline needed to calculate rating updates after actual results are recorded.

How do I add Elo ratings for a new sport using inheritance?

To add Elo ratings for a new sport, you extend the base abstract class and implement all required abstract methods. You invoke the parent class initializer with sport-specific parameters like K-factor and home advantage to establish the default rating behavior for the new sport.

Can I refactor existing sport rating classes to use a unified Elo interface without breaking legacy code?

Yes, you can refactor existing sport rating classes to inherit from the base Elo class while maintaining legacy methods. By using backward-compatible adapters, existing implementations transition to the unified interface without breaking previously deployed code dependencies.

Does this Elo rating approach support per-sport parameters like K-factor and home advantage?

Yes, this Elo rating approach supports per-sport parameters by passing K-factor and home advantage values during class initialization. This allows accurate modeling for diverse leagues like NBA, NHL, MLB, NFL, EPL, Ligue1, NCAAB, WNCAAB, and Tennis using a shared update logic.

When should I not use a shared update logic for multi-sport Elo ratings?

You should not use a shared update logic for multi-sport Elo ratings if a specific sport requires fundamentally distinct mathematical models rather than just varying parameters. The unified base class assumes all sports can operate under the standard expected score and update formula with adjusted K-factors.