<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: dhruv</title>
    <description>The latest articles on DEV Community by dhruv (@xeni7h).</description>
    <link>https://dev.to/xeni7h</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3979924%2F0254724a-5e76-4a67-a2eb-21ca325a2110.png</url>
      <title>DEV Community: dhruv</title>
      <link>https://dev.to/xeni7h</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/xeni7h"/>
    <language>en</language>
    <item>
      <title>Chaos Engine: I Built an AI That Settles F1 Pit Stop Arguments</title>
      <dc:creator>dhruv</dc:creator>
      <pubDate>Mon, 13 Jul 2026 06:58:48 +0000</pubDate>
      <link>https://dev.to/xeni7h/chaos-engine-i-built-an-ai-that-settles-f1-pit-stop-arguments-ffj</link>
      <guid>https://dev.to/xeni7h/chaos-engine-i-built-an-ai-that-settles-f1-pit-stop-arguments-ffj</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for &lt;a href="https://dev.to/challenges/weekend-2026-07-09"&gt;Weekend Challenge: Passion Edition&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;I built &lt;strong&gt;Chaos Engine&lt;/strong&gt;, an interactive F1 strategy simulator for people who can't stop arguing about pit calls.&lt;/p&gt;

&lt;p&gt;If you've ever watched a race with a die hard F1 fan, you know the argument happens every single weekend. "They should have pitted two laps earlier." "That undercut never had a chance." "Why didn't they just switch to the hards." Every fan thinks they'd have made the better call, and there's never really a way to settle it.&lt;/p&gt;

&lt;p&gt;That argument is where this whole project came from. You don't just watch F1, you live and die by strategy calls that happen in about four seconds on a pit wall. So I wanted to build something that actually lets fans test their gut calls against real race data instead of just yelling about it on Reddit or Twitter after the checkered flag.&lt;/p&gt;

&lt;p&gt;Chaos Engine takes real F1 races, automatically detects the moments in each one that were statistically the most dramatic (a pit stop that came way earlier or later than everyone else, a sudden pace spike, a big swing in track position), scores the whole race on a "Chaos Score," and then lets you pick one of those moments and rewrite it. Pick an alternate strategy, and the AI reasons over the real degradation curves, pit loss numbers, and traffic gaps from that race to tell you whether your call would have actually worked.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://chaos-engine.ai.studio" rel="noopener noreferrer"&gt;https://chaos-engine.ai.studio&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/dhruvvvgg/Chaos-Engine" rel="noopener noreferrer"&gt;https://github.com/dhruvvvgg/Chaos-Engine&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;The whole thing runs on Google AI Studio's Build mode, using Gemini as the actual reasoning engine behind every "what if."&lt;/p&gt;

&lt;p&gt;The part I cared most about getting right was making sure the AI wasn't just generating a vibe-y paragraph. I wanted it to actually reason over real numbers, not make something up that sounded plausible. So instead of asking Gemini to freeform explain a scenario, I feed it a structured JSON block for each intervention, real pre-intervention pace data, the pit loss baseline for that race, degradation curves for the tyre compound being chosen, and the gap to nearby cars, and I have it return a structured verdict: predicted position on exit, estimated gap, a verdict of better/worse/roughly equivalent, and a confidence level. That constraint made a huge difference in how trustworthy the output actually felt.&lt;/p&gt;

&lt;p&gt;The "chaos moments" themselves aren't hand picked either. I didn't want to sit there and manually decide which lap of which race was interesting, because that doesn't scale and it's basically just my opinion dressed up as data. So those moments come from statistical detection, things like a driver's lap time deviating sharply from their own rolling average, or a pit stop landing way outside the field's typical stop window for that phase of the race. The chaos score for each race is built from those detected anomalies, not from me deciding a race was dramatic because I remember it being dramatic.&lt;/p&gt;

&lt;p&gt;I also went back and forth a lot on the UI. I wanted it to feel like an actual race engineering tool, not a generic dashboard template, so I leaned into a dark telemetry aesthetic, glass card treatments, and real F1 data (pole times, fastest laps, laps completed) pulled from the actual race weekends instead of made up placeholder numbers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;p&gt;Best Use of Google AI: Gemini is the reasoning engine behind every "what if" in the app, it takes real race data (pace, pit loss, tyre degradation, traffic gaps) and returns a grounded verdict instead of a generic guess, plus it writes the "why was this race chaotic" line on each race card from the detected anomaly data. The whole thing was also built using Google AI Studio's Build mode.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>weekendchallenge</category>
    </item>
  </channel>
</rss>
