[Home] [Groups] - Message: [Prev in Group] [Next in Group]

nu.kanga.list.mud-dev

29172: RE: [MUD-Dev] [DGN] The psychology of random numbers

[Full Header] [Plain Text]
From: Byron Ellacott <bje@apnic.net>
Newsgroups: nu.kanga.list.mud-dev
Date: Fri, 30 Jan 2004 10:31:59 +1000
References: [1]
Organization: Kanga.Nu
On Wed, 2004-01-28 at 21:18, Daniel.Harman@barclayscapital.com wrote:

> I think Ben Hawes has a valid point in his post where he suggests
> that people expect gaussian distributions, and not the typical
> flat distributions that rnd() should produce. So in the case of
> your puzzle game, perhaps intuitively they expected you to roll
> the interval until the next bonus using a gaussian distribution
> mean 7 with SD of 2 or so. This of course forces you to store
> state describing when the next event will occur, which most
> programmers will naturally avoid prefering to be stateless
> checking against a percentage periodically. With the stateful
> approach you won't get much streakiness and will imho better fit
> player expectations. Of course having a sliding bias does pretty
> much the same thing.

You shouldn't need to store state.  Rolling 2d6 gives a gaussian
distribution, but 1d6 is a "flat" distribution.  Yes, I'm aware that
modulo isn't desirable, but:

  int gaussian = (random() % 6) + (random() % 6);

I sometimes use the combination of two random numbers to keep things
"in the middle" of the distribution more often than not.

--
bje, not speaking for my employer
_______________________________________________
MUD-Dev mailing list
MUD-Dev@kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev