Inspiration

Toyota’s Hack-the-Track challenge hides an optimization problem, so I framed it as an Ising energy minimization exercise powered by thrml to show crews how physics-grade sampling can steer pit calls.

What it does

TRD CSVs are normalized into tire, fuel, caution, gap, and pit-lane evidence frames via TelemetryParserConfig/TRDTelemetryParser, so every tick carries the signals that matter for pit decisions (src/hacktrack/telemetry.py:13). The IsingDecisionMaker builds opposing pit/stay attractor pools, feeds them to thrml’s IsingEBM, and samples Gibbs states to report probabilities plus magnetization (src/hacktrack/ising_decision_maker.py:16). A CLI then streams telemetry or a scripted stint and renders dual confidence bars so judges can watch the recommendation swing in real time (src/simulate_idm.py:55).

How I built it

The repo is structured as a tidy Python package + CLI under src/ with curated telemetry samples and documentation so everything runs offline. Setup is just creating a venv, installing the vendored thrml dependencies, and pointing simulate_idm.py at real or synthetic telemetry. Dataclasses keep the evidence, weight, and result contracts explicit while thrml blocks define the sampling schedule and couplings inside the decision maker (src/hacktrack/ising_decision_maker.py:55).

Challenges I ran into

Binarizing noisy analog telemetry without losing signal required a careful mix of lateral/longitudinal Gs, brake pressure, and lap distance scaling, as laid out in the blueprint and encoded in _row_to_evidence (docs/Ising Model for Racing Hackathon (formatted).md:21, src/hacktrack/telemetry.py:46). Stabilizing the dual attractor network also meant tuning pool sizes, ferromagnetic/cross couplings, β, and warmup steps so the sampler didn’t collapse both pools into identical states (src/hacktrack/ising_decision_maker.py:58).

Accomplishments that I'm proud of

I now have an end-to-end pit call recommender with deterministic seeds, explicit evidence math, and reproducible sampling runs that teams can drop into notebooks or dashboards (src/hacktrack/ising_decision_maker.py:83). The CLI dashboard turns those probabilities into readable bars for judges and works whether I feed it Toyota telemetry or a scripted stint (src/simulate_idm.py:55). On top of the code, the repo ships with architecture + UML diagrams that make it easy for partners to grasp how data flows through the toolkit.

What I learned

This build reinforced how probabilistic graphical models capture coupled racing dynamics better than independent regressors, and how thrml’s sampling programs surface useful uncertainty bands instead of brittle single answers (docs/Ising Model for Racing Hackathon (formatted).md:10, docs/Ising Model for Racing Hackathon (formatted).md:18). I also learned to think directly in terms of λ weights to bias fields; tweaking those dataclass values gives interpretable crew-chief controls (src/hacktrack/ising_decision_maker.py:133).

What's next for Toyota GR Hack-the-Track Toolkit

I’m extending the same thrml pipeline to the other blueprints outlined in the strategy doc (optimal racing line, tire phase-change predictor, pack sociophysics) so the project covers every hackathon judging lane (docs/Ising Model for Racing Hackathon (formatted).md:8). I also plan to swap the sample CSV for the larger raw track drops already staged under data/raw/ and hook the CLI up to a lightweight web dashboard for remote demos (src/simulate_idm.py:66).

Built With

Share this project:

Updates