- Overview
- Features
- Getting Started
- Installation for Development
- Codebase Structure
- Contributing
- Contact
Poker-Bot is a Discord bot designed to facilitate poker games, providing utilities like equity calculation, bank management, and interactive gameplay. It is built for poker enthusiasts and developers interested in poker-related bot development.
- Equity Calculation: Computes win, loss, and tie probabilities for given hands and board states using Monte Carlo simulation.
- Banker Helper: Manages player buy-ins, cashouts, and rebuys, maintaining the game's financials.
To use the Poker-Bot in your Discord server, invite the bot to your server and ensure it has the necessary permissions to read and send messages.
!equity
: Calculates the equity for specified hands and board.- Note all args are optional and if not included the equity will take the hand/board/card as an unknown when calculating equity.
- Arguments:
hero:RSRS villain:RSRS board:RSRSRSRSRS runs:INT
hero
: Hero's hand, specified asRSRS
whereR
is the rank (2-9,T,J,Q,K,A) andS
is the suit (s,c,h,d).villain
: Villain's hand, in the same format as the hero's hand.board
: The board cards, specified asRSRSRSRSRS
for five cards.runs
: (Optional) Number of simulations to run for equity calculation, default is 10,000.
- Arguments:
For the following commands, if the numerical vaule is the same for all players the command can be in the format
!startgame
: Initiates a new poker game session.- Arguments:
PLAYERbuyin
PLAYER
: Name of the player to add.buyin
: The amount of money the player is buying into the game with.
- Arguments:
!add
: Adds players to the game with their buy-in.- Arguments:
PLAYERbuyin
PLAYER
: Name of the player to add.buyin
: The amount of money the player is buying into the game with.
- Arguments:
!cashout
: Records players' cashouts.- Arguments:
PLAYERamount
PLAYER
: Name of the player to cash out.amount
: The amount of money the player is cashing out.
- Arguments:
!rebuy
: Manages rebuys for players in the game.- Arguments:
PLAYERamount
PLAYER
: Name of the player rebuying.amount
: The rebuy amount for the player.
- Arguments:
!paid
: Marks a player's debts as settled.- Arguments:
player
player
: Name of the player who has paid their debts.
- Arguments:
- Clone the repository to your local machine.
- Ensure Python 3.8+ is installed.
- Install required dependencies using
pip install -r requirements.txt
. - Create a
.env
file with your Discord bot token asDISCORD_TOKEN
.
main.py
: Entry point for the bot, handling Discord events and commands.classes.py
: Contains core poker-related classes and logic, including deck handling and hand evaluation.gamebank.py
: Manages game states, including players, buy-ins, and cashouts.responses.py
: Processes commands and generates responses for user interactions.equity_tests.py
: Contains unit tests for the equity calculation functionality.
I plan on optimizing the current features and adding new ones. If you'd like to contribute, please fork the repository and submit a pull request with your changes.
- Optimizing hand evaluation by implementing CactusKev's evaluation process
- Adding equity computation for PLO, DBBPPLO, Lowball, Red River
- User bankroll tracker using a database
- Basic hand history analyzer that takes a hand history and returns a classification (suckout, bad beat, cooler, nit fold)
- Heads-Up NLH Solver using CFRM
For support or inquiries, please open an issue on the GitHub repository or reachout to me via email.