I am from Sydney, Australia and have recently decided to pick up Delphi (Object Pascal) programming for windows again to take a shot at programming a PC version of an Aristocrat Pokie Machine by the name of "Where's... The Gold", a favorite of mine and many friends and family members here in Australia.
The images and sounds will be original even if not very good to begin with (graphics and sound are not my thing haha!).
So scouring good old Google for the past few days, I have found little information until I hit Wizard Of Odds and the Atkins Diet game, which is quite similar (WTG has 9 symbols and no sub, Atkens 11 symbols with a sub), WTG also has scatter symbol but feature is quite different (something that might be challenging later in development).
The major thing is, I have been following the PDF document available with this game to get an idea on the reel configuration (I have no idea how many symbols per reel WTG actually uses), where for the symbol reel table I substituted 2 of the Atkins Diet symbols that have the same payout for 2 different symbols for a double up of Jack and Queen symbols.
I am unsure of how well this will work in practice, and what the return will be, I do not know or understand the math of how to work these things out.
Could someone possibly explain?
The PDF in question is
The figures I mean are how the return was worked out based on the reel config etc.
Im actually stuck with the math figuring out the combinations and
pay back percentages etc, I spent several hours researching permutations
but can't seem to find something to produce the same results that you
have in the pdf (using the table in the pdf not my modified one)
I did manage to get 1 percentage for 4 in a row of Atkins symbol just
before I gave it up for the night but the calculation involved 5 reels, which
seems strange as 4 in a row can only happen left to right, first 4 reels for a
practical figure anyway?
What the wiz is saying he did is use a program that loops through every possible combination and tabulates the frequencies. The first tieration would check the first spot on each reel:
1-1-1-1-1
then
1-1-1-1-2
1-1-1-1-3
1-1-1-1-4
....
32-32-32-32-32.
I thought there might of been some simple statistical math to work
out return (e.g 97%) etc.
Luckily my main game will have no wild symbols, the feature however is
riddled with them! Which is going to add more fun to payout line checking.
Also playing the particular machine yesterday after work I noticed some
odd line combinations, e.g two in a row bottom, then one at the very top
on center reel which pay, but even if two of the same symbol line up the
top with the middle one they are ignored. Seems a strange way to consider
a valid line and then negate anything beyond it even if lined up perfectly.
Quote: GrimRFair enough, yeah I could program something for it.
I thought there might of been some simple statistical math to work
out return (e.g 97%) etc.
There's nothing simple about it; the question of whether a wild actually counts in a pay has to do with the context of the rest of the symbols around it. You can do it in a spreadsheet, but it's a very error-prone calculation.
What about the return percentage, is there a reasonable way to do it, or does this require the combination and/or pay probability values to calculate?
When I started work on my Poker For Roulette side bet, I was trying to use Excel to do my probability calculations. In my first version, I was trying to calculate things such as various hands with or without flush possibilities, etc. My head started to hurt, and I was never sure if I had it right.
When I added wilds to the mix, my head exploded. I threw up my hands and instead created a program to cycle thru all 79million combinations of 5 Roulette spins, to evaluate them individually.
This is identical to what is being suggested for this slot machine question.
Thanks to the Wizard and MathExtremist for making me feel better about my "failure" to get the calculations right.
Because my Poker For Roulette idea uses a progressive jackpot, the only way I could accurately project the return / house edge, was to run several 500million spin simulations, then take those results and feed them into Excel, tweaking the paytable to get the bottom line I wanted.
Basically, my simulation produced two output files. One contains the total number of hits for each winning combination. Simply multiply by the paytable to find my result.
The other is a log of each partial and full progressive winner. It contains the spin number and the type of winner. The spin number is needed to calculate the meter increment before the progressive payment is made. If the progressive was a full jackpot, I reseed it. If it was a partial, but causes the jackpot bank to fall below the reseed value, I top it off. Thru an Excel worksheet that's some 50,000 lines long, I track each of these events, and add them to the non-progressive totals to come up with my progressive analysis.
You probably need to do something similar.
Quote: DJTeddyBearReturn percentage?
Because my Poker For Roulette idea uses a progressive jackpot, the only way I could accurately project the return / house edge, was to run several 500million spin simulations, then take those results and feed them into Excel, tweaking the paytable to get the bottom line I wanted.
Basically, my simulation produced two output files. One contains the total number of hits for each winning combination. Simply multiply by the paytable to find my result.
The other is a log of each partial and full progressive winner. It contains the spin number and the type of winner. The spin number is needed to calculate the meter increment before the progressive payment is made. If the progressive was a full jackpot, I reseed it. If it was a partial, but causes the jackpot bank to fall below the reseed value, I top it off. Thru an Excel worksheet that's some 50,000 lines long, I track each of these events, and add them to the non-progressive totals to come up with my progressive analysis.
You probably need to do something similar.
No, for a progressive jackpot you only need to do this:
1) Calculate the RTP on the base game,
2) Determine the % of coin in you accrue to the meter
3) Add (1) and (2).
You can determine the average time to hit the progressive, and therefore the average jackpot size, based on the probability of that award. But as long as your accrual rate is constant (which, from your description, it may not be?), you don't need any fancy math. Just base game % plus coin-in %.
Accrual rate? I assume you mean the portion of the bet that goes towards the jackpot.
I wanted to estimate the maximum jackpot size. I keep getting the feeling that the casinos don't mind paying winners - as long as the casino is winning too. But what they do mind is paying large sums at one time, regardless of how much they pocketed in the meantime.
For that, I needed the jackpot size.
Additionally, because initial simulations revealed that the partial jackpots can cause the jackpot bank to fall significantly below the re-seed value, I had to add a top-off option. I doubt that can easily be calculated.
So, even if all I wanted was an estimate of the House Edge, I think my long analysis is required.
On the other hand, if the casino uses a smaller increment until the seed money has been replenished, and a higher increment afterwards, then the seed doesn't affect the edge, so simple math will work, I think.
Bottom line: Even if simple math would work, I kinda like doing it the long way. Interesting things became apparent when I did that - like the Top-Off requirement.
So far I have a basic screen, symbols, nice little reel effect with sounds and I have already started the lengthy and fun conditional branching for payouts of the main game (not started the feature yet).
But based on what you said, I could quite easily run background (non visual) simulations millions of times and come up with some figures that way, quick and dirty :P.
miplet pointed me to this thread, because i had the same questions about the math behind the Atkin's slot like the thread starter.
I have experience with VB.net and programmed 5 nested for-loops.
First i checked if the program calculated correctly the 32^5 combinations (it did).
Next consideration... how do i tell the program what combinations he should count?
If i see how many combinations in the PDF of Atkins slot are listed... my 1st thought was... should i code a select case which has all lets say 55.000 cases from the symbols included?
Has someone a hint or idea for me, how i could teach the program to recognize the combinations?
So that the program knows: Steak-Steak-Wild-Steak = 4 in-a-row with steaks // Steak-Steak-Cake-Steak is not legal // Wild-Wild-Wild-Steak = 4 in-a-row and so on...
Any idea for me? I really have no clue how to do it!
Thanks for any help, best regards
Frank
I use a procedure, which makes a call to a function (for the sake of simplifying the procedure I created a function to handle some of the checking).
The loop will check every pay combination from top to bottom (best paying to worst) , it sends the symbol type of the particular
combination to a function (e.g. R1-C1, R1-C2, R1-C3, R1-C4, R1-C5 which would be the top line) and my function will then elaborate and loop check all symbols including feature wild symbols to find a left to right 3-5 in a row combination.
Then it steps to the next combination etc.....
It executes pretty quickly, the win/loss is calculated long before the reels stop.
Well it's something like this:
// I have 9 symbols 0-8, let's check them all.
For i := 0 to 8 Do
Begin
CalcPayLine(R1_C1, R1_C2, R1_C3, R1_C4, R1_C5, i);
//...... done 25 times for all 25 combinations obviously the R-C arrangement changes for each one.
End;
// The CalcPayLine function, The Seed is i from above ^.
// An insert from my own:
case Seed of
0:
begin // Handle the scatter.
if (gold_bonanza.Disp[1] = 0) OR (gold_bonanza.Disp[2] = 0) OR (gold_bonanza.Disp[3] = 0) then Inc(Symbol, 1);
if (gold_bonanza.Disp[4] = 0) OR (gold_bonanza.Disp[5] = 0) OR (gold_bonanza.Disp[6] = 0) then Inc(Symbol, 1);
if (gold_bonanza.Disp[7] = 0) OR (gold_bonanza.Disp[8] = 0) OR (gold_bonanza.Disp[9] = 0) then Inc(Symbol, 1);
if (gold_bonanza.Disp[10] = 0) OR (gold_bonanza.Disp[11] = 0) OR (gold_bonanza.Disp[12] = 0) then
begin
if (Symbol >= 1) then Inc(Symbol, 1);
end;
if (gold_bonanza.Disp[13] = 0) OR (gold_bonanza.Disp[14] = 0) OR (gold_bonanza.Disp[15] = 0) then
begin
if (Symbol >= 2) then Inc(Symbol, 1);
end;
end
else
begin // All but scatter, also checking wild/substitutes.
if (S1 = Seed) OR (gold_bonanza.Sym[S1].Sub) then Inc(Symbol, 1);
if (S2 = Seed) AND (Symbol >= 1) OR (gold_bonanza.Sym[S2].Sub) AND (Symbol >= 1) then Inc(Symbol, 1);
if (S3 = Seed) AND (Symbol >= 2) OR (gold_bonanza.Sym[S3].Sub) AND (Symbol >= 2) then Inc(Symbol, 1);
if (S4 = Seed) AND (Symbol >= 3) OR (gold_bonanza.Sym[S4].Sub) AND (Symbol >= 3) then Inc(Symbol, 1);
if (S5 = Seed) AND (Symbol >= 4) OR (gold_bonanza.Sym[S5].Sub) AND (Symbol >= 4) then Inc(Symbol, 1);
end;
end;
[/code\
thank you very much for your replies. It helps a little bit.
But to not spam my questions about the programming i sent you @GrimR a PM.
Thanks for posting the piece of code you did, it's a bit hard to understand :) because this kind of programs is really new to me.
Best regards
Frank