The following module was proposed for inclusion in the Module List:
modid: Games::Dice::Loaded
DSLIP: RdpOp
description: Roll loaded dice; sample discrete random var
userid: MGOULD (Miles Gould)
chapterid: 23 (Miscellaneous_Modules)
communities:
Twitter
similar:
Games::Dice Games::Dice::Advanced Games::Dice::Probability random
rationale:
All of the existing dice-rolling modules handle only fair dice:
Games::Dice::Advanced claims to handle loaded dice, but it does so
by punting all the work to the user.
There are lots of inefficient algorithms for simulating loaded
dice, and a particularly beautiful efficient one, which I couldn't
find on CPAN. So I've implemented the beautiful efficient one. See
http://www.keithschwarz.com/darts-dice-coins/ for a discussion of
some possible algorithms and their asymptotic behaviour.
Note that this module doesn't have to be used for simulating dice
rolls: it can be used to sample *any* discrete probability
distribution, including those which don't correspond to any die
which might be physically constructed. I put the module in the
Games::Dice namespace because I couldn't think of a better place to
put it.
enteredby: MGOULD (Miles Gould)
enteredon: Wed Jan 11 19:30:40 2012 GMT
The resulting entry would be:
Games::Dice::
::Loaded RdpOp Roll loaded dice; sample discrete random var MGOULD
Thanks for registering,
--
The PAUSE
PS: The following links are only valid for module list maintainers:
Registration form with editing capabilities:
https://pause.perl.org/pause/authenquery?ACTION=add_mod&USERID=d9600000_55669cd3d4961218&SUBMIT_pause99_add_mod_preview=1
Immediate (one click) registration:
https://pause.perl.org/pause/authenquery?ACTION=add_mod&USERID=d9600000_55669cd3d4961218&SUBMIT_pause99_add_mod_insertit=1
Peek at the current permissions:
https://pause.perl.org/pause/authenquery?pause99_peek_perms_by=me&pause99_peek_perms_query=Games%3A%3ADice%3A%3ALoaded