VforVitorio/F1-StratLab
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.
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
OriginalF1 StratLab
Race strategy, decided by six agents.
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
🏆 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.
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.
Replay · where the cars are |
PITWALL · DATA · what the timing screen says |
PITWALL · AGENTS · what it decided, and why |
The other two surfaces:
CLI, headless Rich panel, one race, no GUI. Play ▶ |
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 readsrc/pitwall/: the two desktop windows (React in a webview, one stream client)src/agents/: multi-agent orchestrator (N25 → N31)src/simulation/:RaceReplayEngine+RaceStateManagersrc/telemetry/: FastAPI backend + React web app (post-race UI, git submodule)src/nlp/: radio transcription + sentiment/intent/NER pipelinesrc/rag/: Qdrant retriever over FIA sporting regulationssrc/f1_strat_manager/: CLI infrastructure (data bootstrap, GP slug resolver)scripts/: CLI entry points and maintenance toolsdocs/: 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:
- F1 StratLab (this repo): strategy engine
- F1 Telemetry Manager: FastAPI backend + React web app (post-race UI), vendored here under
src/telemetry/as a git submodule - F1 AI Team Detection: YOLOv12 team identification from race footage
- F1 Strategy Dataset (Hugging Face): trained weights and processed race data
- Thesis + IEEE technical report: the full TFG memoria and IEEE report (deep methodology, metrics, design rationale)
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
tensorflow/tensorflow
An Open Source Machine Learning Framework for Everyone
201,427 starshuggingface/transformers
🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training.
168,711 starsAUTOMATIC1111/stable-diffusion-webui
Stable Diffusion web UI
165,274 starsComfy-Org/ComfyUI
The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.
146,024 stars