[DGD] Damage Weapons and Stuff (Math and Code)
Stephen Schmidt
schmidsj at union.edu
Sun Jun 1 21:59:42 CEST 2003
I knew my statistics training would come in handy one day :)
Probably a better solution to this problem is to use the
logistic distribution function. It is virtually identical
to the normal (Gaussian) distribution function, except
that its standard deviation is 1.92 rather than 1.00.
Its main advantage is that it has a closed-form solution
for the density function, so that no lookup is needed,
and the code will run faster.
The logistic distribution function is
Pr(x<K) = 1 / 1+exp(-K)
so that as K goes to negative infinity, probability goes
to 0, and as K goes to positive infinity, probability
goes to 1.
The density function is easily calculated by taking dPr/dK:
f(K) = exp(-K) / (1+exp(-K))^2
The inverse distribution is left as an exercise for the
student.
Steve
_________________________________________________________________
List config page: http://list.imaginary.com/mailman/listinfo/dgd
More information about the DGD
mailing list