Text-based blackjack game built with Go.
To play the game:
go run ./cmd/game/main.go
Rules used for this version of blackjack:
- Dealer hits soft 17
- Natural blackjacks pay 3:2
- Late surrender is allowed
- Cannot surrender after split
- Double down is allowed
- Double after split is allowed
- Multiple splits are allowed
- Insurance is not available
Computer AIs can be added to the game using command-line flags.
Flag: -random-ai
Uses a random number generator to either hit or stay on every move.
Flag: -standard-ai
Plays using a standard blackjack strategy.
Strategy Resources:
- https://wizardofodds.com/games/blackjack/strategy/4-decks
- https://www.blackjackapprenticeship.com/blackjack-strategy-charts
Flag: -machine-ai
Makes decisions based on a model trained using XGBoost. See README.
NOTE: This is still experimental.