Research & Papers

Building a 9-ball AI player: Candidate generation for direct cut shots [P]

Cutting pool simulation from hours to milliseconds with a novel precomputed acceptance window.

Deep Dive

An AI researcher building a 9-ball player uses a transformer model to learn win probability, a candidate shot generator, and an evaluator that picks shots based on the model. The key innovation splits shot evaluation into two precomputed lookups: an acceptance window that stores the range of object‑ball departure angles that pocket the ball per pocket and speed, and a shot‑index lookup that maps a desired departure angle to cue‑ball parameters like speed, aim, and spin. This avoids running expensive physics simulations for every candidate—a naive grid search took ~17 minutes per pocket, and iterative optimizers still took ~5–10 seconds per pocket. The lookup approach is an improvement, though it has holes due to discreteness.

Key Points
  • Transformer model predicts win probability given table layout, paired with a candidate shot generator covering 6 shot types.
  • Pooltool library simulates physics at 5–15 ms per shot; naive grid search would require 17 minutes per decision.
  • Novel two-stage lookup (acceptance window + shot-index) cuts evaluation time to milliseconds by precomputing departure angle ranges and matching cue parameters.

Why It Matters

This technique makes training a deep RL agent for cue sports feasible, potentially automating strategy for pool and billiards.