|
|
| Blackjack Simulator
 Downloads
Build 3
Build 2 Build 1 BUILD 3 - Final Build
Here it is, the last build of the simulator. There are already programs out there which are much more complex than mine and can handle every possible scenario, so I think the challenge of writing the program is outweighed by the hassle in making it more complex.
Updates
- Optimized the simulation time further.
- Resolved a few bugs.
BUILD 2I've made some serious changes to the simulator, most notably being able to simulate millions of hands in a reasonable amount of time. Since the main object of the application is complete, I won't guarantee another update in the future. I guess we'll see how the casino treats me!
Known Issues/Future Additions
- Comparing the advantages with other sites, my simulator gives results which are better than expected. There must be some situation which isn't being determined correctly, but I haven't pinpointed that yet.
- Adding additional game variations.
- Optimizing further to decrease simulation time.
Bug Fixes
- When a player split aces and was dealt a 10 to one hand, they kept hitting it. The player now stands when they have 21.
- Can now split a hand more than once.
Updates
- The game log now outputs in a shorthand text (see explanation below). It's now much easier and faster to read.
- Consolidated the output screen and game options screen into one to avoid going between the two.
- Added Simulation Mode. Provides the following information
- # of Hands Played, Won, Lost, Tied and the percentage for each of the total.
- Starting, Final, Maximum and Minimum Bankroll for the simulation period
- Average Bet
- Average Winnings Per Hand
- Player Advantage/Disadvantage
- Added the following game options:
- Dealer can hit on soft 17
- Turn on/off hitting after splitting aces
- Turn on/off doubling after a split
- Adjust the deck penetration
- Adjust the minimum bet
- Adjust blackjack payoff
- Adjust how many hands a player can split to
- Commented all of the code thoroughly.
- Optimized the code to increase simulation speed.
- Added the option to turn off the game log and bankroll records to increase speed.
- Added a new player (Counter - Muzzy) which uses a card counting technique my friend thought up.
BUILD 1 Introduction This blackjack simulator was written as a fun project to determine how different playing styles of blackjack would affect long-term winnings. I implemented many styles of playing, including a simple play style where the player stands until they get to 17, basic strategy, and several types of card counting. You can also create a human player to play along with the game to practice your basic strategy or card counting. The program is by no means comprehensive when it comes to card counting styles and variations of games, but it gives an accurate look into how card-counting and basic strategy can be advantageous to the player. It is a "best-case" program, meaning that all decks are played to the last card. I plan on adding more realistic options in the future such as adjusting deck penetration.
DISCLAIMER: If the results of this program get you excited about card counting, make sure you know exactly what you're getting in to. Card counting in high-stakes games is almost an impossibility these days. Since it's mainstream conception in the 1960's, casinos have gone to great lengths to make sure card counters walk away discouraged. These techniques range from frequent shuffling, the use of up to 8-decks in a game and even banning oft-winning players. In extreme cases, casinos will cause you financial and PHYSICAL pain to make sure you don't even think about card counting again. So before you decide to get into the sport, make sure you become familiar with what you're getting in to.
How to Play/SimulateThe program is very simple to use. There are two ways of playing: active and simulation.
ACTIVE PLAY
Active play is a real-time, non-simulated game. You can also play along with the computer players to see how you fare. To start an active game, go into Game->New Game and configure the options. You can set the number of decks, minimum bet, and add and subtract your players. To have a user play the game, add a Human player. The rest of the options are computer players who play with certain playing styles:
- Simple - Keeps hitting until they get to 17.
- Basic Strategy - Plays by the strategy chart found here.
- Counter - Hi-Lo - Plays by following basic strategy and using a running Hi-Lo count.
- Counter - True Hi-Lo - Plays by following basic strategy and using a true Hi-Lo count.
- Counter - KO - Plays by following basic strategy and using a KO count.
When all the options are fully configured, click "Start Game".
To start playing, click the "Deal" button and click on "Hit", "Stand", "Double" or "Split" when it is your turn.
SIMULATION PLAY
Simulation play is the main purpose of this application. To play a simulation game, start up a new game and make sure to check the "Simulation Game" check box. You'll have to specify one extra parameter: the number of hands to simulate. Currently, any simulation exceeding 100,000 hands will probably lock-up your computer due to the memory usage. I plan on fixing this so you can simulate about 10 million hands. One caveat is that you cannot simulate with human players.
After the options are set and the players are added, click "Start Game". To begin the simulation, click the "Deal" button. The computer will start processing all of the hands and the status bar will alert you when the simulation is completed.
How to Read the Game Log
I made the game log very concise so it would be easy to read and it wouldn't take up a lot of memory. Here's how to decode it.
HAND #5000 [RNG:4 TRU:4 KO:5] ====================== Luke[$288,$5] - [7,7] Dan[$189,$5] - [6,7] Dealer - [K,?]
Luke: [7,7] -H(Q) [24] -B
Dan: [6,7] -H(4) [17] -S [17]
Dealer: [K,K] -SHOW(K) -S [20]
Dealer [20] Luke(B) -$5 [24] Dan(L) -$5 [17]
The header gives four pieces of information: The hand number, the running count, the true count and the KO count. As I add more counting methods in future versions, these number of parameters in the brackets will increase.
The next bit of information is the player bankrolls, wagers and dealt cards. The bankroll is the first dollar amount, followed by the wager placed at the beginning of the hand. The information in the brackets following the dash are the dealt cards.
The simulation then goes through each player and records their moves. Each line is a move. Here's how to decode the abbreviations:
- -H(Q) [24] : Hit, dealt a queen. The card total is now 24.
- -S [17] : Stands on a total of 17.
- -D(4) [25] : Doubles, dealt a 4. The card total is now 25.
- -P : Splits the hand.
- -B : Hand busts.
- -SHOW(K) : The dealer shows their hole card.
After the playing the hands, the player's bankrolls are updated based on if they busted, won or lost. The amount of money gained/lost is shown followed by the card total.
Analyzing Data
There are several ways to analyze the data, all of which are found under the "Analysis" menu item. You can choose to graph the data, or export the bankroll records and game log to a text file to review player decisions.
Last Update: 8/20/10
| |
|
|