If you want to take many samples from a fixed, or infrequently
changing, distribution, you can do it in O(1) time per sample, with
O(n) initial setup costs. This is quite clever and goes by the name of
"alias method".
See http://cg.scs.carleton.ca/~luc/rnbookindex.html, page 107-111
For weighted patterns, the row sum method by Rémi is probably hard to
beat. It was discussed here a while ago.
Martin
_______________________________________________
computer-go mailing list
computer-go@computer-go.org
http://www.computer-go.org/mailman/listinfo/computer-go/