游戏算法逻辑

dan*_*iel 9 algorithm logic gambling

这是一款赛狗游戏,有视频和玩家选择获胜者.根据他们的赌注,算法选择适当的视频以保持每个销售点的返回百分比,达到其指定的金额.

像这样的东西:

% Returning Specific Return Configuration, range: 50%~90%:
POS1: 65%
POS2: 78%
POS3: 50%
...
...
POSN: XX%
Run Code Online (Sandbox Code Playgroud)

每个POS都有不同的收入,应根据其配置返回:

Ex: [pos]    [cashes] [should return]   [returns]  [step]
    -------------------------------------------------------
     POS1       100         65             60        44
     POS2       100         78             50        45
     POS3       500        250            150        45
Run Code Online (Sandbox Code Playgroud)

基于某些组合发生的回报较低,因此剩余被视为债务.这是因为每个商店都在销售如下数字:

POS1:   [Cashes]    ["Winners" Number]  [Possible Return]
          50           12                 150
          50           13                  60
Run Code Online (Sandbox Code Playgroud)

所以该算法试图在有限的可能性中找到最接近的组合,返回该值+累计月债,基于每个步骤,如:

 sum([should return]) of step 45 
   + lowest not returned part of the month ([should return]-[returns]) 
                              of the stores present at that step (45) 
Run Code Online (Sandbox Code Playgroud)

在相对较长的时期(约30天,即该过程的持续时间段)结束时,具体的返回是:

POS1: 64.4%
POS2: 72.9%
POS3: 49.2%
...
Run Code Online (Sandbox Code Playgroud)

它现在工作了8个月,并没有明显的问题,但如果我已经足够清楚它是正确的逻辑吗?

每一步持续5分钟

*编辑*

碰巧使用一些额外的奖金超过返回百分比的负差异,所以"客户债务",取决于价值导致每个步骤的回报阻止,直到该POS返回其百分比.

因此,我将"当月最低未返回部分([应该返回] - [返回])"更改为该步骤中随机挑选的玩家.这有帮助,但还不够,因为当负面的玩家pos在许多连续的步骤中独自时......实际上它并没有给出任何回报.这不是一件好事,所以我在这个负债中添加了一些实际使用的限制,随机因素的范围是

sum([should return]) of step 45 
+ ((case when the debt is negative under some relative "considerable" limit) 
    random[range(-0.01, 0.2)] * not returned part of the month ([should return]-[returns]) 
else the ([should return]-[returns]))
Run Code Online (Sandbox Code Playgroud)

实际上范围(-0.01,0.2)意味着pos可以在某些相对限制下返回,事实上,即使单独玩,商店也会重新开始返回.