Skip to content

eleniums/blackjack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

blackjack

Text-based blackjack game built with Go.

Run

To play the game:

go run ./cmd/game/main.go

Rules

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

Computer AIs can be added to the game using command-line flags.

Random AI

Flag: -random-ai

Uses a random number generator to either hit or stay on every move.

Standard AI

Flag: -standard-ai

Plays using a standard blackjack strategy.

Strategy Resources:

Machine AI

Flag: -machine-ai

Makes decisions based on a model trained using XGBoost. See README.

NOTE: This is still experimental.

Links