Helpful Information
 
 
Category: Game Development
Fruit machine simulation - question

I was thinking about how a fruit machine simulation would work and one question that has always puzzled me is how they adjust the odds for winning (or perhaps I should say losing). I.e. the person that owns or is renting the fruit machine can adjust the odds to a particular percentage payout. E.g. 70% payout would equate to the punter gets back 70p (on average) out of each pound that is inserted. It's a well know factoid in the UK that certain fruit machines, e.g. where there is a high volume of passing trade, like a fast food place, have very low payouts - which is to say that the payout percentage has been set low.

One way that I could simulate this would be to set up three arrays that would represent the three (just three for now) reels and populate the arrays, e.g. array1 = { "melon", "pear", "apple", etc }, and likewise for array2 and array3, then have a payoff array. We pick an index at random in each of the three arrays (reels) and then compare this value to the payoff array, so we might get "pear", "pear", "pear" and check in the payoff array where three pears pays 2.00. In this case the frequency of the fruit symbols and their combinations will determine the average payout over time.

Rather than just apply a percentage factor to the winning amount, imagine that there is a payout list on the front of the machine that says "Three pears pays 2.00", "Three apples pays 3.00", so we can't just say 2.00 / 70%. One way that I could change the payout percentage would be to have say 50 fruit symbols in each reel array and change the frequencies of the different fruit items. A bit of tweaking and this should do.

But bearing in mind that reels in a real fruit machine are fixed, how do they change the payout percentage? If I know this then perhaps I could think how this would work in an analogous way in a simulation.

Anyone have any ideas how this works in RL?

For a moment I was confused by this, but then I remembered that 'fruit machine' is British slang for 'slot machine'. Gotcha.

Yeah, it's certainly possible to simulate slots, and in fact (in US casinos at least) mechanical slot machines have largely been replaced with 'video slots', which are cheaper to buy and maintain, can be reconfigured to different styles, and are more easily set to give the desired odds (vhttp://www.nytimes.com/2006/04/12/technology/12casino.html?ei=5089&en=9e945a28ba5016c6&ex=1302494400&partner=rssyahoo&emc=rss&pagewanted=all) (desired by the casino (http://www.americancasinoguide.com/Tips/Slots-Honest.shtml), that is. The players usually want rather better odds than those, but tampering with game odds in most places carries penalties ranging from a stiff fine, to nice long swim under the boardwalk in a cement overcoat, depending on where you are and who you've crossed.)

As for how you would do it, there are several possible approaches that I can think of. If you want to simulate how mechanical slots work reasonably closely, what you'll want is to have 'reels' with several entries for the lower-paying items, and only a few or even just one for the higher-paying ones. For further realism, you can keep track of the position of the reels after each draw, and then use the random value as a modular offset from the current position; though to do that well, you would have to interpolate the least common values between the most common more or less evenly. to get the odds of a payout would require a bit of calculating, as you would have to get the combinatorial odds of the combination coming up over the range of all possible permutations; you'll have to pardon me if I can't recall the exact way you would do this offhand, but it isn't too difficult of memory serves. This article (http://www.saliu.com/keywords/gambling.htm) covers the basic methods though it focuses more on roulette and poker than on slots), while this one (http://www.saliu.com/theory-of-probability.html) gives a bit more of the theoretical basis of probability calculations.

A simpler method, closer to how (AFAIK) some modern video slots work, would be to have a range of values for each combination, with the most common having the largest range and the least common the smallest. Needless to say, you can give more or less arbitrary odds of a combination coming up this way. To calculate the payout odds, you would simply take the ratio of the number of values assigned to a combination over the total range of possible values. So, if you have 1728 combinations (equivalent to three reels with 12 possible outcomes per reel), you might assign three triple bars (the top payout in most US machines) to a value of 0 (zero), three double bars to an outcome of 1, 2 or 3, two triple bars and a seven to 4, 5, 6, 7, and so on, up to 1727, with most of the range taken up with garbage combinations such as 'orange bar cherry'; the odds for the first would be one in 1728, the second 3:1728, the third 4:1728, etc.

You might want to check out the Wikipedia entries on slot machines (http://en.wikipedia.org/wiki/Slot_machine), odds (http://en.wikipedia.org/wiki/Odds), probability (http://en.wikipedia.org/wiki/Probability) and similar topics for some additional information on the terminology, odds calculations and so on. The Institute for the Study of Gambling and Commercial Gaming (http://www.unr.edu/gaming/index.asp) may have some articles which would be of interest as well, I suppose.

Hi. Well that certainly is a lot to think about so I'll consider it over the next few hours and see what I can come up with. Thanks for the references as well.

b.










privacy (GDPR)