Design a machine-learning gambler and teach it blackjack by playing hands. It knows the rules but learns the value of every choice from experience alone. Start from a recipe below and change whatever you like, or build from scratch. Hover any i for what a choice does.
These update as training runs. The strategy chart is the clearest window: each cell is the move the model would make, colored by action, outlined where it disagrees with textbook basic strategy.
If a model discovers counting, the bars on the right (many high cards left) rise above the bars on the left.