Betting Strategies
Base class to create your own betters
- class betting_strategies.BaseBetter
Base better. The parent class of all betters.
- static get_bet(cards_seen, deck_number)
Raise NotImplementedError. To be overridden in the other classes.
- Parameters:
cards_seen (list[int]) – The cards we have already seen from the shoe. Used when card counting.
deck_number (int) – The number of decks in the starting shoe.
- Returns:
How much money to bet.
- Return type:
int
Example custom better:
class MyBetter(BaseBetter):
@staticmethod
def get_bet(cards_seen: list[int], deck_number: int) -> int:
running_count = get_hilo_running_count(cards_seen)
cards_left = deck_number * 52 - len(cards_seen)
true_count = running_count / (cards_left / 52)
return min(max(int(true_count), 1), 8)
Pre-built betters
- class betting_strategies.SimpleBetter
Simple better. Bets the same amount every time.
- static get_bet(cards_seen, deck_number)
Bet 1 every time. The bet doesn’t change.
- Parameters:
cards_seen (list[int]) – The cards we have already seen from the shoe. Used when card counting.
deck_number (int) – The number of decks in the starting shoe.
- Returns:
How much money to bet.
- Return type:
int
- class betting_strategies.CardCountBetter
Change the bet according to the true count.
- static get_bet(cards_seen, deck_number)
Bet true_count ^ 2 / 2 if true_count >= +1 else 1. Cap at 15 (using a 1-15 spread).
- Parameters:
cards_seen (list[int]) – The cards we have already seen from the shoe. Used when card counting.
deck_number (int) – The number of decks in the starting shoe.
- Returns:
How much money to bet.
- Return type:
int
- class betting_strategies.ConservativeCardCountBetter
Change the bet according to the true count conservatively.
- static get_bet(cards_seen, deck_number)
Bet true_count if true_count >= +1 else 1. Cap at 5 (using a 1-5 spread).
- Parameters:
cards_seen (list[int]) – The cards we have already seen from the shoe. Used when card counting.
deck_number (int) – The number of decks in the starting shoe.
- Returns:
How much money to bet.
- Return type:
int
- class betting_strategies.WongingCardCountBetter
Change the bet according to the true count and use wonging (don’t play if TC < 1).
- static get_bet(cards_seen, deck_number)
Bet true_count ^ 2 / 2 if true_count >= +1 else 0. Cap at 15 (using a 1-15 spread).
- Parameters:
cards_seen (list[int]) – The cards we have already seen from the shoe. Used when card counting.
deck_number (int) – The number of decks in the starting shoe.
- Returns:
How much money to bet.
- Return type:
int
- class betting_strategies.WongingConservativeCardCountBetter
Change the bet according to the true count conservatively and use wonging (don’t play if TC < 1).
- static get_bet(cards_seen, deck_number)
Bet true_count if true_count >= +1 else 0. Cap at 5 (using a 1-5 spread).
- Parameters:
cards_seen (list[int]) – The cards we have already seen from the shoe. Used when card counting.
deck_number (int) – The number of decks in the starting shoe.
- Returns:
How much money to bet.
- Return type:
int