Skip to content
Projects

VforVitorio/F1-StratLab has 32 GitHub stars and 3 forks. Star changes are not measured yet. Last checked 2026-11-09 18:04 UTC. Last push 2026-11-02.

How these counts are measured

Open-source multi-agent AI platform for Formula 1 race replay, strategy simulation, and explainable race strategy recommendations. (work in progress, MVP in legacy branch)

What you can do

  • Lap-by-lap 2D race replay of a Grand Prix, in real time
  • Six specialised strategy agents (pace, tire, race situation, pit, radio, regulations) plus a Monte Carlo orchestrator
  • Explainable output: every recommendation exposes each agent's reasoning
  • Team-radio transcription and NLP (Whisper, RoBERTa, SetFit, BERT-large)

Measured star growth

in 24h
Update delayed
in 7 days
Update delayed
in 15 days
Update delayed
in 1 month
Update delayed

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README.md

Original

F1 StratLab

Race strategy, decided by six agents.

License Python Latest release CI Docs

React Vite PyTorch FastF1 Ask DeepWiki

F1 StratLab is an open-source multi-agent AI platform for Formula 1 race replay and real-time strategy simulation. Replay a full race lap by lap in an interactive 2D interface and watch six specialised agents and an orchestrator work out an explainable strategy for every lap, covering tire wear, lap time, race situation, pit windows, team radio, and FIA regulations.

Documentation: https://docs.f1stratlab.com/

Landing page · Full documentation · DeepWiki · Paper · Hugging Face dataset

▶ Qatar 2025, lap 7. The Safety Car comes out mid-lap and sixteen of the twenty cars box. McLaren stays out. This is what the three windows were saying while that happened. Full clip ▶ · all three surfaces on the landing page.

🏆 Final Degree Project, completed June 2026 · graded 10/10 with Distinction (Matrícula de Honor) · unanimously recommended by the tribunal for publication as a research article.

Latest release


What it is

In Formula 1, strategic decisions must be made within seconds while juggling weather, tire wear, track position, and fuel. F1 StratLab packages a multi-agent AI system (six specialised agents coordinated by an orchestrator) plus a 2D race replay and a post-race analytics UI into a single repository. Data comes from FastF1 and OpenF1; models span XGBoost, TCN + MC Dropout, LightGBM, RoBERTa / SetFit / BERT-large, Whisper, and FIA RAG over Qdrant.

See ARCHITECTURE.md for the one-page topology and docs/ for the deep dives.

Features

  • Lap-by-lap 2D race replay of a Grand Prix, in real time
  • Six specialised strategy agents (pace, tire, race situation, pit, radio, regulations) plus a Monte Carlo orchestrator
  • Explainable output: every recommendation exposes each agent's reasoning
  • Team-radio transcription and NLP (Whisper, RoBERTa, SetFit, BERT-large)
  • Retrieval over the FIA sporting regulations (Qdrant + BGE-M3)
  • Live telemetry windows and post-race analytics
  • Natural-language chat over a finished race
  • Three ways to run it: CLI, Arcade, and the Web app (React SPA)

Three surfaces, one codebase

Surface Command When to use
CLI f1-strat (interactive wizard) · f1-sim Melbourne VER "Red Bull Racing" --year 2025 (headless) Headless Rich-based live inference panel for a single race. f1-strat opens an arrow-key menu (GP, driver, provider, head-to-head); f1-sim is the scripted form.
Arcade (primary live UI) f1-arcade --viewer --year 2025 --round 3 --driver VER --team "Red Bull Racing" --driver2 LEC --strategy Three windows off one stream: the 2D race replay plus PITWALL DATA and PITWALL AGENTS. No backend required.
Web app (post-race) f1-webapp (wraps docker compose up) React SPA (Vite + TypeScript + Tailwind + ECharts): telemetry dashboard, 60fps driver comparison, ML model lab, multi-agent pit-wall strategy, race analysis, and a streaming AI chat that renders tool results inline. Backed by FastAPI.

What the Arcade opens

Three windows off one shared stream, and the row below is one moment on all three: the lap the Safety Car arrives.

The pyglet replay: twenty cars on the circuit outline with the Safety Car pill lit
Replay · where the cars are
PITWALL DATA: the twenty-row timing tower, sector times and the own-car traces
PITWALL · DATA · what the timing screen says
PITWALL AGENTS: the decision band over the six specialist consoles
PITWALL · AGENTS · what it decided, and why

