The story began when me and a buddy of mine went to St. Gertrude's (a festival) and lost our shirts (or $20) at Blackjack. We made a donation to the church! When we got home that night, we resolved to see what we had done wrong. We spent the night learning basic strategy and the Hi-Lo card counting system (Wikipedia). The next day, we went back to the festival and proceeded to get our asses handed to us.

So, we went home again. Being hobby programmers, we decided to program a simulation to find the house edge for a Blackjack player under these rules (Two decks, Dealer stands on Soft 17, etc). Our first attempt was a bitter failure, so we moved from C++ (not my native language) to Java. Second attempt, we got a house edge of about 30%!

After we eventually corrected the bugs (doubles should NOT take 4x your money if you win!), we came up with 2.23%. That's where we're stuck. According to the interweb, it should be somewhere around 0.23%. So, check out our code. If you see the problem, please, please leave me a comment.

Download

Home