I am doing something similar to Weighted choice short and simple however, i am additionally in need of adjusting weights depending on scenarios.
I tried doing some simple arithmetics, i.e weight *= 2
but the cumulative sum has to equal 1 (obviously) and i don't see how I can adjust one weight, and have the other weights adjust too.. There must be some simplistic solution that i am overseeing.
Scenario
mylist = ['a', 'b', 'c', 'd']
myweights = [0.25, 0.25, 0.25, 0.25]
After selecting an item from mylist
and running it through a function, i would like to adjust the weight associated with that item, either up or down, before selecting another item based on adjusted weights and so on.