Analysis of basic strategy and counting cards regarding house advantage
Blackjack, on its surface, is a simple game. The goal: get as close to 21 as possible
without going over.
Simple enough, right? In reality, there is a lot more to consider. The number of decks, payouts, doubling rules, shuffling methods, and many other factors contribute to the house edge, the minimum advantage the dealer has over the player. These advantages are calculated assuming play by basic strategy, a guide for moves based solely on probability. Unfortunately, even in the best case scenario and strict basic strategy, the house holds a slight advantage. This means no matter how skilled or lucky you think you are, the house will win eventually. However, the minor house advantage can be reversed using the difficult technique known as counting cards (which although casinos frown upon, is legal). The best counters can supplement the probabilities that determine basic strategy based on the contents of the discard pile to give the player a slight (0.5 - 1 %) advantage.
This application is a simulation of both strategies: basic and counting cards. Here, you can see how they work in action, as well as how they (and other game variables) impact the house edge. With proper play and a little luck, maybe you can hear those magic words: WINNER WINNER CHICKEN DINNER!
These instructions will allow you to see where I am at. These will be updated as I build this project, and will include information about running the application as a user or downloading for development.
The code is currently tested on Linux and Mac OS X. On these operating systems, there should be no prereqs to build and run the source code. However, the fully packaged application has been packaged in QtCreator for Mac as a Mac application, so it must be run on Mac OS. In order do dev on the GUI, QtCreator is required
Start by cloning the repository to your local machine.
Download, Build, and Run Source Code
Use the following commands to build and run:
make
- generates executable bin/app
using main.cpp
and src/Blackjack.cpp
, and places object files in build/
. Use ./bin/app
to run.
make test
- generates executable bin/test/
using test.cpp
and the object files in build/
. If they are not created, it will first run make
. Use ./bin/test
to run the test suite.
make clean
- cleans the directory by deleting the build/
directory and both bin/app
and bin/test
executables.
Run Catch Test Suite
make test
Build and Run GUI in Editor
Open Qt Creator
Select “Open Project”
Select the chicken_dinner.pro
file inside chicken_dinner/chicken_dinner_ui/src
Click the play button to build and run
Apache 2.0 License Summary: You can do what you like with the software, as long as you include the required notices. This permissive license contains a patent license from the contributors of the code.