Skip to content

Interactive blackjack basic strategy calculator for any rule combination

Notifications You must be signed in to change notification settings

hankhsu1996/blackjack-basic-strategy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blackjack Basic Strategy

Interactive blackjack basic strategy calculator for any rule combination.

Try it now

What is Basic Strategy?

Basic strategy is the mathematically optimal way to play every hand in blackjack. By calculating the expected value of each possible action (hit, stand, double, split), we can determine the play that minimizes the house edge.

This tool computes basic strategy for any combination of casino rules, so you can find the correct play whether you're in Las Vegas, Atlantic City, or playing online.

How It Works

The strategy is computed using Expected Value (EV) analysis:

  1. For each possible action (stand, hit, double, split), calculate the expected return
  2. Account for all possible cards that could be drawn
  3. Consider dealer's probability of busting or making each hand
  4. Choose the action with the highest expected value

The calculations use composition-dependent probabilities, adjusting for cards already seen (your hand + dealer's upcard). This matches how basic strategy charts are computed for real casino conditions.

House edge is verified using Monte Carlo simulation running on GPU with CUDA.

Development

# Install dependencies
uv sync

# Generate strategy JSON files
uv run python -m scripts.generate_strategies

# Start web dev server
cd web && npm install && npm run dev

License

MIT

Credits

Playing cards icons created by Freepik - Flaticon

About

Interactive blackjack basic strategy calculator for any rule combination

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Contributors 2

  •  
  •