Stochastic lambda calculus and monads of probability distributions
POPL '02 Proceedings of the 29th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
A probabilistic language based upon sampling functions
Proceedings of the 32nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
A probabilistic language based on sampling functions
ACM Transactions on Programming Languages and Systems (TOPLAS)
Troll, a language for specifying dice-rolls
Proceedings of the 2009 ACM symposium on Applied Computing
Hi-index | 0.00 |
Role-playing games (RPG's) use a variety of methods for rolling dice to add randomness to the game. In the simplest form, a small number of identical dice are rolled and added, but more advanced forms involve cumulative rerolling of 6's, doubling the value of doubles, removing the lowest or highest result or counting the number of dice that are below a threshold, and many other weird and wonderful modifications.While die-roll programs and net-based die-roll servers exist, they can usually only handle the simplest form of die-rolls. This paper describes Roll, a simple functional language for defining how dice are rolled. Such definitions are then used to emulate die-rolls or make probability calculations.We describe two different semantics for Roll: One that corresponds to randomly rolling the dice and one for calculating the probability distribution. We discuss implementation issues regarding the latter.