Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiline Games Do Not Pay Extra for Scatters #1

Open
lmstearn opened this issue Jul 20, 2018 · 14 comments
Open

Multiline Games Do Not Pay Extra for Scatters #1

lmstearn opened this issue Jul 20, 2018 · 14 comments

Comments

@lmstearn
Copy link
Owner

lmstearn commented Jul 20, 2018

The motivation for this was by design, and made so long ago the precise reason is not recalled, so here goes:
The calculation of scatter prize amounts for a single Payline game is based on the random chance a Scatter appears in any of the 3 visible lines.
This method will work for successive Paylines only if they do not share any lines used by previous scatters. Which implies revealing more paylines on-screen. So for scatters on a second Payline, we'll be looking at six lines, with the main Paylines now being the 2nd and 5th.
If we allow any intersection or sharing of Scatter combinations, it then establishes an order a priori between the Paylines, so they are not random anymore, skewing the new Prize Amounts in proportion to their no-scatter counterparts.
In this example, the 2nd and 3rd Paylines are not randomly selected, but fixed in their positions wrt the first Payline.
The calculation of scatter prize amounts applying to the second or third line must involve a different and much more complicated method than the one currently used, whether or not the lines for calculation include those off screen. Calculating a scatter for a Payline implies the line above and below the Payline, as is already the case with the middle Payline.
We can always hope in vain to prove that, over a large number of plays, multiplying the middle line scatter prize amounts by the number of Paylines is equivalent to simply increasing the bet on the middle Payline by a similar quantity.
The larger the number of scatters per reel, the more the issue is brought into focus.
For games where scatters are the only symbols in play, this is not an issue.

@deathssoul
Copy link

I'm looking for the the relevant code and I need to ask: which file is that in? I'm not sure how the code is organized. :P

@lmstearn
Copy link
Owner Author

lmstearn commented Jul 23, 2018

Hey there! It's a bit how's_your_Gaga as far as organization- but kept all the modules in line with the limitation of 64k.
Do a search for SortPrizes, that'll be in Auxrout1.bas, but there are associated routines above that in that module. It's called from the front end form: Pokemach.frm.
It has to be noted that, given Player selects Highest Wins Only Paid, and multiple line scatter payouts are selected as described above, they may then be split for each line, and will look rather odd to the Player.

@deathssoul
Copy link

deathssoul commented Jul 24, 2018 via email

@lmstearn
Copy link
Owner Author

lmstearn commented Jul 26, 2018

That's terrible! :( Back in the day GPs drained ear canals with a syringe- but that was only as a last resort as earwax is very important.
There is a bug floating around as this eustachian tube is inflamed- the (associated?) ulcer on the tongue is gone, so hopefully body has this one sorted. :)
BTW notwithstanding many commercial machines pay multiline scatters as described, this issue is more of a "policy" imperative more than a coding flaw.

@deathssoul
Copy link

I have bad sinuses so they thought that was the cause of it. They gave me some medicine that will hopefully help to clear things up. :)

Okay, I'll need to do some reading as well to make sure I fully understand the concept. I thought it was just a simple matter of checking if one thing was also visible as well. :P

@deathssoul
Copy link

Okay, I think I've got it figured out on my notepad. Give me one more day to type it up as I only got a few hours of sleep last night. :-P

@deathssoul
Copy link

Sorry, ran into some trouble updating Windows today. Here's what I've got:

Assume we have a list called Scatter.
Cell is defined as:
Cell { row; column; value; }

For each row for each column if cell at this point is a scatter then add to list

Iterate through the list.
calculate row_score[Scatter.row] and col_score[Scatter.col]

Iterate through those two lists, summing them up to get the final score.
Basically, we're flattening the lists as we go through them, calculating things based on the weighting.

@lmstearn
Copy link
Owner Author

lmstearn commented Jul 31, 2018

Yes thanks, and it's also when the probabilistic considerations come into play with scatter prizes.
Consider the scatter prizes as some arbitrary mapping based on single line prizes. The sampling changes when we take another payline which, in it's allocated position, has a dependency on the first.
Any scatter prizes for second line would be the same as the first line- except that single line prizes for the second line are now affected by any scatter distributions used by the first line, and scatter prizes for the first line are now affected by the single line prizes on the second line, and so on.
With our arbitrary mapping compromised on the introduction of another payline, an "easy" way of determining the fairest scatter prizes would be to sample all of the possible distributions and crunch out the magic numbers in a Monte Carlo scenario. A gargantuan task.
Getting 3.2 ready- some improvements in the Picture Properties Screen, but the code is still far from optimal.

@deathssoul
Copy link

For dependency mapping, you're going to need to use a dependency graph or make Scatters a data-type with dependency linking. For instance:

Scatter {
    depends_on = Scatter2;
}

Or something similar.

You could also do a directed graph. I'm not sure if there are any libraries out there for Visual Basic though.

@lmstearn
Copy link
Owner Author

lmstearn commented Aug 2, 2018

That would be cool, especially in a fair game where the chance of a prize has the same proportion to the prize, whenever it applies to both single line and scatter payouts, not just one.
Edit: That is when

 GPF = constant Global Prize Factor
Prize = probability of prize * GPF

Which clearly doesn't even happen for non-scatter prizes. Which is another issue. :P

@deathssoul
Copy link

I can certainly look at graph libraries. Graphs aren't hard to implement, I just haven't worked with Visual Basic much in fifteen years so I'm rather rusty.

@lmstearn
Copy link
Owner Author

lmstearn commented Aug 3, 2018

Thanks. 👍 Graphs were actually considered a long time ago- they might have been a bit awkward fitting into the GUI. The best idea in the long run is a port or a rewrite in a more "modern" language- or just good old C++, or some variant of.
In any case SKSEView is also developing rust- so returning to that is a higher priority.

@deathssoul
Copy link

For C++, there are a ton of graph libraries. cppreference lists a few under Graph Theory here: https://en.cppreference.com/w/cpp/links/libs

Apologies, they don't provide links to each section so you'll need to do a ctrl+f for "Graph Theory" as the page is rather long.

Still looking for VB libraries!

@deathssoul
Copy link

Not having luck finding stuff for Visual Basic but I'll keep looking. When I search, all that comes up is stuff for C# which is not what we want so I'm not sure how to approach things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants