ddr
Joined: Nov 27, 2019
• Threads: 2
• Posts: 6
October 18th, 2021 at 8:28:19 AM permalink
I have written a Blackjack simulator in Python as a coding exercise and to enable me to simulate local playing conditions. I am using the Wizard of Odds Blackjack Calculator (/games/blackjack/calculator/) as a reference.

Conditions: 6D, H17, DAS, double any two, split up to 3 incl Aces, no hit split Aces, BJ 3:2, SUR
The Wizard's Calculator gives: 0.50178% for Basic strategy with a cut card

In my simulations, I got as close as -0.490% after simulating 100M rounds with 75% shoe penetration. This is pretty close (and I'm running a 200M round test now). I'm wondering what shoe penetration depth to use to get as close as possible to the Wizard's results. After this test I will turn penetration up to 95%.

Thanks!
DDR
DogHand
Joined: Sep 24, 2011
• Threads: 1
• Posts: 459
October 19th, 2021 at 2:55:34 AM permalink
DDR,

Here's a check you can try while you're awaiting word from the Wiz: the same page you referenced gives the "continuous shuffler" house edge as 0.48178% for your rule set, so if you set your sim to shuffle every round, you can check your result against this number.

Technically, you should also get the same house edge if your sim deals a fixed number of rounds per shoe: say 40, so you needn't worry about running out of cards.

Hope this helps!

Dog Hand

P.S. Just out of curiosity, how much time does your sim require for a 100-million round sim?
ddr
Joined: Nov 27, 2019
• Threads: 2
• Posts: 6
October 19th, 2021 at 8:00:26 PM permalink
Thanks! A good tip to shuffle sooner. I parameterized penetration, so I can just set it to 1% to shuffle after every round. Of course that will greatly slow things down but should prove useful.

For something close to the rules above (split to 4 hands, split aces to 3 hands), I get these results with pen at 80%:

RULES: 6D, split:4, split_aces:3, late SUR, H17, pen:80%
---------------------
elapsed time: 1:13:33 (1 hour, 13 minutes, 33 seconds)
total rounds: 100,000,000
total hands: 102,830,305
stake: -502,648.50 (min -502,862.00, max 133.50)
hands won: 42.40%, units won 51,829,888.50
hands lost: 44.33%, units lost 52,332,537.00
pushes: 8.18% (8,410,982)
surrenders: 5.09% (5,230,820)
blackjacks: 4.74% (4,740,543, won 4,524,855)
total wagered: 100,000,000
average loss: 0.005026
edge: -0.503%

I've done little by way of optimization while I get the logic right and robust. Now I'm adding ability to spread to multiple hands. I have some ideas about accumulating the results in a database and then running analysis after the fact with some parallelization. That's a task for another day.

• Jump to: