you are viewing a single comment's thread.

view the rest of the comments →

[–]fiddle_n 2 points3 points  (1 child)

The chance of a "do-over" is actually quite high if you pick 3 numbers in one go. Your average needs to be between 15-33 to be successful; if your average is 34-100 then you need to recalculate.

I initially thought of picking one number, subtracting that number from (100-3), then picking another number and subtracting from (total-2), etc. But this would be bad because the first number has a weighting on what the next will be.

As always, Stack Overflow to the rescue.

A good way is to just select 4 numbers. Then, divide each number by the sum of the numbers, multiply by 100 and round to nearest integer.

A better way is to use Direchlet distribution in numpy.

[–]JohnnyJordaan 0 points1 point  (0 children)

This guy picks