How AI can transform 9-ball pool by optimizing shot selection

Building a 9-ball AI player involves creating a sophisticated system for candidate shot generation, particularly for direct cut shots.

4 min readMachine Learning
How AI can transform 9-ball pool by optimizing shot selection
Building a 9-ball AI player: Candidate generation for direct cut shots [P]

Our take

The 9‑ball AI effort described by ArithmosDev is more than a clever hack for a niche sport; it illustrates how a disciplined blend of physics simulation, data‑driven inference, and curriculum learning can reshape any domain where sequential decision‑making meets real‑world uncertainty. By first grounding the problem in a high‑fidelity pool physics engine (Pooltool) and then engineering a layered approximation pipeline, the approach shows how to turn a computationally intractable search into a tractable, data‑rich workflow. This mirrors the broader trend we explore in How AI Agents Will Transform Data Science Work in 2026, where the key to scaling AI lies not in raw compute alone but in clever pre‑computation and model‑based shortcuts that preserve fidelity while slashing latency.

At the heart of the system is a three‑stage candidate generation strategy. First, an acceptance‑window lookup pre‑computes the range of object‑ball departure angles that will land a ball in a given pocket at a specific speed, effectively encoding the geometry of the table and the "down‑the‑rail" effect into a fast, reusable data structure. Next, a shot‑index table maps those geometric requirements to discrete cue‑ball parameters, providing a solid starting point for each candidate. Finally, a lightweight multilayer perceptron (the "throw model") generalizes across the gaps left by discretization, delivering continuous‑space predictions of cue‑ball deviation with sub‑degree accuracy. The result is a 10,000‑fold speedup over brute‑force simulation, allowing batches of a thousand candidate shots to be evaluated in a single millisecond on a GPU. This dramatic acceleration is what makes self‑play data generation feasible at the scale required to train a reliable p(win) model.

Why does this matter beyond the felt‑covered table? The approach demonstrates a practical pathway for any AI system that must evaluate a massive combinatorial action space under strict time constraints. By separating "what the world must do" from "how to make it happen," the pipeline isolates the physics‑heavy component into an offline lookup and relegates the remaining inference to a small, trainable network. This mirrors the architecture of modern autonomous‑driving stacks, where high‑resolution maps provide static constraints and learned models handle dynamic control. For spreadsheet‑centric AI, a similar separation could let a transformer predict the probability of a desired outcome while a lightweight evaluator rapidly checks feasibility against business rules, dramatically improving responsiveness without sacrificing accuracy.

The editorial also highlights a disciplined training regimen: the author employs curriculum learning, beginning with single‑ball scenarios where the win condition is trivial, then progressively adding complexity up to full‑rack play. This mirrors the incremental skill acquisition seen in human coaching and in reinforcement‑learning curricula that start with simplified environments before exposing agents to the full state space. The use of symmetry to augment data—mirroring shots left‑right and exploiting rotational invariance—further illustrates how domain knowledge can amplify data efficiency, a lesson that directly applies to data‑centric AI tools where table structures often contain built‑in redundancies.

Looking ahead, the most exciting frontier is the integration of safety and execution robustness into the selection loop. The author already clusters candidate shots and validates only representative members with noisy physics simulations, avoiding the trap of "perfect‑on‑paper" shots that cannot be reproduced by a human hand. Extending this idea, future systems could incorporate user‑specific execution profiles, dynamically adapting the candidate set to individual skill levels—a concept that could transform how AI assistants propose spreadsheet formulas or data visualizations, ensuring suggestions are not only optimal on paper but also practical for the end user.

In sum, ArithmosDev's work offers a concrete blueprint for building AI agents that balance deep physical insight with scalable inference. As we continue to embed AI into everyday productivity tools, the question becomes: how many other domains can benefit from this "pre‑compute, index, then lightly learn" pattern, and what new user experiences will emerge when AI can evaluate thousands of nuanced options in the blink of an eye?

From Machine Learning

I'm building a 9-ball-player to help with pattern play. There are many ways to make the next ball, and sometimes in more than one obvious pocket. Which should should you choose depends on probability of making that shot AND ending up in a favorable spot for the next shot, that is also amenable to getting good position for the shot after. To that end, I have built the following components:

Read the original at Machine Learning