NOTE: This module is deprecated and will no longer be maintained. I do not recommend using this module as the code is very amateur, and not very efficient.
A python module for doing biased random based on the random module.
Add to python script:
>>> import biasedrandom
>>> br = biasedrandom.biasedrandom()
brandrangenum gives you a random between start and end but you can add biasednumbers which has a biaschance of happening instead of just a random number between start and end.
- Your
biasednumbershave to be betweenstartandend. - Your
biaschancehas to be less than 100 and more than or equal to 0.
dbrandrangemol gives you a random number between start and end but you can have it biased to a certain range biasmorethan and biaslessthan which has a biaschance of happening instead of just a random number between start and end.
- Your
biasmorethanhas to be more thanstartand less thanendand less thanbiaslessthan - Your
biaslessthanhas to be more thanstartand less thanendand more thanbiasmorethan - Your
biaschancehas to be less than 100 and more than or equal to 0.
brandintnum is basically brandrangenum but with the stop + 1.
- Your
biasednumbershave to be betweenstartandend. - Your
biaschancehas to be less than 100 and more than or equal to 0.
brandintmol is basically dbrandrangemol but with the stop + 1.
- Your
biasednumbershave to be betweenstartandend. - Your
biaschancehas to be less than 100 and more than or equal to 0.
bchoice gives you a random item from a list (choices) but you can make it biased to biasedchoices, which has a biaschance of happening instead of just a random item from choices.
- All your
biasedchoiceshave to be in yourchoices. - Your
biaschancehas to be less than 100 and more than or equal to 0.
bsample gives you a random sample from your sequence but it has a biaschance of being for your biasedchoices
- All your
biasedchoiceshave to be in yoursequence. - Your
biaschancehas to be less than 100 and more than or equal to 0. sizecan't be bigger that the length of thebiasedchoices.
brandom gives you a random floating point number between 0 and 1 but it has a biaschance of being one of the numbers in your biasednumbers
- All your
biasednumbershave to be between 0 and 1. - Your
biaschancehas to be less than 100 and more than or equal to 0.
buniform gives you a randon floating point number between, and included start and stop but it has a biaschance of being one of the numbers in your biasednumbers
- All your
biasednumbershave to be betweenstartandstop. - Your
biaschancehas to be less than 100 and more than or equal to 0.