blackjack

module
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 19, 2020 License: MIT

README

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.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL