Wednesday, October 12, 2011

Memory, Probability, and Blackjack

I want to see if having a photographic memory is more beneficial to winning hands of blackjack than counting cards are. There are many factors that will probably diminish the validity of this investigation, but I don't care. And by not caring, I mean I forget what we called them in AP Stats. Like what to check every time you do an inferential analysis. I hated doing that so much that my memory decided it was no longer relevant. Anyway, let me break down what I'm talking about when I say photographic memory and counting cards.

Photographic Memory: You don't actually need a photographic memory to play along here. I don't have one, but what I do have at my disposal is Microsoft Excel. I set up a spreadsheet with a cell for each possible card (A-K of Hearts, Diamonds, Spades, and Clubs), for a possible 52 cards. Because I can play the game at my own pace and refer to the spreadsheet as often as I like, it's essentially as good as having a photographic memory.

Counting Cards: In the most common system of counting cards, any card with a rank 2-6 is counted as +1, a 7-9 is counted as 0, and 10, J, Q, K, and A are counted as -1. Higher counts mean that low rank cards are coming out of the deck, which means that there are a higher proportion of high cards remaining. This is good for the player, so you can stand on 15 against a dealer's 5 and the dealer has a higher chance of busting.

Note: Counting cards is more generally used to change the player's bet as opposed to changing how the game is played, which is what sparked my interest in this concept. You can bet a little more money when the odds are slightly more in your favor, but what if you use probability to calculate the percentage of cards remaining, and can confidently predict a win in that hand?

Number of Decks: For now, let's assume only one deck of cards. Most games in casinos, on the Internet, on iTouches, whatever, use multiple decks, but for simplicity's sake, let's start with one deck. The deck will also not be shuffled, to help the photographic memory. This is never done in casinos (see: "diminishing the validity..."), but I'm making it so here.

Alright, there are a lot of words there. Too many without numbers. So, here we go.

The first hand I deal myself is an 8 and Ace of Hearts, and the dealer is showing a 10 of Hearts. Basic strategy says to stand, and I will. The dealer shows a 5 of Hearts, has to hit, and receives a 5 of spades. 20. I lose. It was an easy decision by the player, but the luck of the draw puts my first hand in the loss column.

After five hands, half the deck is gone. I've won two (one on a double down), and lost three. I haven't had a borderline decision yet, but I'm slowly getting a better idea of what cards are remaining in the deck. On my eighth hand, I have a decision to make. I was dealt 7 and hit to get 13, and the dealer is showing a 5. At this point, all of the 2's, 5's, 6's, and 10's have been dealt, leaving 12 cards left in the deck. The expected value of the next card that will be dealt is 7.58. To bust, I would need at least a 9, which has a 7/12 chance of happening. The odds are currently stacked against me, so I'll stand. The dealer turns over an 8, totaling 13, and hits, receiving a king. Win. My play was the same as basic strategy, but the photographic memory call was correct as well.

The deck of cards before I stood on 13
After this hand, there are 6 cards remaining - one 3, 7, J, and K, and two 9's. I get a nine and the king, and the dealer has a 7 showing. Basic strategy leaves me to stand, and the dealer shows a 3 and draws a jack to make 20 and win. In ten hands, I won 3, lost 6, and pushed on one. Pretty boring first deck, but hopefully the next few runthroughs will be interesting.

One hand involved me looking at 15 with a dealer 7 - basic strategy says to hit, but 14 out of the 35 remaining cards would put me over 21 - only 40%. The average of the remaining cards is 6, and the dealer would have to hit as well. I'll take the hit, following basic strategy. Five. Perfect. Stand on 20, and the dealer shows a 4. He hits it, takes a 2, and then a 10. Dealer busts, and I win. Later, I have a hard 17 against a dealer's ace. The proportion of bust cards is 50%, and the average of the remaining cards is 4.8, which would put the dealer around 16, having to hit. I'll take my chances to start, and hit. Five. Twenty two. I'm over, and the dealer shows a 2. If I played basic strategy, I would have ended up with 17, and the dealer 18, and I still would have lost. So far, this isn't really working out so well - there aren't a lot of hands that come up where I'd deviate from basic strategy based on the proportion of cards that would put me over 21, and the average card the dealer could have. I'll keep at it though, and see if I can come up with anything else interesting. If you've made it to this point in the post, give yourself 10 points. Half of this stuff doesn't even make sense to me anymore, but I'll see how it goes in the future. If anything exciting happens, there will be a follow-up blog post. But who knows...I've had a history of carrying out statistical analyses with no helpful result. Guess I'm destined to this. Good thing I love it!

No comments:

Post a Comment