in reply to Algorithm Help
Wouldn't it be easy to just randomly choose a prefix from a cache ?
Putting the probabilities aside, it's easy to deterministically generate all possible prefixes, and to classify them into weight categories.
With all prefixes separated by weight it's also easy to randomly choose one, given a weight.
Putting the probabilities aside, it's easy to deterministically generate all possible prefixes, and to classify them into weight categories.
With all prefixes separated by weight it's also easy to randomly choose one, given a weight.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Algorithm Help
by dreadpiratepeter (Priest) on Jan 18, 2010 at 18:54 UTC | |
by Anonymous Monk on Jan 18, 2010 at 22:09 UTC |
In Section
Seekers of Perl Wisdom