It all started when we read the challenge brief for the High School track's local climate action mission lane. As we parsed through the requirements for building a local solution rather than a global abstraction, Gurnoor remembered watching their own school canteen manager, Nina, at the Aselli school in Cremona, Italy, battle a relentless over-ordering boss battle week after week. Nina didn't have access to predictive models or data-driven tools; she only had her intuition to fight a massive, invisible systemic problem of food waste. Every single day, perfectly good food was ending up in the bin simply because managers were forced into a predictive guessing game. We formed team B_Tech_Titans to solve this exact frustration. Guided by the foundational templates in our hackathon canvases, we decided to build CanteenTycoon AI—a practical weapon that moves communities completely away from awareness-only tracking and straight into an explicit "Input-to-Action" workflow that gives managers like Nina the ultimate upper hand.
To solve the exact over-ordering bottlenecks Nina faced every morning, CanteenTycoon AI functions as an autonomous Food Waste Rescue Radar designed specifically for local school cafeterias. The system executes a seamless journey from initial layout parsing to emergency community dispatch. First, a user uploads a single physical photo of their cafeteria floor plan, which our AI transforms into a custom, top-down retro pixel-art map with mapped coordinates for operational zones like kitchens, counters, seating, and waste areas. Before lunch operations begin, the system runs a predictive pipeline to determine exactly how much food is at risk of landing in the trash, completely eliminating the blind guessing game. Instead of dumping these insights into a flat spreadsheet, the predicted risk actively controls a live, 60 FPS pixel-art simulation window where virtual student NPCs act out meal consumption and tray disposal behaviors based on real-time risk tiers. Finally, if an over-ordering or surplus food anomaly is detected, the system immediately drafts an email dispatch to a local shelter, offering a concrete mitigation plan to redistribute the surplus food that Nina worked so hard to prepare.
We engineered this platform during an intense one-week hacking sprint using a robust full-stack desktop OS environment built on a Python backend proxy server. We didn't rely solely on Generative AI for forecasting; instead, we deployed a highly optimized LightGBM Gradient Boosting Regressor trained on a real-world university dataset containing 2,600 historical canteen records. The model extracts precise calendar features from the date object, one-hot encodes categorical text variables like meal type, canteen section, and food category, and outputs a highly rigorous statistical waste baseline across defined zones represented mathematically as:
$$ \text{Baseline Waste (kg)} = \sum_{s \in {A, B, C, D}} \text{LightGBM_Predict}(s, \text{Features}) $$
Our Flask ML server forwards this statistical baseline directly to Claude Sonnet 4.5 via a secure Python proxy server. Claude acts as a reasoning synthesizer and evaluation layer, layering in crucial local parameters that math models miss, but that a manager like Nina knows by heart. It fetches live local weather updates via the Open-Meteo API, scans for school event overrides like exams or holidays, reads specific menu keywords, and outputs a structured JSON payload containing risk probabilities, confidence metrics, and clear plain-language causes. This data dynamically drives our live JavaScript simulation running in the browser canvas at 60 FPS. Five distinct student NPC classes step through a complex finite-state machine from spawning to trashing. When Claude flags a high-risk scenario, the simulation scales up the individual student base wasting probability factors to mirror structural cafeteria bottlenecks visually, calculated using:
$$ P_{\text{final}} = P_{\text{base}} \times \text{RiskMultiplier} \quad (\text{where High Risk} = 1.6\times) $$
Building this system forced us to conquer massive technical hurdles, particularly regarding security and system resilience. Keeping API keys completely hidden from the front-end page source view was a critical challenge. In early versions, calling Anthropic's and Google's endpoints directly from client-side JavaScript exposed our environment secrets to anyone opening the web inspector. To solve this securely, we built a custom Python HTTP proxy server that intercepts client requests, securely injects server-side keys, forwards the traffic to the official endpoints, and strips credentials before returning clean JSON back to the browser UI. Furthermore, handling API failures elegantly was a major test of architecture resilience. If a user lacked a valid Google Gemini key or encountered a network timeout during the map initialization phase, we built a complete JavaScript Canvas 2D fallback engine that algorithmically generates a beautifully structured top-down game layout procedurally if the AI layer fails, ensuring that the simulation engine remains functional and operational for the manager no matter what.
Despite these hurdles, we are incredibly proud of the breakthroughs achieved in this MVP, starting with our true Human-in-the-Loop safeguard. While the system automatically drafts surplus dispatch messages using the Gmail API, it is fundamentally restricted from sending them autonomously; a human manager like Nina must explicitly review and hit "Approve" to keep final control over her kitchen. Furthermore, we implemented a fully functioning ML retraining loop where the Flask server contains active prediction and training endpoints. When a manager inputs real end-of-day food data, it appends directly to the historical CSV dataset and retrains the LightGBM model on the fly, instantly hot-loading the smarter coefficients into active memory without restarting the production server. Finally, we linked simulated waste events to direct climate metrics where every kilogram of saved food is instantly mapped onto carbon offsets and community meal numbers using the environmental transformation factor:
$$ 1\text{ kg rescued} = 3.0\text{ kg } CO_2 \text{ saved} $$
This moving of climate metrics from global abstractions to highly visible dashboard widgets taught us that data visualization alone does not count as AI, and raising basic environmental awareness isn't enough to drive consistent local habits. True impact requires building an uninterrupted path from input to AI insight to concrete action. We also learned the vital importance of scoping down to a single core problem; by focusing completely on the specific problem of canteen over-ordering patterns that plagued Nina rather than attempting to fix global agriculture chains, we were able to engineer a highly practical, reliable, and deeply contextualized MVP within a tight 7-day window. Moving forward, we are eager to scale CanteenTycoon AI by introducing direct Point-of-Sale integrations to cross-reference historical student swipe data against predicted meal turnouts, expanding our Claude agent ecosystem into autonomous multi-agent loops that recursively analyze previous estimation errors against actual end-of-day logs, and deploying real-world school pilots in institutions like the Aselli school in Cremona to equip real managers like Nina with the radar tools they need to protect both local budgets and our planet.
Log in or sign up for Devpost to join the conversation.