我想写一个随机数生成算法。但我不希望这些数字是完全随机的。我希望它们依赖于许多不同的因素。我所说的因子是指值在 0 到 1 之间的变量。
所以因素可能是 -
Bounce // 0.56 // Should afffect the outcome by 10% // inversely proportional to outcome
Spin // 0.71 // Should afffect the outcome by 20% // inversely proportional to outcome
Light // 0.99 // Should afffect the outcome by 5% // directly proportional to outcome
Crowd Support // 1.00 // Should afffect the outcome by 5% // directly proportional to outcome
Pressure // 0.89 // Should afffect the outcome by 10% // inversely proportional to outcome
Experience // 0.76 // Should afffect the outcome by 10% // directly proportional to outcome
Skill // 0.56 // Should afffect the outcome by 40% // directly proportional to outcome
现在基于这些因素,我想生成一个 0-6 之间的随机数或一个检票口。
我正在编写这个算法来模拟板球比赛。
我可以采取什么方法来编写这样的算法?