From: Aredridel Date: 2003-04-19T02:41:32+09:00 Subject: Re: Biased weighted random? > Example: > > Given a,5 b,4 c,2 > > I'd prefer the sequence > > a c a b a b c b a b a > > to the sequence > > a a c b a b b a a b c > > Of course, it's impossible to perfect this... > if your weights are sufficiently skewed, there > will always be some doubled items (or so my > gut tells me). Track the last result, and lower the probablility of that particular one -- helps eliminate the doubles. Anything truly random with no state will certainly give dups, but there's nothing against keeping a state hash, in theory, that tells what should come next to "seem" random, or track the stats and re-weight the remainder accodringly.