This is a simple blackjack bot for the game "Governor of Poker 3".
It uses pyautogui
to take screenshots and click buttons, and opencv
to recognize the cards and buttons. Then it uses a strategy configuration cheatsheet to decide the next move. To self-define strategy, you can replace the const CHEAT_SHEET
in constant.py
. The self-defined strategy in GUI is on TODO.
The v2
tag is a quite stable version. From my several 10000 hand tests, the expectation is around 0.98. The main branch is for more features and improvements but the expectation will not change much.
pip install -r requirements.txt
python main.py
net win
to be about 10% higher than the actual net win from my tests.This is a guide for translating the bot to other languages. If you want to contribute, please follow the steps below:
image/{language_name}
folder. Required images are:
hit.png
stand.png
double.png
split.png
win.png
lose.png
draw.png
blackjack.png
bust.png
main.py
:
SUPPORTED_LANGUAGE = ["English", "Chinese"]
LANGUAGE_MAP = {
"English": "en-us",
"Chinese": "zh-cn",
}
you can see the image/zh-cn
folder for reference.