Methodology
Rather than deal random hands, it might be better to loop through every possible starting hand (or total) and play each one out the same number of times.
The timing of this comment is good. I've been meaning to post about the differences in how my software works compared to more traditional methods of generating strategies and computing various probabilities.
As Coliin points out, one could exhaustively go through every hand (or hand total) and perform whatever calculation one is interested in. Many useful computations can be done this way and, as I understand it, most basic strategies are computed in this this way.
A fundamental problem with this is the composition of the deck against which one performs the calcuations. One is generally forced to assume that the hands are dealt from the top of the deck (or shoe), which is convenient, but only useful for analysing situations in which the deck is shuffled after each hand. Playing online if the only situation I am aware of where this happens for real.
We can take a further suggestion from Colin's comment and simulate each enumerated hand an equal number of times. Once again the composition of the deck is an issue. One can not simply deal the same hand over and over again from a simulated deck, because the nature of the hand in question could soon create a bias in the composition of the deck (e.g. you're analysing a hand which is a pair of 10's). One is once again forced to assume that each hand in question has been dealt from the top of the deck. Also, in real life, one is never dealt the same hand over and over again.
Deck composition can be elimited as a factor by assuming infinite decks, which simplifies the calculations but is not in any way a real world model. Exact deck omposition is also an example of information that is not useful to us as humans. What we would like to know is what should we do in a given situation across a variety of possible deck compositions.
Exhaustive approaches can also be computationally vast and sometimes infeasible.
Anyone who knows how random numbers are generated in computer programs knows that it is almost impossible to generate an actually random stream of numbers, cards, dice throws, etc. Cards are not actually random anyway. They are affected by the way the cards are dealt, played, collected and shuffled (e.g. did you know that the player at 1st base gets fewer blackjacks than the other players at tables with 2 or more players?).
So how do I deal with all of this?
What my software tries to do is to answer the question of what is the result of applying strategy X in situation Y averaged out over the various states in which the situation might arise with the information available (and useful) to a human player. The only way (that I know of) to discover that is to simulate exactly what it is that we, as human players, do when we're playing a tournament or grinding it out at the tables. That is to simulate an actual shoe of cards being dealt, acted on, collected and reshuffled in the same manner as in a live casino.
This approach has the property that it automatically accounts for any subtleties introduced into the process by the way the cards are dealt and handled. Each time a particular hand is dealt, it is dealt with the deck in a variety of states which could actually arise as the game is played and never in a state which could not occur.
With a larger number of decks, this often has no bearing on the result. With a smaller number of decks (<= 6) there are often observable differences.
The main disadvantage of this approach is, as we have observed, statistics for rare situations are slow to accumulate. So if you want the exact percentage results for every possible hand, the computattion will take longer than the exhaustive approach.
The main advantage of this approach, is that the big picture emerges quickly. For hand strategy generation, the contribution of the most common situations accumulates quickly and after relatively few iterations, the decision of should I hit/stand/double/split for a particular hand becomes clear. If the decision is close, then more iterations are in order. If you want exact percentages, then even more iterations are in order On the other hand, the contributions of situations which rarely (or never) occur and which contribute little to the bottom line expend correspondlingly fewer cpu cycles, making the overall computation faster.
In our example here, where the question was "What would the win/lose/push percentages be for various hands if I were to play a 'must not lose' strategy with 6 decks in real life without knowing the exact composition of the deck", my method seems appropriate. The overall contribution of a hand which occurs 11 times in 2 billion trials is likely beyond the range of floating point computation accuracy. After only 11 samples, the result of (18.2/81.8/ 0.0) is not all that close to the (20/80/0) expected by BlueLight, however, for the purposes of analysing this teaser, would this difference have been of any value to us? Would we have even considered doubling a hard 4 in a "must not lose" situation or factor in that our opponent might do so in a 17 19(doubled) 17 4 situation? This is another example of information that is not useful to us as humans.
Having said all that, please be assured that when I post a percentage result for a particular hand or situation, I make sure that sufficient trials
for that situation have occurred.
Also having said all that, the number of trials for each hand in my hand result tables would be a useful addition, so that one can assess the accuracy and importance of the result for for each hand. I think I'll do just that!