November 27th, 2014 at 8:31:28 AM
permalink
Hello again
because of your help, I made quite a progress with my slot game. Unfortunately I'm stuck once more and can't figure out what I'm doing wrong. I have a 8 symbol with 1 wild symbol, 5x32 reel game. I calculated all possible winning combinations for the game. Then I worked out probability for each pattern. Take a look at the screenshot below
I calculate Line Pay return with the following formula: p*w where p is the probability of the pattern and w is the amount to win. All in all, the total line pay return is 92% as seen from screenshot.
Now comes the most interesting part. I simulate a game with 10,000,000 spins, and almost all output matches expectations. Winning combinations comes out 11.5% as expected from "Win Probability" table, every winning combination comes out as it should, but total winning balance is not 92% but somewhere ~102%. In other words, the game should have lost 8% of money, but it won 2%+. I can't explain this behavior and don't know what I'm missing. Any ideas?
Thank you very much again.
because of your help, I made quite a progress with my slot game. Unfortunately I'm stuck once more and can't figure out what I'm doing wrong. I have a 8 symbol with 1 wild symbol, 5x32 reel game. I calculated all possible winning combinations for the game. Then I worked out probability for each pattern. Take a look at the screenshot below
I calculate Line Pay return with the following formula: p*w where p is the probability of the pattern and w is the amount to win. All in all, the total line pay return is 92% as seen from screenshot.
Now comes the most interesting part. I simulate a game with 10,000,000 spins, and almost all output matches expectations. Winning combinations comes out 11.5% as expected from "Win Probability" table, every winning combination comes out as it should, but total winning balance is not 92% but somewhere ~102%. In other words, the game should have lost 8% of money, but it won 2%+. I can't explain this behavior and don't know what I'm missing. Any ideas?
Thank you very much again.
November 27th, 2014 at 8:50:40 AM
permalink
In your simulation, are you returning the player's bet when they win?
I heart Crystal Math.
November 27th, 2014 at 8:54:34 AM
permalink
Of course. starting balance is 10,000,000. bet is always 1.
The balance in the screenshot (10181625) is the balance after 10,000,000 spins.
the process is as follow:
1. the system bets 1 unit (1 is subtracted from balance)
2. It simulates a spin by generating a sequence of 5 symbols from pseudo random numbers.
3. it checks whether or not the symbol sequence matches a win.
4. if it matches, the win is added to the balance. if not, it starts over.
The balance in the screenshot (10181625) is the balance after 10,000,000 spins.
the process is as follow:
1. the system bets 1 unit (1 is subtracted from balance)
2. It simulates a spin by generating a sequence of 5 symbols from pseudo random numbers.
3. it checks whether or not the symbol sequence matches a win.
4. if it matches, the win is added to the balance. if not, it starts over.
November 27th, 2014 at 10:21:41 AM
permalink
Quote: DavitaOf course. starting balance is 10,000,000. bet is always 1.
https://dl.dropboxusercontent.com/u/3055964/Capture.JPG
The balance in the screenshot (10181625) is the balance after 10,000,000 spins.
the process is as follow:
1. the system bets 1 unit (1 is subtracted from balance)
2. It simulates a spin by generating a sequence of 5 symbols from pseudo random numbers.
3. it checks whether or not the symbol sequence matches a win.
4. if it matches, the win is added to the balance. if not, it starts over.
The description sounds correct to me, but in the description, you are not returning the bet in addition to the win. The reason I asked is because your return is too high and the excess is about the same as the win%.
If you keep track of all your hits and they match your calculation, then you must have an error in tabulating the wins. I suggest keeping track of hits for all wins and then manually calculate the expected final balance in excel. If it doesn't match your sim output, then find out why?
I heart Crystal Math.
November 27th, 2014 at 10:51:35 AM
permalink
I'm not sure if I understand correctly your question concerning bets. Bets are included in final result. every spin is a bet (balance - 1). Every win is added to the balance.
To be sure, I tried what you suggested, I saved winning hits in a file. Then summed it up. The result is as follow:
Wins: 1016610
Bet: 1000000
So the game won ~2% when it should have lost somewhere 8%.
Thanks again.
P.S. I'll write the algorithm just in case
for (int i = 0; i < 1000000; i++)
{
spins++;
balance -= 1;
if (balance <= 0) break;
string pattern = string.Empty;
for (int x = 0; x < 5; x++)
{
var randomNum = GenNum(0, game.Reels[x].Symbols.Count - 1);
pattern += game.Reels[x].Symbols[randomNum].Code;
}
var won = CalculateWin(pattern);
if (won != 0)
{
winCount++;
balance += won;
}
}
To be sure, I tried what you suggested, I saved winning hits in a file. Then summed it up. The result is as follow:
Wins: 1016610
Bet: 1000000
So the game won ~2% when it should have lost somewhere 8%.
Thanks again.
P.S. I'll write the algorithm just in case
for (int i = 0; i < 1000000; i++)
{
spins++;
balance -= 1;
if (balance <= 0) break;
string pattern = string.Empty;
for (int x = 0; x < 5; x++)
{
var randomNum = GenNum(0, game.Reels[x].Symbols.Count - 1);
pattern += game.Reels[x].Symbols[randomNum].Code;
}
var won = CalculateWin(pattern);
if (won != 0)
{
winCount++;
balance += won;
}
}
November 27th, 2014 at 12:14:43 PM
permalink
Ok. Now you know there is either a problem with the calculations or a problem with the simulator. Are there any winning combinations that get more hits than you calculated?
I heart Crystal Math.
November 27th, 2014 at 12:17:06 PM
permalink
Good idea, I'll check that now and post the result.
thanks for the direction :)
thanks for the direction :)
November 27th, 2014 at 2:23:12 PM
permalink
Thank you very much. Again, with your help I identified my problem and now everything works fine. The problem was that I assigned wild symbol incorrectly to some of the winning patterns.
Many thanks :)
Many thanks :)
November 27th, 2014 at 8:29:59 PM
permalink
You're welcome.
I heart Crystal Math.