High-Low Card Counting Strategy

Took a ride over to Wesley Tansey’s blog and checked out the blackjack simulator project there. Decided on adding card counting strategy High-Low. I used Standford Wong‘s book Professional Blackjack as a reference. Did not have great success with it, some tweaks need to be done on the betting strategies. Was only able to get a approx -4.10 to -3.07 return on 500,000 hands played. Either way, packing up the code here as a zip file that includes HighLowStrategy object or you can get the original code here.


About financecoding
I enjoy coding in dart.

5 Responses to High-Low Card Counting Strategy

  1. Mike says:

    In case you are interested, I noticed that you never defined a setting for MaxSplitsAllowed. The program defaulted the value to 0, which means it was never allowing you to split. This hurt your expected gain by a good amount.

  2. Rob says:

    Thank you very much for the code. In gratitude for the generosity, I’d like to share some issues I’ve found:

    1. When hitting after ace splits set to false, the first hand’s value is wrong. It seems to be counting to many aces as once. I set aces++ to zero in the right place and that seemed to hack-fix it.

    2. Insurance payoff is wrong, but only presents itself when you vary your betting per hand varies. After a easy fix to:

    hand.Won += hand.Bet * (Settings.InsuranceCost + Settings.InsurancePayoff);

    You then want to change the Insurance cost and payoffs to .5 and 1 in the settings.

    3. When dealer has 10-A, or if dealer has A-10 but Insurance bet is turned off, the hand plays out and it’s possible to push with the dealer on any hand totalling 21.

    4. The shuffle algorithm has a classic error that thousands of us have made. Choosing the random number from the entire _shoe.Length every iteration is incorrect. Google “c# Fischer-Yates shuffle” and use that. The difference is subtle but important.

    I hope this helps someone. Thanks again! This program is great.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: