InspirationAs a competitive ILCA 4 sailor, I am constantly looking for ways to improve my tactical game and decision-making on the water. While studying MetaSail tracking logs, I realized that instead of just watching passive, static 2D lines of past regattas, we could extract that raw data to build an interactive tactical simulator.The goal was to create an application that could accurately simulate how real athletes—including my training partners and friends whose data we tracked—actually race. We wanted to bridge the gap between abstract physics and real-time execution, turning raw telemetry into an interactive STEM classroom for young sailors.What it doesTacticalSail AI STEM is a 2D tactical sailing simulator centered on the ILCA 4 class within the specific racing environment of Lake Garda (Area B). The platform ingests real GPX data from actual regattas and translates it into a dynamic, interactive simulation running at $60\text{ fps}$. Instead of just replaying static lines, it generates AI-driven bots that replicate the unique tactical styles, risk profiles, and decision-making habits of real sailors.Users can observe how different tactical "brains" react to shifting wind grids, calculate optimal Velocity Made Good (VMG), manage layline risks, and avoid the aerodynamical interference ("dirty air") left by competitors. Additionally, it integrates a local large language model to provide human-like textual explanations of the AI's tactical choices.How we built itWe engineered an edge-computing architecture divided into three interconnected layers:The GPX Ingestion Pipeline (Python): We built a custom parser to filter high-frequency GPS noise. It processes exact coordinates using the Haversine formula to extract real-world distance and velocity:$$a = \sin^2\left(\frac{\Delta \text{lat}}{2}\right) + \cos(\text{lat}1)\cos(\text{lat}_2)\sin^2\left(\frac{\Delta \text{lon}}{2}\right)$$$$c = 2 \cdot \operatorname{arctan2}(\sqrt{a}, \sqrt{1-a}), \quad d = R \cdot c$$The Dynamic Wind Grid: To simulate Lake Garda's famous "Ora" thermal breeze, we built a 100-scenario statistical model spanning 57 spatial variables, using bilinear interpolation to calculate the precise wind pressure surrounding each boat.The AI Core (JavaScript & FastAPI): The front-end simulator runs at $60\text{ fps}$ via Leaflet.js. Decisions are weighted linearly based on VMG, laylines, and opponent wake, while a local Qwen 3.5 4B LLM (optimized via Apple MLX/CUDA) generates human-like tactical reasoning.Challenges we ran intoTime was our biggest adversary. Recreating the non-deterministic human nature of sailing within a strict deadline meant making tough architectural choices. One major challenge was preventing the bots from over-fitting or simply crashing into the steep virtual cliffs of the lake's shoreline, which we mitigated using an exponential boundary risk formula:$$\text{landRisk} = e^{k \cdot (|x{\text{norm}}| - 0.85)} - 1.0$$Because of the extremely tight hackathon timeline, you will notice some runtime bugs. We encountered edge-case glitches in timing and synchronization that we couldn't completely squash in time. However, our philosophy for this hackathon was clear: we chose to prioritize the quality, depth, and validation of our core ideas over flawless code. In a short sprint, writing bulletproof software is the hardest part, but proving that the data-to-simulation pipeline actually works was our ultimate victory.Accomplishments that we're proud ofWe are incredibly proud of having designed and written a large-scale, modular codebase of nearly 20,000 lines of code that successfully bridges sports analytics with accessible education. We succeeded in running a fully functional mathematical wind interpolation directly in the browser alongside an AI decision engine without relying on heavy external server infrastructure.Furthermore, we are proud of our rigid, automated QA pipeline (build_hackathon_readiness.py), which proves that our simulated bots statistically align with the real-world historical distributions of the athletes we tracked.What we learnedThis project taught us that empirical fluid dynamics and machine learning can merge into a powerful educational tool. We learned how to model human risk-tolerance in sports analytics and, above all, how to manage and structure a complex software architecture under immense time pressure. We proved that even with minor developmental bugs, a strong data-driven concept can accurately map the tactical soul of a regatta.What's next for TacticalSail AI STEMOur immediate next step is to iron out the remaining runtime bugs and optimize the synchronization between the frontend rendering and the local LLM responses. Looking further ahead, we plan to connect the simulator to real-time GRIB meteorological web services to allow users to simulate today's actual weather conditions.We also aim to implement a formal Racing Rules of Sailing (RRS) geometric heuristic module to calculate room at the marks and right-of-way penalties, transforming this prototype into a comprehensive training tool for sailing clubs and coaching staffs.

Share this project:

Updates

Submission history