Random weighted choice
Tue 30 August 2011
Many times I need to choose randomly from a list of 'neighbors' according to some weight assigned to them, and I'd like to share my technique. My language of choice is Python, but this technique should work in any language that has some sort of list and a random number …continue