AIBux Hackathon Submission

Inspiration

Every day, millions of kids spend hours in Roblox—but what if that time could also make them smarter? We saw a gap: parents want their kids learning, kids want to play games, and the two rarely overlap in a way that feels natural.

The inspiration came from real results: my daughter was factoring quadratic equations at age 4, and by age 5, standardized testing placed her at late 10th-grade math equivalency. This wasn't genius—it was the power of personalized learning and hacking some early (crude) voice AI tools available at the time.

Why couldn't math BE the game? Not a boring "edutainment" app that kids abandon after a week, but real challenges embedded in the games they already love—with real rewards they actually want.

AIBux transforms screen time into learning time by bringing AI-powered math challenges directly into Roblox, rewarding kids with the currency they care about most: Robux.

What it does

AIBux is a platform that connects educational AI to Roblox games. Our system covers the full K-12 math progression—from basic arithmetic through algebra, geometry, trigonometry, and into introductory calculus. For advanced learners, our Proof Quest system goes beyond, introducing formal mathematical reasoning.

In our flagship game "AI Emperor," players solve challenges that adapt to their level:

Elementary: $23 + 17 = ?$

Pre-Algebra: $7x + 12 = 47 \quad \text{(solve for } x \text{)}$

Algebra: $x^2 - 5x + 6 = 0 \quad \text{(factor and solve)}$

Calculus Preview: $\frac{d}{dx}(3x^2) = ?$

For players:

  • Earn while they learn: Complete math challenges to earn in-game XP and coins
  • Get personalized difficulty: AI adapts challenge difficulty based on performance using our Learner Belief Vector (LBV)
  • Build streaks: Consecutive correct answers multiply rewards by $1 + 0.05s$ where $s$ is streak count
  • Progress through skills: Same scenarios, different mathematical "lenses"—one story grows with the learner

For parents:

  • COPPA-compliant privacy: Children's data is hashed using $H(salt | id)$—we never store identifiable information
  • Progress visibility: See what your child is learning through our Learning Arc visualization
  • Safe reward system: Parent-controlled Robux payouts for verified learning achievements

How we built it

Architecture:

  • Roblox Game Client (Luau): Custom UI for math challenges with streak tracking, hints, and skip mechanics
  • Cloud Run API (TypeScript/Express): Stateless microservice handling challenge generation and result validation
  • Vertex AI + Gemini: Powers adaptive learning—converts raw scores into "excess learning" metrics for privacy-safe personalization
  • Scenario + Lens System: One story context (e.g., "Lemonade Empire") spans K-12, with different mathematical "lenses" at each level
  • Learning Arc Visualization: Shows parents the full progression from arithmetic to calculus within a single narrative
  • HMAC-SHA256 Authentication: Secure server-to-server communication using:

$$\text{signature} = \text{HMAC-SHA256}(k, \text{timestamp} | \text{body})$$

  • Privacy-First Design: Player IDs are one-way hashed before any processing

Key Technical Decisions:

  • Separated the Roblox API into its own repo/service for clean deployments
  • Built challenge generation server-side to prevent cheating
  • Implemented rate limiting ($r \leq 100$ requests/min) and replay protection
  • Designed for "unlinked" play first—kids can play without accounts, linking adds persistence
  • Created reusable "Scenario Quest" components that scale from counting to calculus

Stack:

  • Roblox Studio + Luau
  • Google Cloud Run + Vertex AI + Gemini
  • TypeScript/Node.js + React
  • Confluent Kafka (event streaming)
  • Secret Manager for API keys

Challenges we ran into

The HMAC Saga: Implementing HMAC-SHA256 in pure Lua (Roblox has no native crypto) required building SHA-256 from the FIPS 180-4 spec:

$$H_i = H_{i-1} + \text{compress}(H_{i-1}, M_i)$$

We got it working perfectly—only to discover the real bug was a trailing \n in our secret key making lengths differ ($64 \neq 65$). Classic.

JSON Key Ordering: Lua and Node.js serialize JSON keys in different orders. Our signature verification failed silently until we captured raw request bodies.

Child Safety vs. Simplicity: Every architectural decision balanced ease of development against child safety. We chose longer development over compromising privacy.

Accomplishments that we're proud of

Working end-to-end flow: Kids can open Roblox, play AI Emperor, solve real math problems, and earn rewards—all connected to a live cloud API

Full K-12 math coverage: From arithmetic through calculus, with Proof Quests for advanced reasoning beyond typical curricula

Scenario + Lens architecture: One story context ("Lemonade Empire") teaches everything from $5 + 3$ to $\int_0^{10} R(t) \, dt$—same narrative, growing complexity

Pure Lua HMAC-SHA256: Cryptographic signing that matches Node.js output exactly

Privacy-first architecture: Player ID hashing is irreversible—we cannot identify children even if we wanted to

Sub-200ms API responses: Challenge generation feels instant: $\bar{t} < 200\text{ms}$

Adaptive difficulty via Vertex AI: The Learner Belief Vector tracks mastery across skill dimensions, not just overall score

What we learned

  • Personalization changes everything: The same child who struggled with worksheets was factoring quadratics at 4 with the right adaptive system
  • Debug logging is everything: Verbose logging on both client and server revealed our auth issues
  • Trim your secrets: A single \n character cost hours of debugging ($64 \neq 65$ bytes)
  • Start simple: We over-engineered HMAC when API keys would have validated the concept faster
  • Kids are harsh critics: If it's not fun AND fast, they close it immediately
  • Roblox is real infrastructure: 70M+ daily active users is no toy—it's the largest gaming platform on Earth

What's next for AIBux

Immediate roadmap:

  • 🔗 Parent dashboard for account linking and Learning Arc visualization
  • 💰 Robux payout integration with parent-approved withdrawals
  • 🎯 Expanded subjects: reading comprehension, science reasoning
  • 🎮 SDK for other Roblox developers to embed AIBux challenges
  • 📊 Confluent Kafka integration for real-time learning analytics

Bigger vision:

  • Partner with schools for "homework in Roblox" programs
  • Expand to Minecraft and Fortnite Creative
  • AI tutoring via Gemini that explains wrong answers, not just marks them incorrect
  • Competitive learning leagues with real prizes
  • Proof Quest competitions for advanced students

We've seen what personalized learning can do—a 4-year-old factoring quadratics, a 5-year-old at 10th-grade level. The technology exists. We're just putting it where kids already are.

We believe the future of education isn't fighting screen time—it's harnessing it.


Built with

Google Vertex AI, Google Gemini, Google Cloud Run, Google Secret Manager, Confluent Kafka, Roblox Studio, Luau, TypeScript, Node.js, Express, React, HMAC-SHA256, REST APIs

Try it out links

Built With

Share this project:

Updates