gpt4 book ai didi

c# - 基于不同因素的随机数生成

转载 作者:塔克拉玛干 更新时间:2023-11-03 04:34:33 24 4
gpt4 key购买 nike

<分区>

我想写一个随机数生成算法。但我不希望数字完全随机。我希望它们取决于许多不同的因素。对于因子,我指的是值介于 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 或 wicket 之间的随机数。

我正在编写此算法来模拟板球比赛。

我可以采用什么方法来编写这样的算法?

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com