Poker Bot - Machine Learning, OpenCVmachine learning python bots automation OpenCV
The poker bot was created to play Heads Up poker on the popular PokerStars platform. In the video you can see an example of it playing with play money. However it is not restricted just to play money and the approach works just as well with real money.
Python and OpenCV (computer vision) is used. The bot reads the screen multiple times per second and performs calculations to determine the best move.
An extremely optimised Monte Carlo simulation algorithm was created, this allowed for hundreds of thousands of simulations (games) to be ran in just several seconds even on a very modest computer.
The game logic is created by combining several methods together. There are some pre-calculated (for increased accuracy) statistics. These are mainly used pre-flop where the the game is quite straight forward. These are combined with an expert system that has been tuned over thousands of hours of play.
Post flop Montecarlo Decision Tree combined with an Expert System deliver strong performance against real players.
The bot plays effectively against low to medium skilled players. It takes common approach of playing in easy games to deliver results with minimum effort (effort needed to develop the game logic).
The bot it self simulates human control by moving the cursor in a more natural way and avoiding clicking in the same areas on the buttons. Also the processing (and accuracy) is scaled based on the amount of money in the pot - the more money the bigger the decision and more time is allowed for processing. This helps get around anti-bot protections these sites employ.