Breaking Blackjack

A few days ago. my roommate Patrick bought a copy of 21.  After a watching peeked our interest, we started playing blackjack at home and then went to the Horseshoe Casino last night.  Patrick managed to make around $80 and I walked out with exactly the same amount of money I walked in with.

Today, I started working on developing a simulation to test various strategies.  After a full day of development, I have the basic framework working, and it is able to run a simple simulation based on basic strategy from Wikipedia.

The program is written in Java, and the first source tarball is attached to this post.  To run the simulation, build and run PlayerVsDealer.java.

blackjack-r5.tar.gz

Update: Fixed a pretty major bug that was causing the decks to not be shuffled.  It works much nicer now.  Also, the win percentage is up closer to 48% now.

blackjack-r6.tar.gz

See this post for a more recent build.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>