-
-
The "Hero Shot" - The Pit Wall Dashboard (Working Model)
-
The Core Data - Tire Degradation & Pit Window Graph
-
The Input/Output - Simulator Controls & Leaderboard
-
The Input/Output - Simulator Controls & Leaderboard
-
The Critical Decision - Overtake Probability & DRS Zone
-
F1 Context & Data Overlay (Conceptual)
Pace Optimizer
Tagline: Simulate the Optimal Strategy — Real-time Prediction for Pit Stops and Overtakes
Inspiration
As a lifelong Formula 1 enthusiast, I’ve always been fascinated by the razor-thin margins that separate victory from defeat. Watching how strategy calls — like an early pit stop under Safety Car, or delaying DRS to build battery — can flip a race in seconds inspired me to look beyond the spectacle and into the data science of racing.
The TrackShift Innovation Challenge was the perfect opportunity to fuse that passion with engineering: to build a dynamic, learning-based simulator that challenges the fragility of pre-race strategy plans.
In Formula 1, a pre-defined race plan often collapses under real-world conditions:
Sudden Safety Cars,
Tire cliff effects (sharp pace drop after thermal degradation),
Traffic undercuts, and
Rapid track evolution.
Teams typically react to these variables. My goal was to design a system that predicts them, recalculates live, and proposes proactive strategic commands.
That system became Pace Optimizer — a real-time racing strategy engine that simulates, predicts, and optimizes every lap.
What It Does
Pace Optimizer acts as a live pit wall intelligence system that computes the minimum total race time and outputs clear, actionable strategy updates in real time.
Core Functions
Race Flow Simulation
Models each driver (agent) with a dynamic Pace Index (Pᵢ) that evolves over laps.
The pace changes based on tire age, compound type, and degradation pattern.
For each car:
$$Pi(L)=Pbase−ΔTdeg(L)+ΔTDRS(L)+εtrack$$
Pbase = baseline car pace tΔTdeg(L) : ire degradation penalty ΔTDRS(L): time gained from DRS εtrack: random track evolution term
Pit Stop Optimization
At each lap, the system evaluates all remaining pit windows and minimizes Total Race Time (Tₜₒₜₐₗ):
$$Ttotal=L=∑N(Tbase+ΔTdeg(L))+k=∑pTpit,k$$
Uses a rolling heuristic search (like simulated annealing) to determine the optimal lap to pit by balancing the time lost in pit lane (Tₚᵢₜ) against the time gained from fresh tires.
Overtake Probability Estimation (DRS Model)
Computes the probability of successful overtake based on relative pace and drag reduction benefit:
$$Povertake=σ(α(ΔVDRS)−β(ΔTdeg)+γ(BERS))$$
where 𝜎 σ is a sigmoid activation function, and coefficients α, β, γ calibrate the influence of DRS delta, tire wear, and ERS boost respectively.
Visual Race Intelligence Dashboard
Built with Streamlit, providing real-time simulation of:
Agent positions and gaps
Tire wear progression
Strategic recommendations like:
“Pit Window Open: Lap 21–23” “DRS Recommended: Sector 2, Lap 12”
How We Built It
Language: Python Libraries: NumPy, Pandas, Streamlit, Matplotlib
Architecture:
The simulation core follows an Agent-Based Model (ABM) structure.
Each car is defined as an independent object with parameters:
class CarAgent:
def __init__(self, pace_base, tire_type, strategy_id):
self.pace_base = pace_base
self.tire_type = tire_type
self.strategy_id = strategy_id
self.tire_age = 0
Tire Degradation Model Realistic tire performance follows a nonlinear curve — initially stable, then a steep drop-off (“cliff”):
$$ΔTdeg(L)=Cdeg⋅Lage2+δcompound$$
is derived empirically for Soft, Medium, and Hard compounds (e.g., Soft = 0.0025, Medium = 0.0018).
Heuristic Optimization Engine Instead of brute force, the algorithm runs lightweight predictive iterations:
$$Tfuture(Lpit)=Tsofar+Tpit+L=Lpit∑N(Tbase+ΔTdeg(L))$$
Challenges We Overcame
Synthetic Telemetry Generation: We lacked live F1 telemetry APIs, so I designed a data synthesis pipeline to simulate realistic lap deltas, degradation, and tire performance using stochastic models.
Visualization Latency: Streamlit dashboards initially lagged due to continuous frame updates — resolved by caching simulation states and async updates.
Scope Discipline: Instead of modeling fuel burn or weather, I focused on pit and DRS dynamics, the two highest-impact variables for race strategy.
Accomplishments
Built a fully working real-time simulator that identifies pit windows faster than static strategies.
Developed an explainable AI tool that outputs deterministic decisions — crucial for real-world strategy engineers.
Delivered a clean, educational dashboard that makes F1-level strategy visual, accessible, and interactive for any racing enthusiast.
What I Learned
Heuristics often outperform ML in real-time decision-making when interpretability is key.
Agent-Based Modeling allows rapid, modular simulation of complex systems like multi-car races.
The user experience matters as much as the computation — clear visualization bridges the gap between code and decision.
What’s Next
API Integration: Connect to Ergast API and FastF1 datasets for historical calibration of degradation constants.
Cloud Deployment: Host the optimization engine on AWS Lambda or Google Cloud Run for real-time streaming input.
Multi-Agent Dynamics: Introduce dirty air effects using aerodynamic drag loss models: $$Fdownforce=F0(1−kd⋅e−d)$$
to simulate how following cars lose grip behind traffic.
Team Decision Support System: Build a web-based dashboard for pit walls — integrating race event triggers, tire predictions, and strategy deltas in one live view.
Final Thought
Pace Optimizer represents my vision of how data-driven motorsport should evolve — where every pit stop, overtake, and lap time is calculated, not guessed.
Log in or sign up for Devpost to join the conversation.