Dinosaur
05-13-02, 09:07 PM
Does anybody have experience with simulating Casino craps and/or dealing cards?
Does anybody have a pseudo random number generator and/or an algorithm suitable for these purposes?
I recently developed a Visual Basic application which simulates dealing from a 52 card deck and Casino Craps (Dice).
I used the standard pseudo random number generator provided by VB.
The results were interesting.
The Dice throwing simulation got the following results after about 10 million pass line bets (about 34 million dice throws). Each die simulation indicated the correct probabilities to about 5 digits of precision. True probability for each digit is 1/6 (.1666666666 . . .). Simulation indicated .16666xx for most numbers.
The simulated totals were precise to about 5-6 digits.
The probabilities of making various points were precise to slightly less than 3 digits.
The overall probability of winning a pass line bet was wrong in the third digit.
True probability: .4929292929 . . . Simulated probability: .4937xxxxThe above results seemed to have stabilized after 3-5 million pass line bets, not getting more precise as the number of dice throws increased.
The above suggests that the pseudo random number generator did a good, but not excellent job of simulating dice throw probabilities. If it was excellent, the precision would continue to improve as the number of throws increased. It did a poor job of simulating the overall probability of wining a pass line bet.
BTW: I wrote a similar application many years ago using a different version of the Basic language. That simulation indicated that the player should expect to beat the casino, due to bad simulation of the probabilities of making a point. For that simulation, the other simulated probabilities were fairly good.
Making a point requires throwing a particular total before throwing a seven. Although the simulated frequencies for the various totals are fairly precise, the simulated probabilities of making a point are poor. It is like a trick question about train schedules for which the less likely event is very likely to occur first, due to unexpected clustering.
Suppose there are ten trains each hour from Philadelphia to New York and only one train per hour from Philadelphia to Washington. Now suppose that the New York trains leave every minute starting on the hour, while the single Washington train leaves at one minute before each hour. If you arrive at a random time, the next train to leave is far more likely to be a Washington train than a New York train.
Probability, random number generation, and simulations are fraught with subtleties, which are counter intuitive.
The card dealing simulation was only precise to about 3 digits. This application simulated dealing 5-card poker hands & 13 card bridge hands. It also simulated drawing a single card from a 52 card deck. The Visual Basic pseudo random number generator does not do a good job of simulating the dealing of cards.
Does anybody have a pseudo random number generator and/or an algorithm suitable for these purposes?
I recently developed a Visual Basic application which simulates dealing from a 52 card deck and Casino Craps (Dice).
I used the standard pseudo random number generator provided by VB.
The results were interesting.
The Dice throwing simulation got the following results after about 10 million pass line bets (about 34 million dice throws). Each die simulation indicated the correct probabilities to about 5 digits of precision. True probability for each digit is 1/6 (.1666666666 . . .). Simulation indicated .16666xx for most numbers.
The simulated totals were precise to about 5-6 digits.
The probabilities of making various points were precise to slightly less than 3 digits.
The overall probability of winning a pass line bet was wrong in the third digit.
True probability: .4929292929 . . . Simulated probability: .4937xxxxThe above results seemed to have stabilized after 3-5 million pass line bets, not getting more precise as the number of dice throws increased.
The above suggests that the pseudo random number generator did a good, but not excellent job of simulating dice throw probabilities. If it was excellent, the precision would continue to improve as the number of throws increased. It did a poor job of simulating the overall probability of wining a pass line bet.
BTW: I wrote a similar application many years ago using a different version of the Basic language. That simulation indicated that the player should expect to beat the casino, due to bad simulation of the probabilities of making a point. For that simulation, the other simulated probabilities were fairly good.
Making a point requires throwing a particular total before throwing a seven. Although the simulated frequencies for the various totals are fairly precise, the simulated probabilities of making a point are poor. It is like a trick question about train schedules for which the less likely event is very likely to occur first, due to unexpected clustering.
Suppose there are ten trains each hour from Philadelphia to New York and only one train per hour from Philadelphia to Washington. Now suppose that the New York trains leave every minute starting on the hour, while the single Washington train leaves at one minute before each hour. If you arrive at a random time, the next train to leave is far more likely to be a Washington train than a New York train.
Probability, random number generation, and simulations are fraught with subtleties, which are counter intuitive.
The card dealing simulation was only precise to about 3 digits. This application simulated dealing 5-card poker hands & 13 card bridge hands. It also simulated drawing a single card from a 52 card deck. The Visual Basic pseudo random number generator does not do a good job of simulating the dealing of cards.