## Simulation

Solving a problem by combinatorial analysis is always better than employing a simulation methodology to arrive at a solution if combinatorial analysis is reasonably possible. Combinatorial analysis always arrives at an exact answer for the parameters used since it accounts for all possibilities. Simulation arrives at an estimate and needs to use a method to account for enough of the possibilities to be relevant. However, in cases where employing combinatorial analysis is so difficult as to be intractable then simulation is the only viable alternative.

## Blackjack and combinatorial analysis

It's possible to compute expected values in blackjack for any shoe composition and common rules. The main problem is creating a program that executes quickly enough to be reasonably useful. Composition Dependent Combinatorial Analyzer (cdca) is the online version of such a program. However, what if we want an overall evaluation of a blackjack game dealt to a shuffle point and repeated over and over again? Our combinatorial analyzer can compute exact values for any given single composition but how can it be employed to display expected values for repetition? The answer is to simulate dealing of a blackjack game and use the combinatorial analyzer to compute exact expected values for each shoe composition as it arises in the simulation. Simulating dealing is the only viable solution because attempting to enumerate all of the intracacies of dealing a blackjack game to account for all possibe drawing sequences and eliminating sequences that aren't possible is just not feasible.

### Simulation / Combinatorial Analysis Project

I have resurrected a project started a couple of years ago, fixed a few errors, and added a few things to it. Basically it consists of a Windows program that simulates dealing a heads up blackjack game, player versus dealer. Player plays using total dependent basic strategy. Combinatorial analysis is used to compute exact pre-round expected values (using TD basic strategy) and pre-round shoe composition along with the computed EV are output to a text file for each round of the sim. The data file is then imported to an Excel spreadsheet, which is used for display purposes. The project can be obtained by downloading **bsCalcSim.zip** from the Software page. The particular program I include uses total dependent basic strategy but the spreadsheet could also be used for a more optimal strategy such as could be output to a data file if a composition dependent combinatorial analyzer such as cdca were used. A Windows operating system with Excel installed is required. I used Excel 2000.