Inspiration

In 2024, I spent months on a TIPE research project (French preparatory school engineering exam) studying athlete fatigue through speed, cadence, and heart rate. I discovered something critical: these three metrics alone miss the full picture. A player can have a normal heart rate while their body temperature is climbing dangerously, or their mechanical power is collapsing due to heat stress.

When I learned about the PhysTech 2026 Hackathon, I knew I could transform this research into something real — a tool that could actually save players from injury and help coaches win matches.

What It Does

TactiFit AI is a real-time player fatigue prediction system for football coaches. Unlike traditional tracking (Catapult, STATSports) that only shows "your player ran 10.2km", TactiFit calculates:

Physics Model Equation What It Predicts
Mechanical Power P = m·a·v + I·ω²/2 Real effort, not just distance
Fatigue Integral F(t) = ∫(P/Pmax)·e^(-t/τ_rec)dt Cumulative fatigue with recovery
Thermal Balance mc·dT/dt = P_met - P_losses Core body temperature
Cardiac Load TRIMP_thermal = ∫HR_r·e^(b·HR_r)·(1+α·ΔT/20)dt Temperature-corrected effort

The dashboard shows:

  • Live pitch view with color-coded player energy bars
  • Automatic alerts: "SUBSTITUTE MBAPPÉ NOW — 85% injury risk"
  • Physics-based explanations: why each player is fatigued

How We Built It

Backend (Python/Flask):

  • physics_engine.py: 5 physics models (mechanics, thermodynamics, cardiovascular, fatigue integral, optimal substitution)
  • ml_model.py: XGBoost with physics-informed features + heuristics fallback
  • app.py: REST API with real-time simulation endpoints

Frontend (Vanilla JS/HTML/CSS):

  • SVG football pitch with live player positioning
  • Auto-updating energy bars and fatigue alerts
  • Time-control slider (15', 45', 60', 75', 85') for demo
  • Modal with detailed physics breakdown per player

Hardware design:

  • TactiFit Mini Sensor: 35g, GPS 10Hz + IMU 100Hz + PPG heart rate
  • Position: between shoulder blades, under jersey (FIFA/IFAB compliant)
  • Transmission: Bluetooth 5.0 LE, <2s latency to coach tablet

Challenges We Ran Into

  1. The watch problem: Players don't wear wrist devices in official matches. We pivoted to a dorsal module design (35g, jersey pocket) — same data, match-legal.

  2. Physics vs ML balance: Pure physics models are interpretable but miss human factors (motivation, sleep). Pure ML is a black box. We combined both: physics provides the foundation, ML learns the residuals.

  3. Real-time constraints: 100Hz IMU data is heavy. We downsampled to 10Hz for GPS alignment and used sliding windows (60s) for feature calculation — keeping latency under 2 seconds.

  4. Thermal calibration: The TRIMP thermal correction factor $(\alpha = 0.1)$ was derived from literature (Morris et al. 2018) and validated against WBGT stress indices.

Accomplishments That We're Proud Of

  • From 3 to 25 features: TIPE had speed, cadence, HR. TactiFit has 15 raw + 10 engineered features including heat effort, recovery deficit, and sprint ratio.
  • Physics engine validates ML: Our fatigue integral with exponential recovery matches known physiological models — the ML improves on it, not replaces it.
  • Match-legal hardware: 35g, IP67, FIFA-compliant positioning. Pro systems cost €3,000/player. Our target: €80 at scale.
  • Real demo: Working Flask API + live dashboard with 11 simulated players, auto-alerts, and time-travel simulation.

What We Learned

  • Sports science is hard: A player's "distance run" means nothing without context. 10km at 15°C ≠ 10km at 30°C + 80% humidity.
  • Explainability matters: Coaches won't trust a black box. SHAP-style feature contributions ("+18% due to 78 minutes played") are essential.
  • Hardware constraints drive software: Designing for <50g forced us to optimize every algorithm for lightweight computation.

What's Next for TactiFit AI

  1. Train real XGBoost: Collect real match data, use TimeSeriesSplit validation, Optuna hyperparameter optimization
  2. SHAP integration: Replace heuristic explanations with formal SHAP values per prediction
  3. Isotonic calibration: Ensure 0.8 fatigue score = 80% measured fatigue probability
  4. WebSocket live streaming: Replace HTTP polling with SSE/WebSockets for true real-time
  5. Hardware prototype: 3D print the 35g module, test with amateur teams
  6. Mobile app: React Native coach app for pitch-side use

Built With

Share this project:

Updates