Timeline Background Mechanics Bookstore

Mass event resolution

Often, for game purposes, a number of events (attacks, etc.) with equal probability of success can be resolved consecutively. Furthermore, details about the success can be deferred. If suitable electronic support is available (spreadsheets or scientific calculator with the combinatorial function C(n,k), where k,n are non-negative integers such that 0<k<n), the following procedure for resolving how many successes are in a mass event is to be used: Now, we are going to use the Binomial Theorem:
(p+q)n = Σk=0..n C(n,k)pkqn-k
Each term has a significance:
P(exactly k events of probability p)=C(n,k)pkqn-k
Observe that there is a minimal m such that a pseudorandomly generated (decimal) number R from the uniform distribution over the interval [0,1] (a number between 0 and 1) satisfies
R < Σk=0..m C(n,k)pkqn-k
This m is the number of events with probability p in the mass event. n-m is the number of events with probability q in the mass event. Detail resolution depends on what the mass event is.

The attentive reader will notice that this does not necessarily precisely compute boundaries near 1...which does not seem to be a significant problem, in practice. More problematic is that the direct computation of m (by adding terms until it is found) is tedious for large n as p approaches 1/2 from above. site map
Opinions, comments, criticism, etc.? Let me know about it.

Return to the Iskandria page, or the main page.