A Formula 1 championship prediction and simulation engine powered by real-world data.
Maybe reality might be different xD
KYC (KnowYourChamps) is a Python-based analytics project that predicts:
- ๐ World Drivers' Championship (WDC)
- ๐๏ธ World Constructors' Championship (WCC)
using:
- โ Real Formula 1 data
- โ Monte Carlo simulations
- โ Official FIA point systems
- โ Season-aware rules
- โ (Optional) live race updates
The goal is to model how championships evolve, not just display standings.
๐ New to F1? Check out our detailed guide: How F1 Scores
A driver competes in races and earns points based on finishing position. Drivers compete for the World Drivers' Championship (WDC).
๐ Example: Max Verstappen
A constructor (team) fields two drivers.
- Team points = sum of both drivers' points
- Competes for World Constructors' Championship (WCC)
๐ Example: Red Bull Racing
| Type | Description |
|---|---|
| Race | Main event (25โ1 points) |
| Sprint | Short race (8โ1 points) |
| Fastest Lap | +1 point (removed from 2025) |
- โ One race affects both WDC and WCC
- โ Sprint and Race handled separately
- โ Rules vary by season
- โ Simulation respects FIA scoring system
- Build season state from real F1 data
- Simulate remaining races using Monte Carlo
- Predict:
- WDC winner probability
- WCC winner probability
- Supports:
- Sprint weekends
- Rule changes by season
- Future-proof architecture
- Weighted randomness (based on current form)
- Thousands of season simulations
- Probabilistic outcome modeling
- No hardcoded results
- Python 3.10+
- Dataclasses
- OOP-based domain modeling
- FastF1 โ Official Formula 1 timing & standings
- NumPy
- Monte Carlo Simulation
- Probabilistic ranking
- Modular design
- Clean separation of concerns
- No tight coupling
- Simulation-ready
F1KYC/
โ
โโโ src/
โ โโโ models.py # Core domain models
โ โโโ simulation.py # Monte Carlo engine
โ โโโ data_fetching.py # FastF1 integration
โ โโโ newwww.py # Runner / entry point
โ
โโโ cache/ # FastF1 cache
โโโ howf1scores.md # F1 scoring system explained
โโโ README.md # This file
โโโ requirements.txt # Dependencies
season = build_season_state(2025)results = monte_carlo_championship(season, simulations=3000)WDC:
VER โ 71.2%
NOR โ 18.4%
LEC โ 7.1%
WCC:
Red Bull โ 65.9%
McLaren โ 29.3%
- Python 3.10 or higher
- pip package manager
-
Clone the repository
git clone https://github.com/biv720/kyc.git cd kyc -
Install dependencies
pip install -r requirements.txt
-
Run the simulation
python src/newwww.py
from src.data_fetching import build_season_state
from src.simulation import monte_carlo_championship
# Load current season
season = build_season_state(2025)
# Run 5000 simulations
results = monte_carlo_championship(season, simulations=5000)
# View predictions
print(results)| Principle | Description |
|---|---|
| โ Domain-first modeling | Models reflect real F1 structure |
| โ No hardcoded logic | Rules driven by season data |
| โ Rules driven by season | Adapts to FIA regulation changes |
| โ Extendable for live data | Ready for real-time integration |
| โ Clean separation | Data & logic are independent |
This project was built to scale into:
- ๐ก Live race analysis
- ๐ฏ Strategy simulations
- ๐ Data visualization dashboards
- ๐ฐ๏ธ Historical season replay
- ๐ข Live Race Mode (real-time WDC/WCC updates)
- ๐ Streamlit Dashboard (interactive visualization)
- ๐งช Unit test suite (comprehensive testing)
- ๐ Multi-season comparison (historical analysis)
- ๐ง ML-based driver performance weighting (intelligent predictions)
- ๐ Strategy optimizer (pit stop & tire strategy)
- ๐ฎ "What-if" scenario simulator (alternative outcomes)
- ๐ Web API (REST endpoints for predictions)
Coming soon: Dashboard previews, simulation outputs, and prediction visualizations
Contributions are welcome! Whether it's bug fixes, new features, or documentation improvements.
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is for educational and analytical purposes only.
Formula 1 is unpredictable โ weather, strategy, penalties, and chaos always apply.
Maybe reality might be different xD ๐๏ธ๐จ
The predictions are probabilistic models based on historical data and simulations, not guarantees of actual race outcomes.
This project is licensed under the MIT License - see the LICENSE file for details.
Bivraj โ F1 Enthusiast | Data & Design
Built with ๐ for F1 data nerds and championship dreamers
