slot machine payout calculation

时光怂恿深爱的人放手 提交于 2019-12-05 01:05:45

问题


I want to create a 5 reels slot machine calculation system and I'm not sure what approach to take.

I understand that there is a lot of math within it, especially if I want the machine to be enjoyable to a player.

Are there any tips/links for that? Was looking for info at the web but they discuss on it from the player's perspective rather than the developer's perspective, in all cases I've found.

Just to make it clear; I'm not after the user interface stuff, but only after the internal machine's payout calculation, which will make sure the house gets a revenue while maintaining good playability.

Programming language would be C++, yet I'm fine with others.


回答1:


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




回答2:


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 ??? :) )



来源:https://stackoverflow.com/questions/3986249/slot-machine-payout-calculation

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