Algorithm of a Gambling Machine

Hi all , my english isnt very good please be understanding.

So my problem is that I have to make a winning algorithm for a slot machine (it's a real machine). I have to make 2 algorithm, one with 1 chance out of 5 won and another with 1 chance out of 10 of winning. To win the 3 rolls of my machine must be in the position BAR BAR BAR

Thank you for your help

Do you want to "load" the reels (influence where the reels end up)? Almost everywhere in the world, messing with reels is illegal. Machines need to be designed to match the 'return to the player' rate regulations of a given country.

The way you make money with slot machines is statistical gain. for example, a 3-reel game with 10 symbols on each reel, the number of all possibilities is 103=1000 and you know the 1000 combinations possible, so you can decide the payout for each combination. This is totally set by rules.

if you spin your machine 1.000.000 times and have a true accurate random number generator (the law states that it must be certified by independent testing labs to be used in real money games), then every combination is hit 1000 times (give or take - when spun enough, each combination has approximately similar chances and thus the distribution should be Uniform)

So over 1.000.000 spins, you can calculate how much money was put in (1.000.000 times the spin cost), you know you will get 1000 times every possible combination and for each combination you know how much you pay so you sum that and times it by 1000 you have the total payout. The difference between cash in and cash out is your gross profit. if you have done the payout distribution right for each possible combination, then you can decide a return of 90% or 50% or whatever.


if you do want to theoretically explore messing around with the reels, then assuming you have 10 symbols on each reel and 3 reels and you want 1 chance out of 5 to win, then what you do is you draw a random number between 1 and 5. if it's (for example, just pick one of them and stick to it) 1 then you drive the reels to display the BAR BAR BAR. if not you generate 3 random numbers between 1 and 10 (each representing a symbol). if it's BAR BAR BAR then you change one of them by either redrawing a random number until it's not BAR or just do +1 or -1 on one of the reel which will generate high frustration/excitement :slight_smile: as you'll get 2 bars and almost the 3rd) and this is what you display.

Similar process with 1 chance out of 10.


please stay legit. The world does not need more crooks.

That is exactly how it works, by the way after learning this algorithm it is much easier to in slots.

I worked as a designer in the time when slot machines, often called 'fruit machines' in the UK, were transitioning from the mechanical systems, slotted biscuit wheels etc, to the 'new' microcontrollers such a INS8060, INS8070 etc.

There were 'algorithms' of course, but mostly to do with giving the owner of the machine the percentage payout they wanted, i.e. they were fixed, not really random at all.

To get you started, the odds of this being true is 1-in-5:

if(random(5) == 0                                   // random(5) returns a random number between 0 and 4

Make sure to seed the random number generator. And, you should know it's not truly-random but with a good seed it's unpredictable enough for simple gambling.

Since the 3 reels are probably independent you'll have to study a little probability theory and the associated math.

waldenverney:
I'm not particularly interested in this topic but one day a friend of mine sent me a great algorithm. If you are still searching, I can send it to you in PM

I'd be surprised..

that ask was from Jan 30, 2017 and @emrald never even answered in the thread and his last post on the forum was Jan 18, 2017...

I have been looking for good algorithms to get a position for a long time. "bar bar bar" on the screen, but many of the ones I saw on the Internet didn't work properly. My friend at that time was also interested in this business and recommended me a great online casino where I could find a wide variety of games and easy withdrawal of funds, so in https://casinoluck.ca/ it is very easy to identify algorithms that help you win more often, thus not losing a lot of money. If you are still interested in these tips, you can find out more about it on this site