CoopOwnz
CoopOwnz
  • Threads: 5
  • Posts: 11
Joined: Oct 29, 2016
October 29th, 2016 at 6:36:01 PM permalink
Hello,
I am running some tests to calculate the house edge in blackjack using different rule variations.
The rules for a specific test I will reference:
Splitting up to 4 hands. Double after split allowed. Late surrender allowed. Dealer Stays on S17. Can double on any 2 cards. Draws 1 card only after splitting aces. Blackjack pays 3:2.
The basic strategy that is used is from Wizard of Odds site.


Example results for playing 500,000 shoes (6 deck) with 75% penetration:
In this example the program bets $5 every hand.
Total Hands: 22,484,062
Player Win: 42.61161%
Player Lose: 44.74231%
Standoff: 8.295716%
Surrender: 4.350366%
Total Amount Bet: $111,598,138
Total Amount Won/Lost: -$103,400
Approx. House Edge: 0.09265388%

The House Edge I calculated with ( (Total Amount Won/Lost) / (Total Amount Bet) ) *100
After several runs the average is around 0.1%.
Other websites say this should be about 0.35% given the rules I said above.

Here is an example of how I calculate Amount Won/Lost ($5 bet per hand):
Hand 1: I'm dealt blackjack. (Bet Total = 5) (Total Won/Lost = 7.5)
Hand 2: I split once & win both (Bet Total = 15) (Total Won/Lost = 17.5)
Hand 3: I double down & lose (Bet Total = 25) (Total Won/Lost = 7.5)
Hand 4: Dealer gets BJ (Bet Total = 30) (Total Won/Lost = 2.5)
Hand 5: I surrender (Bet Total = 32.5) (Total Won/Lose = 0)

Any idea why I might be getting lower results for the house edge? Am I calculating the Amount Won/Lost correctly?
Ty
ChesterDog
ChesterDog
  • Threads: 9
  • Posts: 1710
Joined: Jul 26, 2010
October 30th, 2016 at 1:38:15 AM permalink
Quote: CoopOwnz

...
Here is an example of how I calculate Amount Won/Lost ($5 bet per hand):
Hand 1: I'm dealt blackjack. (Bet Total = 5) (Total Won/Lost = 7.5)
Hand 2: I split once & win both (Bet Total = 15) (Total Won/Lost = 17.5)
Hand 3: I double down & lose (Bet Total = 25) (Total Won/Lost = 7.5)
Hand 4: Dealer gets BJ (Bet Total = 30) (Total Won/Lost = 2.5)
Hand 5: I surrender (Bet Total = 32.5) (Total Won/Lose = 0)

Any idea why I might be getting lower results for the house edge? Am I calculating the Amount Won/Lost correctly?
Ty



