
On Thu, 23 Jul 2009, Michael P Mossey wrote:
Hello,
I have an application for random numbers. So far, in my journey with Haskell, I have learned basics and a few things about monads, and I was hoping I could get some guidance how to employ random # gens.
I need to run some simulated experiments to calculate some statistics by a Monte Carlo method.
Can I get a few examples or pointers? I believe I will have to run this in a State monad or the IO monad, will I not?
Have a look at the monte-carlo monad: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/monte-carlo For example usages see http://quantile95.com/2008/12/31/monte-carlo-poker-odds/ and http://randomdeterminism.wordpress.com/2009/01/06/monty-hall-problem-using-m... Aditya