The other two surfaces:

F1 StratLab CLI demo: headless Rich live inference panel
CLI, headless Rich panel, one race, no GUI. Play ▶
F1 StratLab v2 web app demo: head-to-head 60fps replay, ML model lab, a multi-agent pit-wall call, and a streaming AI strategist rendering charts inline
Web app, post-race analytics and the AI strategist. Full ~30s tour ▶

How to run

CLI: install the wheel, then launch the interactive wizard (banner + arrow-key pickers):

uv tool install "git+https://github.com/VforVitorio/F1-StratLab.git"
f1-strat

For a scripted, no-menu run use f1-sim <gp_name> <driver> <team> --year <yyyy> instead.

Arcade: build the PITWALL UI bundle from a source checkout before installing f1-arcade; the bundle is not committed. Follow the Arcade steps in INSTALL.md, then run f1-arcade.

Web app: clone with the telemetry submodule, add an env file, then bring the stack up with Docker (FastAPI + the React SPA):

git clone --recurse-submodules https://github.com/VforVitorio/F1-StratLab.git && cd F1-StratLab
cp .env.example .env          # add OPENAI_API_KEY, or set F1_LLM_PROVIDER=lmstudio
docker compose up

Requires Python 3.10-3.12 and an OPENAI_API_KEY (or F1_LLM_PROVIDER=lmstudio). Full options (pip fallback, local web-app dev server, data bootstrap) in INSTALL.md.

Project layout

  • src/arcade/: 2D race replay (pyglet) + the TCP broadcast the followers read
  • src/pitwall/: the two desktop windows (React in a webview, one stream client)
  • src/agents/: multi-agent orchestrator (N25 → N31)
  • src/simulation/: RaceReplayEngine + RaceStateManager
  • src/telemetry/: FastAPI backend + React web app (post-race UI, git submodule)
  • src/nlp/: radio transcription + sentiment/intent/NER pipeline
  • src/rag/: Qdrant retriever over FIA sporting regulations
  • src/f1_strat_manager/: CLI infrastructure (data bootstrap, GP slug resolver)
  • scripts/: CLI entry points and maintenance tools
  • docs/: architecture, API reference, arcade guides (the docs site source)
  • documents/dev_docs/diagrams/: draw.io diagram sources

Contributing

See CONTRIBUTING.md for dev setup, code-style rules, and the untouchable-files list. Bug reports, feature ideas, and data anomalies go through the templates under .github/ISSUE_TEMPLATE/.

Related

This project is part of a broader F1 AI suite:

About

Final Degree Project (Trabajo Fin de Grado), Fourth year, Grado en Ingeniería de Sistemas Inteligentes. Feedback, suggestions and contributions are welcome via the issue templates.

Cite this work

When F1 StratLab is useful in research, in writing or in a project, please cite it. GitHub's "Cite this repository" button reads the same CITATION.cff, but here it is in full so it can be copied without leaving the page.

BibTeX

@software{vega_sobral_f1stratlab,
  author  = {Vega Sobral, V{\'i}ctor},
  title   = {{F1 StratLab}: an open multi-agent system for Formula 1 race strategy},
  year    = {2026},
  version = {2.0.1},
  url     = {https://github.com/VforVitorio/F1-StratLab},
  note    = {Documentation: https://docs.f1stratlab.com/}
}

APA

Vega Sobral, V. (2026). F1 StratLab: an open multi-agent system for Formula 1 race strategy (Version 2.0.1) [Computer software]. https://github.com/VforVitorio/F1-StratLab

Plain text, a link is enough for a blog post or a talk:

F1 StratLab by Víctor Vega Sobral, https://github.com/VforVitorio/F1-StratLab

When a project builds on a specific part, citing the version used helps: the strategy engine changes between releases, so the numbers in a v1 run are not the numbers in a v2 one. And using it for something is worth an issue or a message about it: that is the only way to find out where this ends up.


Disclaimer: no copyright infringement intended. Formula 1, F1, and related marks are trademarks of Formula One Licensing B.V. and are used here for reference only. All race data is sourced from public APIs (FastF1, OpenF1) and is used strictly for educational and non-commercial purposes. This project is not affiliated with, endorsed by, or in any way officially connected to Formula 1, the FIA, or any F1 team.

Explore related projects