Thanks for the example. House edges are based on the initial bet, which in your example is always $5. (So, don't include your extra bet amounts for insurance, doubling-down, and splitting in your bet total. Also, count your surrender hand as a $5 bet. This will bring your house edge simulation result closer to the published value.)
OnceDear
OnceDear
  • Threads: 64
  • Posts: 7534
Joined: Jun 1, 2014
October 30th, 2016 at 2:06:12 AM permalink
Hi OP,
Welcome to the forum.
What are you using to simulate play? Something you coded yourself to use Basic strategy (in which case, well done)

Quote: ChesterDog

House edges are based on the initial bet (So, don't include your extra bet amounts for insurance, doubling-down, and splitting in your bet total.

Sorry, but I don't believe that is correct at all.
Psalm 25:16 Turn to me and be gracious to me, for I am lonely and afflicted. Proverbs 18:2 A fool finds no satisfaction in trying to understand, for he would rather express his own opinion.
ChesterDog
ChesterDog
  • Threads: 9
  • Posts: 1710
Joined: Jul 26, 2010
October 30th, 2016 at 3:11:08 AM permalink
Here's a definition of house edge from Wizard of Odds.
Quote:

House Edge
The ratio of the expected player loss to the initial amount bet. For example if the house edge for blackjack is 0.5% then for every $100 you bet initially you can expect to lose 50 cents. The house edge is a good measure of expected player wins or losses over time but is not a perfect measure of comparing one game to another. The reason is the house edge does not include additional money bet (for example doubling in blackjack or raising in Three Card Poker) as money bet. Two common mistakes in calculating the house edge are not including ties (they should be counted towards money bet) and including additional money bet (like doubling and raising) towards money bet. ...

OnceDear
OnceDear
  • Threads: 64
  • Posts: 7534
Joined: Jun 1, 2014
October 30th, 2016 at 3:33:12 AM permalink
Quote: ChesterDog

Here's a definition of house edge from Wizard of Odds.


Thanks, I'd seen that, so I see where you are coming from. To be honest I reckon that demands further investigation and clarification, if only for my increased understanding.
I've previously worked through the spreadsheet exercise https://www.youtube.com/watch?v=wJsGnXgrGvg and though it was heavy going at times, it did seem to account for the effects of doubling on the strategy and on the house edge.
As I understand it, the house edge from calculations and from simulations is expressed as a percentage of the return on the original wagers, but has inherently been influenced by doubles and splits, some of which gave short term situations where the player has an edge on those added wagers.

Wizard, Anyone
Care to chip in on explaining how doubles and splits and the ability to do so can, and does effect house edge, while squaring that explanation up with the assertion quoted from the Wizard himself?
Psalm 25:16 Turn to me and be gracious to me, for I am lonely and afflicted. Proverbs 18:2 A fool finds no satisfaction in trying to understand, for he would rather express his own opinion.
beachbumbabs
beachbumbabs
  • Threads: 101
  • Posts: 14268
Joined: May 21, 2013
October 30th, 2016 at 6:55:14 AM permalink
I think you will find answers in the Wizard's several discussions about House Edge vs. Element of Risk, a calculation he favors (may have created? Not sure.) in evaluating dissimilar games.

House edge is a calculation most accurate on no-decision games like craps, roulette, and baccarat. You make a bet, you wait for a result.

Blackjack has a small %age of hands where you can bet additional money. It does affect your HE in that game, but is highly individualized, thus the complicated tables parsing out each rule. The total effect is really the EOR, but the shorthand reference is to state it as HE.

Carnival games, mostly poker-based, and probably starting chronologically with Caribbean Stud, pretty much all are greatly affected by the need to make at least one additional bet to stay in the game. HE is calculated based on the ante amount only, so the player's exposure and true risk is distorted using that number.

One of the most extreme examples I know of is UTH, where only the ante is calculated for the published HE, but the mandatory blind is not, and the play bet (of up.to 4x.the ante bet) is not as well. The Wizard explains it very well here:

Quote: WoO



The lower right cell shows a house edge of 2.185% per ante bet. What this means, for example, is if you bet $1 and both the Ante and Blind initially, then you can expect to lose 2.185 cents on average. However for comparison to other games I believe the Element of Risk is more appropriate to look at. The average total amount bet by the end of the hand is 4.152252 times the ante bet. So the element of risk would be 2.185%/4.152252 = 0.526%.



Hope that's helpful.

https://wizardofodds.com/games/ultimate-texas-hold-em/
If the House lost every hand, they wouldn't deal the game.
CoopOwnz
CoopOwnz
  • Threads: 5
  • Posts: 11
Joined: Oct 29, 2016
October 30th, 2016 at 7:30:59 AM permalink
Thanks for all the helpful answers.
This is something I'm coding for android phones.

I changed the House Edge calculation to use Initial Wager and that did it. What I find interesting is you have to run at least 4 million hands to start getting a somewhat approximation on the House Edge.
Thanks all.
OnceDear
OnceDear
  • Threads: 64
  • Posts: 7534
Joined: Jun 1, 2014
October 30th, 2016 at 7:42:30 AM permalink
Quote: CoopOwnz

Thanks for all the helpful answers.
This is something I'm coding for android phones.

I changed the House Edge calculation to use Initial Wager and that did it. What I find interesting is you have to run at least 4 million hands to start getting a somewhat approximation on the House Edge.
Thanks all.


It's also interesting that your test reveals that by playing BS and splitting/doubling as you should, you can achieve an effective house edge approx 0.25% less than the conventional wisdom would suggest.
That's pretty close to saying that perfect BS can nearly beat the house and is a remarkable finding, if it's true.
Psalm 25:16 Turn to me and be gracious to me, for I am lonely and afflicted. Proverbs 18:2 A fool finds no satisfaction in trying to understand, for he would rather express his own opinion.
CoopOwnz
CoopOwnz
  • Threads: 5
  • Posts: 11
Joined: Oct 29, 2016
October 30th, 2016 at 7:46:34 AM permalink
Quote: OnceDear

It's also interesting that your test reveals that by playing BS and splitting/doubling as you should, you can achieve an effective house edge approx 0.25% less than the conventional wisdom would suggest.
That's pretty close to saying that perfect BS can nearly beat the house and is a remarkable finding, if it's true.



I was waiting to see if someone caught that! It's not true! I also found an error in my code that I adjusted since the original post. Basically, that House Edge in my first post completely means nothing.

Sorry about that =/

Edit: The actual percentage is usually just 4 or 5 hundredths of a percent lower then actual house edge
charliepatrick
charliepatrick
  • Threads: 39
  • Posts: 3011
Joined: Jun 17, 2011
October 31st, 2016 at 8:08:41 AM permalink
Quote: CoopOwnz

....you have to run at least 4 million hands to start getting a somewhat approximation on the House Edge....

The easiest way to find out how near you are is to run (say) 10 trials and see the spread. This way you not only see the average but also the variance and also how large a sample (i.e. #shoes) is needed.

Another factor is stated House Edge is based on the first hand of the shoe whereas you're (correctly) running many hands per shoe. For some reason this gives a slightly different HE than simulations where you shuffle after every hand.

I'm based in the UK and a while ago ran 10m shoes (but not using your rules, so don't use the HE numbers just compare the different results)...
6dx 83% penetration (462m hands) .4880%
6dx 66% penetration (370m hands) .4796%
6dx 16 cards penetration (95m hands) .4726%
CoopOwnz
CoopOwnz
  • Threads: 5
  • Posts: 11
Joined: Oct 29, 2016
October 31st, 2016 at 10:20:45 AM permalink
Quote: charliepatrick

The easiest way to find out how near you are is to run (say) 10 trials and see the spread. This way you not only see the average but also the variance and also how large a sample (i.e. #shoes) is needed.

Another factor is stated House Edge is based on the first hand of the shoe whereas you're (correctly) running many hands per shoe. For some reason this gives a slightly different HE than simulations where you shuffle after every hand.

I'm based in the UK and a while ago ran 10m shoes (but not using your rules, so don't use the HE numbers just compare the different results)...
6dx 83% penetration (462m hands) .4880%
6dx 66% penetration (370m hands) .4796%
6dx 16 cards penetration (95m hands) .4726%



That's interesting. This will be able to be simulated on my app I'll put on the google play store this winter. However, on my phone with 4 core processor does 200,000 shoes in about 30 seconds with 75% pen (just under 10 mil hands). So I will have to put some kind of limit on the number of shoes to avoid people entering too large a number and having to wait forever. My PC does it almost 3 times as fast so I can do larger tests on here.
  • Jump to: