Simulation

DonFinuchi

Active Member
So, I have been writing a little primitive Blackjack simulator. I have been running simulations based on 6 decks, S17, D9, DAS, No Surrender, No Peek. I have only implemented basic strategy. In the graph below, the x-axis represents rounds simulated in millions. The y axis represents the player edge, which I have calculated as follows.

Edge = (AccumulatedWinnings / AccumulatedLosses – 1) * 100 %

AccumulatedWinnings has been incremented when the player has won, and AccumulatedWinnings when the player have lost, and neither of them when player has pushed.

But, is this correct? I mean, for instance if I were to count pushes as both winnings and losses, both would be significantly larger and the simulated edge below would be closer to -0.64. But that’s probably not the case.

Am I at least trying to calculate the edge right?
 

Attachments

Last edited:

SleightOfHand

Well-Known Member
DonFinuchi said:
So, I have been writing a little primitive Blackjack simulator. I have been running simulations based on 6 decks, S17, D9, DAS, No Surrender, No Peek. I have only implemented basic strategy. In the graph below, the x-axis represents rounds simulated in millions. The y axis represents the player edge, which I have calculated as follows.

Edge = (AccumulatedWinnings / AccumulatedLosses – 1) * 100 %

AccumulatedWinnings has been incremented when the player has won, and AccumulatedWinnings when the player have lost, and neither of them when player has pushed.

But, is this correct? I mean, for instance if I were to count pushes as both winnings and losses, both would be significantly larger and the simulated edge below would be closer to -0.64. But that’s probably not the case.

Am I at least trying to calculate the edge right?

I can't see your image, I am on my phone, but edge would be (total $ won)/(total $ bet) * 100%
 

DonFinuchi

Active Member
So if I were flatting 1-units I would accumulate...

winnings by 2 (2,5 for BJ) and bettings by 1 when winning,
bettings by 1 when loosing,
(and both by 1 when player pushes?)
 

Sonny

Well-Known Member
Depending on how many times you split and double down, you could win or lose up to 8 initial bets. This doesn't include insurance bets either. Is your AccumulatedWinnings variable counting the number of wins of the amount of the wins?

Your formula seems to be looking for the probability of a loss, not the player's edge. A better formula to use might be:

Edge = (AccumulatedWinnings - AccumulatedLosses) / HandsPlayed

If you are looking for the probability of a win then you could use:

p(Win) = AccumulatedWinnings / HandsPlayed

Depending on how you are counting the splits and pushes, HandsPayed might be equal to (AccumulatedWinnings + AccumulatedLosses) or it might not.

-Sonny-
 
Last edited:

DonFinuchi

Active Member
Actually I am counting the amounts. And I have taken splits and doubles into account.

What I am trying to achieve is to calculate the edge, to se if I can get the same result as the basic strategy engine - to validate my implementation of the game.

At first I implemented the logic from post #3, but I altered it, because I was convinced that it was wrong to count the same units as both winnings AND bettings.
 

Sonny

Well-Known Member
DonFinuchi said:
Sonny,

If I were to implement your edge formula, would it be correct to count a push as a played hand?
Yes. In my formula above the HandsPlayed variable would be the number of initial bets made, not including split hands as multiple hands.

-Sonny-
 
Top