F1 Race Strategy Agent
Description
CSE 598 Agentic AI capstone baseline — an agentic F1 race-strategy engineer: a Claude tool-use loop that recommends pit/tyre strategy over real FastF1 telemetry, tested against a deterministic optimum.
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
F1 Race Strategy Engineer Agent — CSE 598 Capstone Baseline
An **agentic** baseline: Claude acts as a Formula 1 race strategist. Given a driver and their starting tyre, the agent reasons over **real 2021 Spanish GP telemetry** to recommend a pit/tyre strategy. It runs a genuine *plan → call tools → observe → refine* loop — it inspects tyre degradation, proposes candidate one- and two-stop strategies, simulates each with a deterministic race-time model, compares them, and submits a final recommendation.
The recommendation is **objectively checkable**: it is compared against the optimum of the same deterministic simulator (see `data/ground_truth.json`).
What the baseline does (step by step)
- Model — Anthropic
claude-opus-5(configurable) via the officialanthropicSDK, driven by a hand-written tool-use loop in `src/agent.py` (the loop is explicit on purpose, so the agentic cycle is visible). - Tools the agent can call (`src/tools.py`):
get_race_info— race length, compounds, pit-loss, min stint length.get_driver_stints— a driver's actual stints + starting compound (from data).estimate_tyre_degradation— fits a linear pace-vs-tyre-age model per compound from that race's green-flag laps.simulate_strategy— deterministic estimate of total race time for any proposed stint plan (validates: laps sum to race length, ≥2 compounds, min stint length).
- Data — real timing data from FastF1, pre-downloaded
into
cache/and read in offline mode → no network needed for race data.
Setup
git clone https://github.com/DoomDust7/f1-race-strategy-agent.git
cd f1-race-strategy-agent
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
API key (required)
The agent calls the Anthropic API, so you need an API key with credits.
cp .env.example .
Related Skills
Agency Agents
A complete AI agency at your fingertips - From frontend wizards to Reddit community ninjas, from whimsy inject
AI Awesome Llm Apps
100+ AI Agents, Agent Skills and RAG Apps - Free and Open Source.
AI Firecrawl
🔥 The API to search, scrape, and interact with the web for AI
AI Artifacts Builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web tech
AI Headroom
Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agen
AI CrewAI
Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewA
AI