View Single Post
  #3  
Old 03-16-2007, 12:00 PM
A.Nironen A.Nironen is offline
Senior Member
 
Join Date: Oct 2006
Posts: 118
Default Re: the random number problem

[ QUOTE ]
The problem is that if you select cards for a specific hand first, and remove those cards from the deck, then you're not generating scenarios uniformly over all possible scenarios. For monte carlo to work, the scanrios generated must be drawn uniformly from all possible scenarios.

Solving this problem efficiently is non-trivial.


[/ QUOTE ]

The problem is solved long ago. Google for Fisher-Yates shuffle algorithm. (I invented it indepedently [img]/images/graemlins/smile.gif[/img] )
Reply With Quote