mirror of
https://github.com/IAmTomShaw/f1-race-replay.git
synced 2026-05-09 08:25:56 +02:00
[PR #168] [MERGED] Bayesian state-space tyre degradation model #190
Labels
No labels
bug
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/f1-race-replay#190
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/IAmTomShaw/f1-race-replay/pull/168
Author: @skandas1304
Created: 1/13/2026
Status: ✅ Merged
Merged: 1/29/2026
Merged by: @IAmTomShaw
Base:
main← Head:bayesian-tyre-degradation📝 Commits (7)
6699ce1Add Bayesian state-space tyre degradation model4c8052cStabilize tyre degradation estimation using median slopes and compound-specific priors2e4d537Merge branch 'main' into bayesian-tyre-degradationee44b8fRefactoring the tyre degradation to universal and condition-aware modelb481ebcMinor cleanupae22204Merge branch 'bayesian-tyre-degradation' of https://github.com/skandas1304/f1-race-replay into bayesian-tyre-degradationb2c92a7Merge branch 'main' into bayesian-tyre-degradation📊 Changes
5 files changed (+905 additions, -1 deletions)
View changed files
📝
src/arcade_replay.py(+1 -1)➕
src/bayesian_tyre_model.py(+664 -0)📝
src/interfaces/race_replay.py(+25 -0)➕
src/tyre_degradation_integration.py(+164 -0)📝
src/ui_components.py(+51 -0)📄 Description
Summary
This PR introduces a Bayesian state-space tyre degradation model for the race replay system.
The implementation is inspired by recent state-space approaches used in motorsport analytics and is designed to be robust to noisy race telemetry.
Model overview
Tyre performance is modeled as a latent pace state that evolves lap-by-lap:
This allows degradation behavior to adapt naturally across tracks, compounds, and stint lengths.
Health vs degradation (important clarification)
The UI exposes a “tyre health” value derived from the model output.
This value does not represent physical tyre wear or “tyre life remaining”.
Instead, it represents distance from peak performance within a strategy-relevant window.
Key implications:
This distinction is especially important for tracks like Mexico, where thermal effects cause early loss of peak pace but tyres remain usable for many laps.
Track-dependent behavior
The model intentionally produces different degradation signatures depending on circuit characteristics:
These effects emerge naturally from the data rather than being hard-coded.
Paper reference
The structure of this model is inspired by state-space approaches to tyre degradation modeling, in particular:
While this implementation uses a fast MAP-style estimation suitable for real-time replay, the architecture allows future extension to full Bayesian inference (e.g. PyMC / Stan).
Integration details
bayesian_tyre_model.pyValidation
The model was tested on multiple races with expected qualitative behavior:
This confirms the model behaves realistically across track types.
After the addition of the tyre health bar
A demo video at 128x ( taken at 128x to achieve a video size less than 10MB)
https://github.com/user-attachments/assets/cb13c998-27ae-40b1-814f-b17589c97afd
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.