Hey,
I'm currently programming a blackjack simulator for learning purposes. I'm a beginner at blackjack and by doing this I hope to learn a couple of things about this interesting game.
I have implemented basic strategy for "6 decks, S17, D9, DAS, No Surrender, No Peek" using a chart I found on this site (link). The chart states that the house edge for these rules should be about 0.64%. I ran a couple of simulations with 400.000.000 rounds each but these consistently seem to (falsely) indicate a lower house edge. Somewhere, something must be going wrong.
I'm not sure about some rules used to compute that house edge of 0.64% but I'll state some assumptions I made.
Another aspect I'm not sure about is the shuffling. At first I simulated a CSM by resetting and reshuffling the deck after each hand. This was pretty slow and because I've not yet implemented any card counting strategy's I assumed it would be safe to only reset and reshuffle the shoe when there are less than about 52 playing cards left. I'm using the Knuth shuffling algorithm with a pseudo random number generator I downloaded from this site.
I'm aware this isn't a programming forum but I appreciate all helpful comments or suggestions on what might be going wrong. If anyone would like to see some code that might be relevant I don’t mind posting it.
Thanks,
GZAN
Data from some simulation runs:
Chips payed: 887515035
Chips received: 887590366
House edge: -0.00848714%
Chips payed: 887615113
Chips received: 887599272
House edge: 0.0017847%
Chips payed: 887562063
Chips received: 887593164
House edge: -0.00350397%
I'm currently programming a blackjack simulator for learning purposes. I'm a beginner at blackjack and by doing this I hope to learn a couple of things about this interesting game.
I have implemented basic strategy for "6 decks, S17, D9, DAS, No Surrender, No Peek" using a chart I found on this site (link). The chart states that the house edge for these rules should be about 0.64%. I ran a couple of simulations with 400.000.000 rounds each but these consistently seem to (falsely) indicate a lower house edge. Somewhere, something must be going wrong.
I'm not sure about some rules used to compute that house edge of 0.64% but I'll state some assumptions I made.
- A player 21 loses against a dealer blackjack
- A player blackjack wins against a dealer 21 with a 3:2 payout
- The player is allowed to split different ten-valued cards (I don't think this should affect the simulation since the BS-chart states never to split tens anyways)
- The player is allowed to split a hand as often as he likes
Another aspect I'm not sure about is the shuffling. At first I simulated a CSM by resetting and reshuffling the deck after each hand. This was pretty slow and because I've not yet implemented any card counting strategy's I assumed it would be safe to only reset and reshuffle the shoe when there are less than about 52 playing cards left. I'm using the Knuth shuffling algorithm with a pseudo random number generator I downloaded from this site.
I'm aware this isn't a programming forum but I appreciate all helpful comments or suggestions on what might be going wrong. If anyone would like to see some code that might be relevant I don’t mind posting it.
Thanks,
GZAN
Data from some simulation runs:
Chips payed: 887515035
Chips received: 887590366
House edge: -0.00848714%
Chips payed: 887615113
Chips received: 887599272
House edge: 0.0017847%
Chips payed: 887562063
Chips received: 887593164
House edge: -0.00350397%
Last edited: