Source Code and Compiled Executable

This was a C++ application written for my Advanced AI course at DeVry. The idea was to program an AI blackjack dealer that follows standard procedures (stand on 17 or higher, hit on lower), then run a Monte Carlo simulation at 1000 samples and provide the data back to the player.

A Monte Carlo simulation essentially just runs through the options multiple times and calculates the odds of an outcome based on the data. It can be used for AI decision making in the same way that it is used to help a player decide in this game. At each turn, the application runs 1000 iterations for hitting, and 1000 iterations for standing, then returns the results as a percentage. The player can then hit or stand as they choose to.

It is a simple console application, focusing more on the logic than presentation. It looks something like this:

And will play through until the player tells it not to continue (which is prompted between each hand).

Leave a comment