rtsander
rtsander
  • Threads: 1
  • Posts: 2
Joined: Sep 3, 2024
September 3rd, 2024 at 2:35:07 PM permalink
Hey everyone!

I've been taking a look at the blackjack hand calculator recently (https://wizardofodds.com/games/blackjack/hand-calculator/), and I'm super impressed!

It seems that the ev was calculated using combinatoric analysis (as opposed to simulations), but when we're up to 8 decks there's a ludicrous number of combinations possible. Seems like it would be incredibly difficult to run through every option, but I figure I must be missing something. Curious if anyone has any insight into how the calculations were made?

Thanks!
aceside
aceside
  • Threads: 2
  • Posts: 569
Joined: May 14, 2021
September 3rd, 2024 at 2:56:43 PM permalink
I’m not sure how this calculator is made but I’ve reported a tiny bug in it before. Specifically, it is about “Split 2s through 10s.” Let me use an example to show you.

For the player hand 8,8. vs. Ten, the split EV is:
-0.484902, for SPL-1;
-0.472917, for SPL-2;
-0.477139, for SPL-3.

Is there a problem here?
Mental
Mental
  • Threads: 16
  • Posts: 1549
Joined: Dec 10, 2018
September 3rd, 2024 at 6:20:56 PM permalink
Quote: rtsander

Hey everyone!

I've been taking a look at the blackjack hand calculator recently (https://wizardofodds.com/games/blackjack/hand-calculator/), and I'm super impressed!

It seems that the ev was calculated using combinatoric analysis (as opposed to simulations), but when we're up to 8 decks there's a ludicrous number of combinations possible. Seems like it would be incredibly difficult to run through every option, but I figure I must be missing something. Curious if anyone has any insight into how the calculations were made?

Thanks!
link to original post

No, it is a fairly small number of combinations once you treat every 10, J, Q, and K as identical, etc. It takes a fraction of a second to do 8-deck calculations with Eric Farmer's code.

I haven't looked the Wizard/JB code. Eric Eric creates a tree in software that follows every possible hand until there are no more legal moves. I.e., the player busts or the player has doubled down and has no more options for the duration of the hand. The probabilities at every junction on the tree reflect the probabilities based on the cards already used up by the dealer an player cards. You can also add or remove cards from the deck before the hand starts to see the effect of card removal.

Blackjack would be a very simple game to analyze this way, but splitting and soft hands need to be treated correctly. If you code at all, you should be able to follow Eric's logic. It is only a few thousand lines of code and the kernel is much smaller.

I might try to add some code to count the number of end points on the full tree. It won't be near as many as you might guess.
Gambling is a math contest where the score is tracked in dollars. Try not to get a negative score.
rtsander
rtsander
  • Threads: 1
  • Posts: 2
Joined: Sep 3, 2024
September 3rd, 2024 at 7:56:31 PM permalink
Ah I wasn't aware of Eric Farmer's code! Diving into it now, but it is really interesting.

Thanks!
Mental
Mental
  • Threads: 16
  • Posts: 1549
Joined: Dec 10, 2018
September 4th, 2024 at 6:42:46 AM permalink
Quote: rtsander

Ah I wasn't aware of Eric Farmer's code! Diving into it now, but it is really interesting.

Thanks!
link to original post



Glad you found it. Note that the BJDealer::getProbability functions don't calculate the probability of dealing, for example, the ace of clubs from the second deck. They compute the probability of dealing any of the 32 aces in the 8 decks. This is why it takes almost the same amount of time to calculate the strategy for 8 decks or a single deck.
Gambling is a math contest where the score is tracked in dollars. Try not to get a negative score.
aceside
aceside
  • Threads: 2
  • Posts: 569
Joined: May 14, 2021
September 4th, 2024 at 1:22:02 PM permalink
Let me use another example to show you the split EV numbers from this calculator. For the player hand 10, 10 vs. 6, the split EV is:

+0.588509, for SPL-1;
+0.352408, for SPL-2;
+0.506739, for SPL-3.

The problem probably is on SPL-2.
  • Jump to: