Industrial-Grade Formula 1 Race Strategy Simulation Engine
STRATOS is a high-performance race strategy decision-support platform for Formula 1. It ingests live telemetry from the OpenF1 API, models tyre degradation and vehicle performance, and runs massive Monte Carlo race simulations to recommend optimal pit timing via an interactive HUD-style dashboard.
STRATOS is powered by an autonomous event-driven Multi-Agent architecture that decouples data ingestion from strategy computation:
graph TD
API[OpenF1 API] --> TA[Telemetry Agent]
TA --> SM[State Manager]
SM --> DA[Dashboard App]
DA --> SA[Strategy Agent]
SA --> SIA[Simulation Agent]
SIA --> MC[Monte Carlo Engine]
MC --> SA
SA --> |Strategy Insight| DA
- Telemetry Agent: Handles asynchronous ingestion, rate-limiting, and state synchronization.
- Simulation Agent: Autonomously manages the heavy-duty physics rollouts and scenario analysis.
- Strategy Agent: Prescribes optimal pit windows and traffic risk assessments based on agent-coordinated insights.
- Live Leaderboard: Real-time interval tracking, stint history, and tyre compound visualization.
- Strategy HUD: Dynamic "Action Badges" (PIT/STAY) with predictive position gain and undercut success probability.
- Telemetry Explorer: Deep-dive lap time analysis with dirty-air (traffic) impact indicators.
- Track Map: Real-time GPS-derived car positioning on a specialized vector track map.
- Race Replay: Complete session play/pause/scrub capability to analyze previous laps after the race.
cd STRATOS
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"cp .env.example .env
# Edit .env – set OPENF1_BASE_URL, POLL_INTERVAL_SECONDS, SIM_COUNT, etc.By default, STRATOS uses the session_key=latest parameter from the OpenF1 API, which currently points to the 2026 Australian Grand Prix (Melbourne).
To view data from a different race, set the SESSION_KEY environment variable before starting the dashboard.
- Bahrain GP:
SESSION_KEY=9472 - Saudi Arabian GP:
SESSION_KEY=9480 - Australian GP:
SESSION_KEY=9488 - Japanese GP:
SESSION_KEY=9496 - Monaco GP:
SESSION_KEY=9523
# Example: Start dashboard with Bahrain 2024 data
SESSION_KEY=9472 python -m stratos.dashboard.apppytest tests/ -vpython -m stratos.dashboard.app
# Open http://127.0.0.1:8050| Module | Description |
|---|---|
stratos/agents/ |
Autonomous Multi-Agent System governing data flow and decisions |
stratos/ingestion/ |
OpenF1 REST client + Pydantic schemas |
stratos/state/ |
Race state dataclass + thread-safe state manager |
stratos/models/ |
Tyre degradation, vehicle performance, traffic, pit stop |
stratos/simulation/ |
Monte Carlo race simulator + safety car model |
stratos/strategy/ |
Strategy evaluator, optimizer, recommendation output |
stratos/dashboard/ |
Plotly Dash app with live telemetry and strategy panels |
All telemetry is sourced from the OpenF1 public API (no authentication required):
https://api.openf1.org/v1
Endpoints used: /laps, /position, /pit, /car_data, /weather, /track_status
| Variable | Default | Description |
|---|---|---|
OPENF1_BASE_URL |
https://api.openf1.org/v1 |
API root |
POLL_INTERVAL_SECONDS |
3 |
Telemetry polling cadence |
SIM_COUNT |
10000 |
Monte Carlo trials per strategy |
DEFAULT_PIT_LOSS_SECONDS |
23.0 |
Pit time loss fallback |
DASH_HOST |
127.0.0.1 |
Dashboard host |
DASH_PORT |
8050 |
Dashboard port |
- Python 3.11+ · NumPy · Pandas · SciPy
- Plotly Dash + Dash Bootstrap Components
- HTTPX (async HTTP) · Pydantic v2 (data validation)
- pytest · respx (mock HTTP) for testing
