The Inspiration

When I started learning to play pool this summer, every missed shot sent me scrolling through Instagram for generic tips, rather than giving me actionable feedback on the shot right in front of me. Pool is incredibly difficult for one core reason: the geometry of aiming is completely invisible. I realized that until I could actually see the math on the table, my progress would just be a feeling, not a trackable metric. If you've ever stood over a shot with no plan, you know exactly how this feels. I built Axiom to change that—to let players see the shot, understand the shot, and track the shot.

How It Was Built

Axiom is powered by a custom microservices architecture designed to handle real-time interactivity alongside heavy computational logic.

  • The Frontend: Built with React, providing a highly responsive digital Workspace and training module.
  • The Broker: A Node.js server handling real-time WebSocket events, acting as the bridge between the UI and the math engine.
  • The Engine: A Python backend built with FastAPI. This serves two vital roles. First, it runs a deterministic physics engine that instantly calculates the ghost ball, tangent lines, and cut angles using vector trigonometry (for instance, calculating the required cut angle $\theta$ based on the vector from the object ball to the pocket).
  • The AI Coach: I used LangGraph to build a multi-agent workflow. When a user toggles the AI Coach, three specialized agents activate in sequence—researching, drafting, and critiquing—to explain the physics of the shot in plain English.

The Challenges

The biggest architectural challenge was preventing the AI from hallucinating the physics. A physics engine that guesses isn't a physics engine. I had to strictly separate the deterministic Python trigonometry from the LangGraph agents. The math engine calculates the absolute truth, and the AI is only granted permission to explain why that truth works.

Additionally, coordinating three distinct microservices (React, Node, Python) while keeping the latency under a tenth of a second required careful optimization of the WebSocket connections. The geometry had to update instantly as the user adjusted the cue ball on the screen.

What I Learned

Building Axiom pushed me to design a true distributed system. I deepened my knowledge of real-time socket communication and event brokering. More importantly, it taught me how to effectively implement agentic AI workflows. By using LangGraph, I moved beyond simple, single-prompt LLM calls and built a structured, multi-step reasoning system that genuinely acts like a human instructor.

Built With

Share this project:

Updates

Submission history