Probability, matrices and game theory The mathematics of Blackjack (21)

Slides:



Advertisements
Similar presentations
Card Counting Driller By Oscar Chen For CS491A. Practice your Card Counting Skills Application to allow Blackjack Enthusiasts to sharpen their skills.
Advertisements

1 How to Draw a Decision Tree 1. Put probabilities on the branches that are moves by Nature. 2. Put payoffs at the end points. Do not put expected payoffs.
Probability I Introduction to Probability
Advanced Strategies for Craps and Poker Billy J. Duke Joel A. Johnson.
Math and Card Games By: Candace DiBiano.
SOCiable A Game of Life Chances ©Jon Witt Version 1.0.
By: Jonathan Quenzer. To have a computer learn how to play Blackjack through reinforcement learning Computer starts off with no memory. After each hand.
Driving Rules: Signs and Symbols 1.Identify sign or symbol on the road 2.Explain what it means.
© Glenn Rowe AC Lab 2 A simple card game (twenty- one)
Basic Probability. Frequency Theory A mathematical approach to making the notion of chance rigorous. Best applied to processes which can be repeated many.
{ 11.3 Dependent Events Apply probability concepts such as intersections, unions and complements of events, and conditional probability and independence,
Karla Goldhahn Mathematics Instructional Lead teacher Patrick Henry Academies Math Games at Home.
It’s All in the Cards Adding and Subtracting Integers
Lecture 11. R function Function is a wrapper that allows us to write code in modules Back to Handout Homework: Create a function for drunken sailor –
Computer Science Project: BLACKJACK BY TEAM A. Overview of the Project Part A: Ramanathan Swaminathan, Zaith Peralta Ramos Game control, scoring and user.
Lecture 10. Simplified roulette European roulette has numbers 0,1,…36. xD0s
Introduction to Discrete Probability
BLACKJACK SHARKS: Aabida Mayet, Omar Bacerra, Eser Kaptan March 15, 2010.
Dice, Cards and Darts Probabilities in Games Finding the Right Representation.
PROBABILITY Probability is represented as a ratio of the number of ways an event actually occurs compared to the number of possible outcomes.
Probability and Odds. The probability of an event occurring is defined to be: # ways event can happen P(event) = # ways total( # way “anything” can happen)
An application of the Probability Theory
12 Pontoon1May Pontoon program CE : Fundamental Programming Techniques.
Rene Plowden Joseph Libby. Improving the profit margin by optimizing the win ratio through the use of various strategies and algorithmic computations.
Computer Science 313 – Advanced Programming Topics.
Blackjack as a Test Bed for Learning Strategies in Neural Networks A. Perez-Uribe and E. Sanchez Swiss Federal Institute of Technology IEEE IJCNN'98.
A R R A Y ! for Multiplication!!
VOCABULARY  Deck or pack  Suit  Hearts  Clubs  Diamonds  Spades  Dealer  Shuffle  Pick up  Rank  Draw  Set  Joker  Jack 
Black Jack Dr. Bernard Chen University of Central Arkansas Spring 2012.
Fair Games/Expected Value
Warm-up The mean grade on a standardized test is 88 with a standard deviation of 3.4. If the test scores are normally distributed, what is the probability.
Blackjack: Myths vs. Reality Group K Andrew KerrAndrew Phillips Sven SkoogWoj Wrona.
What are the chances of that happening?. What is probability? The mathematical expression of the chances that a particular event or outcome will happen.
Permutations and Combinations
Conditionals Coding with Playing Cards. Card game – Teacher v Students The rules of the game are: If I draw a black card, I get a point Else, you get.
Blackjack: An Analysis of Probability By: John Theobald.
Poker UML and ADT design plan.
Casinos There’s a reason they are big and extravagant!
1 Introduction to Discrete Probability Rosen, Section 6.1 Based on slides by Aaron Bloomfield and …
Learning to Play Blackjack Thomas Boyett Presentation for CAP 4630 Teacher: Dr. Eggen.
Blackjack: A Beatable Game Amber Guo Adapted from: David Parker Advisor: Dr. Wyels California Lutheran University ‘05.
Welcome to 5 th Grade “Virtual Parent School” Unit 1 Order of Operations & Whole Numbers.
WOULD YOU PLAY THIS GAME? Roll a dice, and win $1000 dollars if you roll a 6.
California has 5 water year types: 1 card = 1 water year Critically dry and dry years: Ace-10 black cards Normal-wet years: all red cards & all face cards.
GamblingGambling What are the odds? Jessica Judd.
By: Carla Norman, Erin Densmore, Dena E..  Probability is the measure of how likely an event is  Probability is found all around us.
Warm-Up Pg. 361 # 2, 3, 4b. Unit 2 Theoretical Probability of Multiple Events Learning Goal: I can determine the theoretical probability of an and represent.
Section 5.1 Discrete Probability. Probability Distributions x P(x)1/4 01/83/8 x12345 P(x)
Card Game Z  Agree on a dealer and a score keeper  The dealer should remove all the Jacks, Queens, Kings & Jokers from the pack and then shuffle  The.
4.2 Matrix Multiplication Objectives: Multiply 2 matrices. Use matrix multiplication to solve mathematical and real-world problems. Standard:
Gambling and probability 1. Odds and football.  Predict the Premier League results for this weekend.  Can you estimate the probability of a win/draw/loss.
Texas Holdem A Poker Variant vs. Flop TurnRiver. How to Play Everyone is dealt 2 cards face down (Hole Cards) 5 Community Cards Best 5-Card Hand Wins.
13.4 Product of Two Matrices
Lecture 13.
Lecture 11.
Lecture 10.
Game Theory “How to Win the Game!”.
Probability of casino games
Lecture 12.
A R R A Y ! for Multiplication!!
Truth tables: Ways to organize results of Boolean expressions.
Food that We Eat.
Truth tables: Ways to organize results of Boolean expressions.
Blackjack: Counting Hands and Counting Cards
3rd/4th grade Family Math Night Games
Truth tables: Ways to organize results of Boolean expressions.
Practical tasks, games and ‘real-life’ challenges
Matrix Multiplication Sec. 4.2
BY: Cesar, Jennifer, Adrianne & Allen
A R R A Y ! for Multiplication!!
Presentation transcript:

Probability, matrices and game theory The mathematics of Blackjack (21)

Basic Idea Draw cards to get as close as possible to a total of 21 without going over PLAYERDEALER Highest total wins!

Complications of Blackjack Ace = 1 or 11 Blackjack (Ace+Ten) vs. 21 Splitting pairs Doubling down Insurance When cards are shuffled Whose cards you can see Casino-dependent special cases

Decimal Blackjack (Version 1.0) Remove all the face-cards; let Ace=1 Each number from 1 to 10 occurs with equal probability of 0.1 One card each: high card wins Not very exciting... no decisions to make

The Score Matrix, S All calculations from Casino point of view PLAYER DEALER

Score matrix, expectations and game value Score matrix, S Card probability vector p = (0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1) Player expectations Dealer expectations Expected game value

Score matrix, expectations and game value Blackjack 1.0

Decimal Blackjack (Version 1.1) Player (only) has option to HIT – drawing additional cards to improve total before seeing Dealer’s card –must not go over 10. PLAYERDEALER

Decimal Blackjack (Version 1.1) PLAYERDEALER

The Draw Matrix An example of a Markov Matrix Bust Bust TOTAL BEFORE TOTAL AFTER

Draw Matrix, D

Drawing Two Cards Multiply Markov matrices D.D

Draw one card if total < n

Keep hitting while total < 6 Multiply Markov matrices indefinitely This matrix above is an idempotent matrix

Score matrices for Decimal Blackjack 1.1 Player’s drawing Markov matrix, D Score matrix Player expectations Dealer expectations Expected game value

Blackjack 1.1: Player hits when < 6

Blackjack 1.1: Player hits when < 5

Blackjack 1.1: Player hits when < 4

Summary: Blackjack 1.1 Player hits when total n is –n<1, zero advantage (same as dealer strategy) –n<2, 8.45% advantage –n<3, 14.67% advantage –n<4, 21.1% advantage –n<5, 22.98% advantage (OPTIMAL STRATEGY) –n<6, 20.79% advantage –n<7, 13.38% advantage –n<8, 6.2% disadvantage –n<9, 22.83% disadvantage –n<10, 55.2% disadvantage –n<11, 100% disadvantage

Decimal Blackjack (Version 1.2) Both player and dealer can HIT –but let’s assume for now that whoever goes second cannot see the first player’s cards (Las Vegas style Blackjack) PLAYERDEALER

Scoring for Decimal Blackjack 1.2 Player’s Markov matrix Dealer’s Markov matrix Expected game value

Game Matrix Compare opposing strategies For any given dealer strategy, player would choose the row which gives the MINIMUM For any given player strategy, dealer would choose the column which gives the MAXIMUM hit whenn<4n<5n<6n<7n<8 n<406.4%8.8%6.0%-3.6% n<5-6.4%04.5%3.8%-3.7% n<6-8.8%-4.5%01.8%-3.2% n<7-6.0%-3.8%-1.8%0-2.0% n<83.6%3.7%3.2%2.0%0 Player Strategies Dealer Strategies

Saddle-points An entry in the game matrix which is a minimum in its column and a maximum in its row is called a Saddle Point Pairs of strategies that form saddle points are “optimal” and in “equilibrium”: neither person has an incentive to play differently

Decimal Blackjack 1.2 Both player and dealer should choose the strategy –HIT on all totals less than 7

Decimal Blackjack 2.0 The game is no longer SYMMETRIC

hit whenn<4n<5n<6n<7n<8 n<44.7%7.2%10.1%8.0%-0.7% n<5-5.5%1.4%6.8%7.3%1.3% n<6-7.5%-2.1%3.8%7.4%4.9% n<7-4.0%-0.2%3.9%8.5%10.1% n<86.4%8.8%11.3%14.2%17.2% Game Matrix for Version 2.0 MINIMUM entry in each column MAXIMUM entry in each row There is a Saddle-point Player Strategies Dealer Strategies

Optimal strategies for Decimal Blackjack 2.0 Dealer should HIT if total < 7 Player should HIT if total < 5 Advantage to Casino = 7.3%

hit whenn<14n<15n<16n<17n<18 n<142.6%12.8%18.7%17.5%9.1% n< %1.1%10.7%13.2%8.3% n< %-7.1%3.1%9.7%8.9% n< %-7.7%-0.3%7.1%10.8% n<18-5.3%-0.5%4.4%9.3%14.3% Game Matrix for Version 2.1 New goal: Closest to 21 without busting MINIMUM entry in each column MAXIMUM entry in each row There is NO saddle-point! NO equilibrium! Player Strategies Dealer Strategies

hit whenn<14n<15n<16n<17n<18 n<142.6%12.8%18.7%17.5%9.1% n< %1.1%10.7%13.2%8.3% n< %-7.1%3.1%9.7%8.9% n< %-7.7%-0.3%7.1%10.8% n<18-5.3%-0.5%4.4%9.3%14.3% Movement diagrams Either person will change strategies if unhappy with current situation. Player Strategies Dealer Strategies

hit whenn<17 29% n<17 and 71% n<18 n<18 n<1513.2%8.3% n<177.1%10.8% 43% n<15 and 57% n<17 9.7% Mixed Strategies Randomly change between 2 or more different strategies Player Strategies Dealer Strategies 29% n<17 and 71% n<18 9.7%

Minimax theorem Every two-person zero-sum game with a finite number of pure strategies has a minimax equilibrium if mixed strategies are allowed Borel, Fisher, Von Neumann, Morgenstern, Nash proved in a various ways between 1920 and 1950

Blackjack 2.13 Let’s put the face cards back in the deck –Face cards count as 10 Probability distribution is now

hit whenn<14n<15n<16n<17n<18 n<140.8%6.9%9.2%7.2%0.7% n<15-4.3%2.2%6.9%7.4%3.3% n<16-5.2%-0.2%5.0%8.2%6.9% n<17-1.7%2.0%5.8%9.8%11.5% n<186.6%9.1%11.7%14.4%17.2% Game Matrix for Version 2.13 Both player and dealer want to HIT less often when the proportion of 10’s are higher. Mixed equilibrium has dealer advantage of 7.6% Player Strategies Dealer Strategies

Effect of card distribution Blackjack 2.10 –Dealer advantage 9.7% –Dealer mixes hitting with n<17 and n<18 –Player mixes hitting with n<15 and n<17 Blackjack 2.13 –Dealer advantage 7.6% –Dealer mixes hitting with n<16 and n<17 –Player mixes hitting with n<14 and n<16

Blackjack 3.0 In legal casinos the dealer plays a fixed and publicly known strategy! Let’s FIX this strategy to be HIT if n<17 This is the best FIXED strategy for the casino with an initial distribution

hit whenn<14n<15n<16n<17n<18 n<140.8%6.9%9.2%7.2%0.7% n<15-4.3%2.2%6.9%7.4%3.3% n<16-5.2%-0.2%5.0%8.2%6.9% n<17-1.7%2.0%5.8%9.8%11.5% n<186.6%9.1%11.7%14.4%17.2% Game Matrix for If dealer cannot mix, outcome will be one of the blue entries Dealer settles for 7.2% Player Strategies Dealer Strategies

hit whenn<14n<15n<16n<17n<18 n<142.6%12.8%18.7%17.5%9.1% n< %1.1%10.7%13.2%8.3% n< %-7.1%3.1%9.7%8.9% n< %-7.7%-0.3%7.1%10.8% n<18-5.3%-0.5%4.4%9.3%14.3% Game Matrix for Out of all fixed strategies dealer would prefer to settle for n<18 with 8.3% Legal casino dealers can’t change strategies based on p so must play n<17 and get only 7.1% Player Strategies Dealer Strategies

Blackjack 3.0 with card counting and fixed dealer strategy n<17 –Hit with n<14 (dealer advantage 7.2%) –Hit with n<17 (dealer advantage 7.1%) –Hit with n<18 (player advantage 4.3%) –Hit with n<12 (player advantage 27%)

Blackjack 4.0 Can see the dealer’s first card Instead of using a game value of use instead

Strategy for Blackjack 4.0 can see the dealer’s first card Dealer shows 1, HIT if n < 14 (Dealer advantage 11.0%) Dealer shows 2, HIT if n < 13 (Player advantage 1.0%) Dealer shows 3, HIT if n < 13 (Player advantage 3.7%) Dealer shows 4, HIT if n < 12 (Player advantage 6.6%) Dealer shows 5, HIT if n < 12 (Player advantage 9.6%) Dealer shows 6, HIT if n < 12 (Player advantage 12.7%) Dealer shows 7, HIT if n < 17 (Player advantage 3.7%) Dealer shows 8, HIT if n < 17 (Dealer advantage 3.2%) Dealer shows 9, HIT if n < 17 (Dealer advantage 11.2%) Dealer shows 10, HIT if n<16 (Dealer advantage 21.6%) Overall dealer advantage 5.7%

Real Blackjack factoids Optimal non-card-counting strategy –1-deck game Player advantage 0.04% –4-deck game Dealer advantage 0.49% –Infinite decks Dealer advantage 0.65% Observation in 1987 of 11,000 actual hands played in Nevada/New Jersey –Non-optimal average-Joe play Dealer advantage 2% –Players who tried to count cards made a mistake once every 7 hands Dealer advantage 9%