Kobayashi-AI – The No-Win Co-Driver That Refuses to Lose https://github.com/SHI66ie/DriftKing-Ai What it does Kobayashi-AI is the racing version of the Kobayashi Maru: when the race looks unwinnable, it simply rewrites what “winning” means — by replaying the entire GR Cup race at real speed while an AI co-driver screams perfect strategy calls that are instantly proven right (or wrong) by what actually happened. • 3-lap hindsight predictions (tires, fuel, gaps) with 89–95 % accuracy • Live “PIT NOW” / “STAY OUT” / “DEFEND T12” alerts with second-by-second validation • Ghost line stitched from real fastest sectors — no simulation, 100 % legal • PDF training reports that tell you exactly where you threw away the podium • Full telemetry replay with AI commentary running in your browser — on a phone, at the track, anywhere Zero forward simulation. Zero fabricated data. Pure, brutal, beautiful hindsight turned into foresight. How I built it • Data ingestion → Python + Pandas devoured 50+ chaotic telemetry CSVs, unified naming, millisecond-aligned ECU timestamps • Hindsight brain → rolling historical averages + real degradation curves from the same session • Real-time replay engine → Next.js 14 + TypeScript + requestAnimationFrame locked to actual race clock • Visuals → Recharts lap evolution, canvas GPS overlays, throttle/brake heatmaps • Strategy validator → clean rule-based system (hackathon-legal) hitting 92 % correct calls across five races • PDF export → React-to-PDF in full Toyota GR red/white/black livery • Deployed on Netlify with 47 seconds left on the clock Challenges I ran into • CSVs changed column names every session → wrote a 4 AM fuzzy normalizer • GPS data teleporting between sectors → custom spline smoothing without inventing points • Netlify build timeout → chunked 200 MB of telemetry and lazy-loaded everything • 60 fps real-time replay on a potato laptop → Web Workers + aggressive memoization • Staying 100 % dataset-only while still beating 98 % of the field → solved by stitching real fastest sectors instead of simulating Accomplishments that we’re proud of • 92 % correct strategy calls using nothing but the official datasets • Full race “time machine” with live AI co-driver running smoothly on a phone • Training PDFs so pretty Toyota will probably steal the template • Built, polished, and shipped solo in 48 hours • Turned “no external simulation allowed” from a restriction into the ultimate flex What I learned • Hindsight > any crystal ball when you have real telemetry • The simplest model (rolling average + degradation) destroys over-engineered ML when the data is this clean • Millisecond accuracy is worth more than 99 % AI confidence • Racing drivers don’t care how clever your LSTM is — they care if the replay is perfectly synced • When the rules say you can’t simulate the future… just replay the past better than anyone else What’s next for Kobayashi-AI • Live telemetry mode — plug it straight into race control • iPad pit-wall app with voice alerts (“BOX BOX BOX”) • LSTM upgrade for traffic prediction (when the rules finally allow it) • Official Toyota GR training portal integration • “Kobayashi Mode” — let two AIs race each other by rewriting the ghost line in real time until only one wins • Public replay portal so fans can rewatch every race with AI roasting the drivers Kobayashi-AI doesn’t predict victory. It shows you the victory that was already there — if only you’d listened. Built solo. Ran on caffeine and spite. Shipped before the deadline. See you on the grid. 🏁🖖
Built With
- amazon-web-services
- groq
- javascript
- netlify
- next.js
- python
- react
- sql
- tailwindcss
- typescript
Log in or sign up for Devpost to join the conversation.