[Tutor] Weighted Random & probability, was (No Subject)

kevin parks kp87@lycos.com
Sat, 23 Feb 2002 18:19:22 +0900


First, Sorry about the lack of subject. I was so anxious to send my code and question that i forgot to edit the subject field,

Paul,

Thanks for taking the time to answer my query on weighted randomness. I can wait to get to my computer and try it out. I've lost my DSL connection (i am in the middle of moving) so i am reading this from an internet cafe. I saw how extensive your replay was and just wanted to soot you a note and let you know that i appreciate your taking the time to answer.

Since there is no interpreter here I can't yet try out your code just yet, but it really looks like you've added some nice bells and whistles to it. It may take me a little while to understand exactly the behavior of pick(). I suppose the ideal behavior would be that the weights would add up to 1, or if they didn't the would be scaled to that somehow, but maybe it should complain first though, like '''hey fool, your probabilities don't add up to 1, we'll have to scale them'''. This way the thing still runs if someone mistakenly thinks that the values should add up to 100 or if they just mess up.

Anyway I am very excited about this approach and i see that it will allow for much more than a simple function as now methods can be added for further manipulation.

Thanks very much I am really anxious to examine this code, perhaps i'll print it out any type it in by hand.


Thank you thank you thank you...

kevin parks
seoul, korea

kp87@lycos.com