A comprehensive comparison between traditional ADP-based (Greedy) and advanced Regret-based draft algorithms for fantasy football.
This project implements and compares two fantasy football draft algorithms:
- Greedy Algorithm: Traditional approach using Average Draft Position (ADP) rankings
- Regret Algorithm: Advanced approach considering positional scarcity, value dropoff, and pick timing
pip install pandas numpy matplotlib seaborn openpyxl
Ensure these files are in the data folder:
ESPN Draft Rankings:
fantasy_rankings_2020.xlsxfantasy_rankings_2021.xlsxfantasy_rankings_2022.xlsxfantasy_rankings_2023.xlsxfantasy_rankings_2024.xlsx
Actual Season Performance:
2020.xlsx2021.xlsx2022.xlsx2023.xlsx2024.xlsx
python main.py
python test_suite.py
python -c "from main import *; # your custom test code"
├── main.py # Main execution file ├── models.py # Data models (Player, Team) ├── algorithms.py # Draft algorithms implementation ├── data_loader.py # Data loading utilities ├── draft_simulator.py # Draft simulation engine ├── performance_analyzer.py # Performance benchmarking ├── visualizer.py # Chart generation ├── test_suite.py # Automated tests └── README.md # This file
- Time Complexity: O(n log n)
- Space Complexity: O(n)
- Strategy: Pick best available player by ADP for needed positions
- Time Complexity: O(n²) per pick
- Space Complexity: O(n)
- Strategy: Calculate regret scores based on:
- Player value (normalized auction value)
- Positional scarcity (quality players remaining)
- Value dropoff (gap to next best player)
- Pick urgency (time until next turn)
Regret Score Formula:
regret = value_score + (scarcity × dropoff × 0.4) + (urgency × 0.3) - bye_penalty
- Teams: 10 (snake draft)
- Draft Position: 5th
- Roster: 1 QB, 2 RB, 2 WR, 1 TE, 1 FLEX, 1 K
- Total Picks: 8 per team
To extend the algorithm:
- Add new factors to regret score calculation
- Implement alternative draft strategies
- Add new performance metrics
- Expand test coverage