This project is focused on building a tool to calculate the expected value (EV) of poker hands in the popular card game Texas Holdem. The tool will allow players to make more informed decisions by analyzing the EV of different hand scenarios and betting strategies.
The project is organized into the following files and directories:
- ev_calculator.py: contains the EVCalculator class, which is responsible for calculating the EV of a hand scenario.
- Card.py: contains the Card class, which represents a playing card.
- Hand.py: contains the Hand class, which represents a poker hand.
- Deck.py: contains the Deck class, which represents a deck of playing cards.
- game_loop.py: contains the run_game_loop function, which is the main game loop for the poker EV calculation program.
- game_state.py: contains functions to update the game state and execute game actions (e.g. fold, call, raise).
- gto_strategy.py: contains the calculate_gto_strategy function, which calculates the game theory optimal (GTO) strategy for a given hand and game state.
- Player.py: contains the Player class, which represents a poker player.
- Opponent.py: contains the Opponent class, which represents an opponent in the game.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Python 3.7 or higher
- A poker software or platform to integrate the EV calculator
To install the EV calculator, follow these steps:
-
Clone the repository to your local machine: ''' git clone https://github.com/user/poker-ev-calculator.git '''
-
Navigate to the project directory:
cd poker-ev-calculator
- Install the required dependencies:
pip install -r requirements.txt
To use the EV calculator, follow these steps:
-
Import the 'ev_calculator' module into your poker software or platform: from ev_calculator import ev_calculator
-
Use the calculate_ev function to calculate the EV of a hand scenario:
hand = [Card('Ace', 'hearts'), Card('King', 'diamonds')]
board = [Card('Queen', 'hearts'), Card('Jack', 'hearts'), Card('Ten', 'hearts')]
stack_size = 1000
opponent_stack_sizes = [500, 1000, 2000]
bet_sizes = [100, 200, 300]
ev = ev_calculator.calculate_ev(hand, board, stack_size, opponent_stack_sizes, bet_sizes)
print(ev)
We welcome contributions to this project. If you have an idea for a feature or improvement, please open an issue to discuss it before submitting a pull request.