slot machine payout calculation

橙三吉。 提交于 2019-12-03 16:40:41

As Phong noted, you need to first determine what the overall, long-term payout of the machine should be. e.g. $0.95 for every $1.

You then look at all your winning combinations, the odds of that combination occurring, and the payout of that combination. Add them all together and it should be equal to your desired long term payout.

The trick then is to balance the combinations so you have a few ones that are easy to hit, and pay low, to keep payouts happening every so often, and a one that is very hard to hit, but pays high, so there's always the chance of a big payout.

It's really all about design and maths, rather than implementation and coding.

Quick example of the maths: If you had a 3 reel machine with 10 slots (call them A-J) on each reel, and you wanted to payout $0.95 for every dollar long term, then you might have:

AAA - odds 0.001 - pays $500 - expected payout - $0.50
A-- - odds 0.100 - pays $3 - expected payout - $0.30
B-- - odds 0.100 - pays $1.50 - expected payout - $0.15

You need to first define:

  • On how much money played, how much do you want to keep, and how much the player can win.
  • On a win, how much do you want the user to win (eg: 5$ to 1000$)

after that then you need to geenrate a random function which will have a correspond to your spec (win loose). and (how much to money to get)

You need to check if the result is ok with the current state of the machine It is still random... so it avoid having too much win/loose. (anybody did see a machine loosing money yet ??? :) )

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!