Skip to content

About

A realistic Pool (Billiards) AI trainer with shot prediction, angle, power and confidence visualization.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎱 Pool AI Trainer

Python License Status Platform

An interactive Pool (Billiards) AI trainer that predicts optimal shots using geometry, angle, power, and confidence. This project visualizes optimal pool shots by calculating:

  • Cut angle
  • Required power
  • Shot confidence
  • Ball collisions and blocking
  • Best pocket selection

Designed as a training and educational tool, not a physics-perfect simulator.


✨ Features

  • 🎯 Realistic pool table (image-based)
  • 🟢 Multiple scenarios:
    • EASY
    • NORMAL
    • HARD
    • CUSTOM
  • 📐 Shot angle calculation
  • ⚡ Power estimation
  • 📊 Confidence score per shot
  • 🔴 Visualized shot paths
  • 🖱️ Interactive mouse-based placement
  • 📋 Shot details panel

🖼️ Screenshots

Main UI

Main UI

Easy Mode

Easy Mode

🖼 Demo

Demo


🧠 How the AI Thinks

For each possible pocket:

  1. Computes ghost ball position
  2. Calculates cut angle
  3. Checks blocking balls
  4. Scores the shot using:
    • Lower cut angle
    • Shorter cue-to-ghost distance
  5. Returns the best 2 shots

🕹️ Controls

EASY

  • Click to place white ball

NORMAL / HARD

  • Click a colored ball to analyze shots

CUSTOM

  • Place white ball
  • Place up to 4 colored balls
  • Double-click a colored ball to select target

🛠️ Installation

Requirements

  • Python 3.9+
  • Tkinter
  • Matplotlib

Install dependencies:

pip install -r requirements.txt

About

A realistic Pool (Billiards) AI trainer with shot prediction, angle, power and confidence visualization.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages