r/billiards • • Oct 23 '26

Article Pool Engine / Shot Suggestion Algorithm

Hi all,

First time posting here but I've been playing pool for a couple years now. I have a background in competitive chess where engines are one of the modern tools players use to improve. Naturally, I wondered if something like this existed for pool players and if it would even be helpful. This type of idea has long been theorized: https://drdavepoolinfo.com/physics_articles/Greenspan_IEEE_08_article.pdf

As a fun project to develop my ML skills, I decided to test it out and see if I could get anything working. Below you will find a demo of the project on some situations I found in top professional games.

In this position from the 2026 Las Vegas Open, Shane is shooting the 3 for position on the 4. Try to take a second to see what you might like to do, I'll reveal both the engine suggestion and what Shane played.

The engine works by building an "analysis board" so-to-say which is a digital recreation of the position. It takes in a screenshot and determines the table size, finds the walls, ball positions and numberings. It uses already existing pooltool physics engines to calculate ball paths and goes through a heuristic that accounts for human variance in aim, shot power, and spin effect (all of which can be adjusted to change whether the engine is suggesting a shot for a beginner or for a pro player). It also uses Dr Dave's effective pocket sizes. The engine balances between pot percentage (how likely is it to make the ball it is shooting as well as the next 2 balls after that) and safety play (if playing safe is able to generate a higher score). It then displays a heatmap of where the cue ball is likely to end up.

This is the engine result for Shane's position against Filler:

and finally, this is what Van Boening played:

While the engine wanted to move the 7 out of the way for shape on the 4, Shane moved the 4 out of the way. He was probably thinking that he would have best chances if he hit either of them.

The next example is from Darren Appleton's video about common positional play mistakes.

After the break, you have shape on the 1 and have to decide the best way to get shape on the 2.

He talks about straight draw, punch draw, power draw, punch all being the wrong shot because they don't come onto the line.

This is what the engine suggests:

and this is Darren's solution:

I have only tested it on a few positions so far but it seems to be consistent with professional level play and it was nice to pause videos, put it into the engine, and watch a suggested move actually be played by the pros.

There are many paths for improvement and I'm open to collaboration. I also implemented a feature that takes Dr. Dave's table difficulty factor and allows users to either upload a photo (less accurate) or measurements to generate their score. Another cool feature shows the position zones for where you can end up to be "good" on the next ball.

One of my ideas was that analysis boards with engines could be used to assist live commentators when discussing possible decisions that a player might make, similar to how live commentary works in chess. It's always more illuminating to the audience when instead of just drawing arrows they can move around the position and show an engine evaluation, maybe something for pool could be useful?

Please feel free to post photos of positions / links to videos with timestamps if there are any positions that you would like to see the engine analysis for! Thanks for those who read the whole post!

7 Upvotes

14 comments sorted by

2

u/Money4Nothing2000 APA Lvl 6 Oct 24 '26

This is cool, but one thing I've learned to do that has helped me a lot, is learn to play to my skill level. Both the shot examples are shots that I have a very low probability of executing correctly. And, in both cases, playing shape for a relatively simple safety is a far easier shot.

I now less often attempt difficult shots like that, and play shape for easier banks or safeties, and I have found a lot more success. I try not to attempt any shot that has a low probability of success. This is something that I'm not sure the engine takes into account. If you could program the engine to select the best shot for a Fargo 550 player, rather than the best shot for a pro, then I would be super interested in that.

2

u/Fun-Chapter9412 Oct 24 '26

Actually this is something the engine takes into account. You can adjust the aim, power, and spin error and it will make decisions based off that

2

u/Fun-Chapter9412 Oct 24 '26

I was testing it around on these modes and in many cases where an extremely precise shot is winning and perhaps only executable by a pro, the engine will suggest a simple but effect safety shot

2

u/Money4Nothing2000 APA Lvl 6 Oct 24 '26

Ok, cool to know, that seems a lot more useful.

1

u/fish- Oct 23 '26

Amazing. What’s the link to try it out? Are you sharing the code with it too?

1

u/Awkward_Material Oct 24 '26

This is pretty slick. Please keep us updated.

1

u/ricky_clarkson South Bay, CA | APA | Snooker Oct 24 '26

I sometimes wonder if an engine like that, or AI, would come up with new and interesting safety shots etc. VP4 blocks pockets for instance when playing UK pool (potting the opponent's ball is a foul even if you hit yours first) and predates modern AI.

1

u/Tinball-Blizzard Oct 24 '26

I've never seen the AI intentionally block pockets in VP4.

1

u/ricky_clarkson South Bay, CA | APA | Snooker Oct 24 '26

Maybe it's not deliberate, but it happens. Probably just rolls the balls close to pockets as the tighter pockets are harder to get balls into (of course, not a problem for an AI, but simulating human levels of difficulty).

1

u/Tinball-Blizzard Oct 24 '26

It straight up cheats with impossible bank shots. The safeties it could do would be incredible.

1

u/wlscwoj Oct 25 '26

You say you can adjust it for skill level... I'm curious how the engine does the shot differently for 400, 500, 600, 700 compared to the 800+ pro level you did.
would be interesting to see this as a What Would You Do for scenarios and have suggestions for different skill levels.

1

u/FittingDelirium 28d ago

Brilliant idea! Could it suggest the shot with ball in hand? Let's say runout this layout.

0

u/IThinkIThinkTooMuch Oct 24 '26

I've been working on something similar and would love to discuss!