Inspiration

Modern GR Cup race engineers must process an overwhelming amount of information during every lap — gaps, deltas, tire degradation, pit windows, sector losses, and weather effects.

GR Cup RaceBrain – Real-Time Intelligence System was inspired by a simple idea:
“What if a single engineer had access to the entire race brain in real time?”

Using official Sebring and Road America datasets, the goal was to recreate a real motorsport pit wall where strategy, data science, and live decision-making come together.


What it does

GR Cup RaceBrain acts as a virtual race engineer, providing:

  • Live lap-by-lap race simulation
  • Position tracking and gap evolution
  • Pace trend and consistency analysis
  • Tire degradation modeling
  • Sector performance heatmaps
  • Pit window & undercut/overcut strategy
  • Weather impact interpretation

With Vertex AI (Gemini 2.5 Flash) enabled, it adds:

  • Race Analyst – strategic race summaries
  • Incident Explainer – slow laps, traffic, anomalies
  • Overtake/Defense Coach
  • Sector Coach
  • Lap-by-Lap AI Narratives
  • Global RaceBrain – multi-CSV integrated race storyline

How I built it

The system was built using:

  • Python 3.10
  • Streamlit for a responsive engineering dashboard
  • Pandas + NumPy for timing, sector modeling, and stint logic
  • Plotly for heatmaps, charts, and race visualization
  • Google Vertex AI for real-time strategy intelligence

Core pipeline

  1. Load and merge Sebring/Road America datasets.
  2. Build timing, sector, stint, and weather models.
  3. Compute pace, deltas, degradation, and pit windows.
  4. Convert race DataFrames into AI-ready sanitized context.
  5. Use Gemini 2.5 Flash for motorsport-specific reasoning.
  6. Render insights in a clean Streamlit UI for real-time use.

Challenges I ran into

  • Handling more than 3.25GB of GR Cup data across multiple CSV formats
  • Reconciling inconsistent lap indexes and missing rows
  • Ensuring real-time responsiveness across 21+ cars
  • Prompt-engineering AI to think like a race engineer
  • Designing sector heatmaps and degradation models with accuracy
  • Creating a secure, judge-friendly Vertex AI setup

Accomplishments that I am proud of

  • Built a full GR Cup race replay & real-time simulation engine
  • Created accurate tire degradation and pit strategy modeling
  • Designed sector heatmaps that highlight corner-level weaknesses
  • Developed Global RaceBrain, a unique multi-CSV AI reasoning module
  • Integrated motorsport-specific AI coaching
  • Delivered a clean, intuitive interface that mirrors real pit wall systems
  • Provided a secure system for judges with dedicated GCP credentials

What I learned

  • Advanced motorsport engineering concepts (pace decay, tire wear, undercut dynamics)
  • How to merge timing + sector + weather streams into one race model
  • Data cleaning techniques for irregular racing data
  • AI context building & sanitization for high-accuracy prompts
  • Streamlit performance tuning for large datasets
  • The importance of intuitive UX in high-pressure race analysis tools

What's next for GR Cup RaceBrain – Real-Time Intelligence System

  • Add full telemetry (speed, throttle, brake, g-forces)
  • Machine-learning pace prediction models
  • Real-time weather API integration
  • Driver-vs-driver performance overlays
  • Auto-generated pit strategy recommendations
  • Cloud deployment for live remote engineering
  • Support future GR Cup seasons and additional circuits

Built With

  • ai
  • altair-(optional)
  • application-default-credentials-(adc)
  • brain
  • custom-prompt-engineering
  • dataframe-sanitization-pipeline
  • driver-deep-dive-module
  • gemini-2.5-flash
  • git
  • github
  • global
  • google-cloud-ai-platform-sdk
  • google-cloud-aiplatform-sdk
  • google-vertex-ai
  • matplotlib-(optional)
  • numpy
  • openpyxl
  • pandas
  • pit-window-simulation-logic
  • plotly
  • powershell
  • python-3.10
  • python-docx
  • race
  • real-time-standings-engine
  • road-america)
  • sector-csvs
  • sector-performance-heatmaps
  • semicolon-delimited-csv-ingestion-engine
  • streamlit
  • telemetry-style-lap-files
  • timing-csvs
  • tire-degradation-modeling
  • trd-gr-cup-datasets-(sebring
  • vs-code
  • weather-csvs
Share this project:

Updates