heatmap
heatmap 
  • Threads: 272
  • Posts: 2365
Joined: Feb 12, 2018
June 4th, 2020 at 6:12:17 PM permalink
I don’t know where I have read this, but I remember a commenter or something that mentioned an artificial intelligence program that can reconstruct slot machine reels. Can someone PM me the name of it if you know what I am talking about. Gloogle is useless in this situation
rxwine
rxwine
  • Threads: 218
  • Posts: 12698
Joined: Feb 28, 2010
Thanked by
heatmap
June 4th, 2020 at 7:59:08 PM permalink
Quote: heatmap

Gloogle is useless in this situation



Try Google. j/k.

Seriously though you did make me wonder if any of big IBM projects (Deep Thought/Blue/ Watson) have ever turned their machine on any other gambling games besides poker. Go, Chess, and some computer battle game I can't remember the name of.
Sanitized for Your Protection
heatmap
heatmap 
  • Threads: 272
  • Posts: 2365
Joined: Feb 12, 2018
June 5th, 2020 at 9:09:19 AM permalink
Quote: rxwine

Try Google. j/k.

Seriously though you did make me wonder if any of big IBM projects (Deep Thought/Blue/ Watson) have ever turned their machine on any other gambling games besides poker. Go, Chess, and some computer battle game I can't remember the name of.



I could have sworn I read an article on wizard of odds that was the wizard sitting at a slot machine and reconstructing the reels but i also cant seem to find that as well either way i agree with you.
TumblingBones
TumblingBones
  • Threads: 29
  • Posts: 529
Joined: Dec 25, 2016
June 6th, 2020 at 10:45:07 AM permalink
Quote: rxwine

Seriously though you did make me wonder if any of big IBM projects (Deep Thought/Blue/ Watson) have ever turned their machine on any other gambling games besides poker. Go, Chess, and some computer battle game I can't remember the name of.


About a year back I sat in on a lecture by one of the professors from MIT's Computer Science & Artificial Intelligence Lab (CSAIL). The topic was the application of AI to the health sciences but he mentioned in the intro that his group had in the last couple years branched out to include two other areas: algorithmic stock trading and sports betting.
My goal of being well informed conflicts with my goal of remaining sane.
RideTheEdge
RideTheEdge
  • Threads: 2
  • Posts: 203
Joined: Apr 30, 2020
Thanked by
heatmap
June 6th, 2020 at 1:50:22 PM permalink
Member p13man talks about a program he wrote in this post

I considered writing such a program using image recognition libraries to analyze videos of slot machines one frame at a time. To get a feel for it (and to start mapping reels without waiting for me to write the program or fail trying), I captured the symbols of two slot machines off youtube videos. I was able to reconstruct the reels (or at least get close) for the normal and bonus rounds of one machine. I think the second machine put bogus symbols up between the spins because the symbol frequencies didn't match up with the spin results.

If anyone knows more about such programs I'd like to hear about it. That would save a lot of time, plus allow capture of reels for multiple different configurations (i.e. RTP) of the same machine when the RTP is manipulated through changing the reels.
heatmap
heatmap 
  • Threads: 272
  • Posts: 2365
Joined: Feb 12, 2018
June 6th, 2020 at 2:13:12 PM permalink
Quote: RideTheEdge

Member p13man talks about a program he wrote in this post

I think the second machine put bogus symbols up between the spins because the symbol frequencies didn't match up with the spin results



Thank you I think that’s the post I was referring to and I’m pretty sure DRich said he has made both machines with bogus and real animations in between this is what I was worried about.

I know just enough that I can piece together an image recognition program, one because I have to learn it for the one project I’m working on and two because I want to make this slot machine AI as well.
RideTheEdge
RideTheEdge
  • Threads: 2
  • Posts: 203
Joined: Apr 30, 2020
Thanked by
heatmap
June 6th, 2020 at 2:35:58 PM permalink
I did a little digging into what libraries to try. The first one would (will?) probably be yolov3. Here are a couple links to check out:
- https://pjreddie.com/darknet/yolo/
- https://towardsdatascience.com/training-a-yolov3-object-detection-model-with-a-custom-dataset-4981fa480af0

It will be interesting to hear details about your experience and which image recognition software was best suited to the task.

I might be able to do a little beta testing if you make progress.

When looking for bogus symbols between the spins, another clue that they weren't reel (hah! a spelling error pun) was that very few of the symbol patterns that appeared in the final spin result (after a couple hundred samples) also appeared during the spinning of the reel (only 7 fully sampled reels comprising a few hundred symbols).
heatmap
heatmap 
  • Threads: 272
  • Posts: 2365
Joined: Feb 12, 2018
p13man
p13man
  • Threads: 4
  • Posts: 32
Joined: Jul 14, 2019
June 17th, 2020 at 4:07:18 PM permalink
OK. Couple of things. This (see link below) has been tested and is known to work if your goal is to build something that can determine the reels of a slot from a video of game play:

<I can't post links, so you'll need to DM for the link>

Things to know:

- you'll need 10-15 minutes of high-quality (1080p, 30 fps) base gameplay video for each game that you wish to map (most of the content on youtube isn't good enough)
- if you get it working, the solution should be generic i.e. can be applied to map the reels of any slot (so long as there are not massive symbol stacks)
- it is processor intensive and will require either dedicated hardware (think bitcoin mining racks) or you'll need to rent some GPU instances from Amazon
- this is deeply technical and requires in-depth knowledge of image processing, neural nets, Amazon EC2 and the Python programming language

But, hey, it'll be a fun project!

Hope this helps.
AxelWolf
AxelWolf
  • Threads: 170
  • Posts: 22690
Joined: Oct 10, 2012
June 17th, 2020 at 4:43:18 PM permalink
Quote: p13man

OK. Couple of things. This (see link below) has been tested and is known to work if your goal is to build something that can determine the reels of a slot from a video of game play:

<I can't post links, so you'll need to DM for the link>

Things to know:

- you'll need 10-15 minutes of high-quality (1080p, 30 fps) base gameplay video for each game that you wish to map (most of the content on youtube isn't good enough)
- if you get it working, the solution should be generic i.e. can be applied to map the reels of any slot (so long as there are not massive symbol stacks)
- it is processor intensive and will require either dedicated hardware (think bitcoin mining racks) or you'll need to rent some GPU instances from Amazon
- this is deeply technical and requires in-depth knowledge of image processing, neural nets, Amazon EC2 and the Python programming language

But, hey, it'll be a fun project!

Hope this helps.

This is very interesting. I have a few questions and I'm not even sure if I'm asking the correct ones or if I can articulate what I'm trying to ask in the first place. so bear with me, hopefully somebody else can help ask or answer some questions.

Can you dumb this down for everyone and explain how this can be applied and what the purposes would be?

I assume this will help figure out symbol frequencies in order to help determine the payback and variance of a slot machine? Basically it's a Automated reel tracking software? This will also help determine how often a bonus round will occur, how often you'll get the top jackpot or the frequencies of whatever combination you're trying to figure out? For instance, you may want to know how often you're going to catch a particular $500 payout. Perhaps it'll

Most slots have multiple bonus rounds nowadays. Without a par sheet or a very large sample size, how can you figure out what the average bonus round pays back? I guess once you apply all the hip frequencies what the pay table you can assume the bonus rounds make up for the rest? But without knowing the actual Payback of the machine how could you determine what percentage a bonus round adds to the overall Payback? It seems to me like you could be as much as 5% off depending on what the slot machine is set at.

Rather than a Time reference (10-15 min)of how long someone should spin can you tell us how many spins would be sufficient? Is there a margin of error? How accurate would this be after 500 spins? What about 1000 spins, or even 5000 spins, or is that totally unnecessary and more spins won't help?

Would you like someone to post your link on the Forum or would you rather have people private message you?
♪♪Now you swear and kick and beg us That you're not a gamblin' man Then you find you're back in Vegas With a handle in your hand♪♪ Your black cards can make you money So you hide them when you're able In the land of casinos and money You must put them on the table♪♪ You go back Jack do it again roulette wheels turinin' 'round and 'round♪♪ You go back Jack do it again♪♪
Wizard
Administrator
Wizard
  • Threads: 1520
  • Posts: 27118
Joined: Oct 14, 2009
June 17th, 2020 at 6:18:38 PM permalink
Interesting topic.

Most slots have different reel stripping in free spin bonus rounds, so you'd need to play through that many times to piece together those reel strips. That would involve hours of play. Many slots have factors pertinent to the odds that playing it wouldn't tell you, like the bubble frequency in Ocean Magic, other than by simply playing it for hours and basing the probability on observed averages.

There are a lot of links in this thread. If anyone can give me one of such a specific product, please do.
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
RideTheEdge
RideTheEdge
  • Threads: 2
  • Posts: 203
Joined: Apr 30, 2020
June 17th, 2020 at 7:16:33 PM permalink
Thank you p13man for replying to my DM.

p13man asked me to post the link to the pytorch library tutorial. That's one potential starting point to build image recognition software that can be used to map reels on a slot machine. yolo (specifically version 3 of yolo, or yolov3) is another, see links in my previous post.
RideTheEdge
RideTheEdge
  • Threads: 2
  • Posts: 203
Joined: Apr 30, 2020
June 17th, 2020 at 7:47:24 PM permalink
Quote: Wizard

Interesting topic.
...
There are a lot of links in this thread. If anyone can give me one of such a specific product, please do.



I don't know of any software to map a reel other than p13man's, which is not public. The yolo, tensorflow, and pytorch links are starting points for the image recognition part of the problem.

I mapped the reels of the base game and bonus round for a popular game that is exploited by APs. The reel mapping is just a start. For the game I'm analyzing I also have to find the probability of each of several possible bonus rounds empirically (like finding the weights of a virtual reel). There is also a random multiplier in the bonus round and I need to collect data from youtube videos for a few hours to determine the relative probabilities of each multiplier.

I was able to manually piece together the reel maps with about 20 completely mapped spins (20 each for the base game and bonus round). I recorded hundreds of spin results to decide which 20 to examine in detail. To do this, I started with one completely mapped reel, and for the the next spin I chose one that overlapped the previous portion about half way. Errors are possible, better to overlap by "n-1" rather than "n/2". I presume p13man's program does this more thoroughly. The number of symbols in the reels I mapped varied from 84 to a few hundred, though the very long ones were made up of shorter segments that were nearly identical. My guess is that the designer repeated the reel and removed/added valuable symbols to tweak the RTP, but that's just a naive guess. I'm pretty new at this.

Once I had the 5 reel maps, the program to calculate base game RTP was pretty straight forward. Run through all the possibilities (on the order of 100 billion), add up the payouts, divide by the number of spins to get payout per spin. It took about 70 minutes to run an optimized C++ program on a relatively weak PC to do this calculation. Rinse and repeat for the bonus round. That's enough to build a spreadsheet where the empirically determined values can be plugged in to calculate an EV given the state of the machine. I'm stuck procrastinating over staring at youtube videos long enough to get some of the empirical values. I'll need to risk going into casino again to find the probability of entering each bonus round since I expect a huge selection bias in the videos that people choose to post on youtube.

I suspect I'll get a result that is nearly as accurate if I just determine symbol frequencies rather than the exact reel map and then construct my own approximate reel. There is another machine I'm looking at where the symbols zipping by between the spins are fake, so I'll have to settle for the frequencies to analyze that one.

Since I'm running through all possibilities, I expect to be able to calculate a pretty good estimate of the variance (subject to uncertainty in the empirical values). With that and the EV as a function of the machine's state I can get the bankroll required to sit down.

p13man has an added benefit. Since he can get the reel maps of several machines fairly easily, he can see if the designer manipulates the RTP for different configurations by changing the reel map. If so, then by looking for the reel map variations you can determine which configuration a given machine has before playing it.
RideTheEdge
RideTheEdge
  • Threads: 2
  • Posts: 203
Joined: Apr 30, 2020
June 17th, 2020 at 8:16:49 PM permalink
Quote: AxelWolf

This is very interesting. I have a few questions


These questions are probably directed to p13man, but I'd like to contribute.

Big caveat: these comments only apply if the likelihood of each stop on the reel is equal. This doesn't work for virtual reels.


Quote:

how this can be applied and what the purposes would be?


I think most people analyze slot machine statistically. How much do I lose on average in the base game? How much per spin do I make on free spins? What is the frequency of the key symbols on each reel to hit a jackpot or get a bonus round? Play a lot and record results to get approximate answers to these questions.

If the reel map is known (and each reel stop has the same chance of landing; it is not a virtual reel), then some of these questions can be calculated exactly rather than estimated. I find it satisfying to know an exact answer rather than a probability that my best estimate is close.


Quote:

I assume this will help figure out symbol frequencies in order to help determine the payback and variance of a slot machine?


Yes the reel map will tell you the symbol frequencies, but you don't need to use that. You can calculate the probability of every possible spin outcome, and from that calculate the payback and variance, at least for the base game. You can also calculate the payback and variance of a free spins bonus round.

Quote:

Basically it's a Automated reel tracking software? This will also help determine how often a bonus round will occur, how often you'll get the top jackpot or the frequencies of whatever combination you're trying to figure out? For instance, you may want to know how often you're going to catch a particular $500 payout.


You can calculate some these things if you have the reel map, such as the probability of hitting the symbols in the base game to enter a bonus round. If there is a subsequent random chance to choose which of several bonus rounds you enter, then a reel map doesn't help you figure out the probability of the outcomes of that game. For instance, say a wheel is spun to see if you get one of a hundred different prizes. Obviously the reel map of the base game doesn't help you figure out the probability of each of those.


Quote:

Most slots have multiple bonus rounds nowadays. Without a par sheet or a very large sample size, how can you figure out what the average bonus round pays back? I guess once you apply all the hip frequencies what the pay table you can assume the bonus rounds make up for the rest? But without knowing the actual Payback of the machine how could you determine what percentage a bonus round adds to the overall Payback? It seems to me like you could be as much as 5% off depending on what the slot machine is set at.


Yep, the reel map is just a start.


Quote:

Rather than a Time reference (10-15 min)of how long someone should spin can you tell us how many spins would be sufficient? Is there a margin of error? How accurate would this be after 500 spins? What about 1000 spins, or even 5000 spins, or is that totally unnecessary and more spins won't help?


On the one game I analyzed manually (see previous post) I needed about 20 spins to piece together the reel map for the base game and another 20 for the free spins (different reels.) I had the results of over 500 spins to help me choose which 20 to use. In the 45 minute youtube video I analyzed, there were 579 regular spins and 96 bonus round free spins, so that's about 200 spins in 10-15 minutes. The game I looked at had fast spins, so maybe p13man's program doesn't need that many. I think the reel map I came up with was pretty close but it might be wrong. With 200 spins instead of 20 I'd be pretty sure it was 100% correct and more spins wouldn't help.


Quote:

Would you like someone to post your link on the Forum or would you rather have people private message you?


Done, see two posts back.
p13man
p13man
  • Threads: 4
  • Posts: 32
Joined: Jul 14, 2019
June 17th, 2020 at 11:29:18 PM permalink
Quote:

Can you dumb this down for everyone and explain how this can be applied and what the purposes would be?



From here on in, I’m calling it the ‘reel reader’ (RR).

The RR gives us 2 things:

1. The ability to understand the symbol composition of a game’s reels
2. The ability to automatically watch and log (keep a record) of each spin

#1 allows us to calculate the odds of any given outcome, understand how the reels are purposefully engineered for near-misses and determine the likelihood that a machine will give a ‘loss disguised as a win’. Both of these outcomes are designed to ‘condition’ players and so being able to understand the extent to which these mechanisms are used is important – from a consumer rights perspective but also as an input to a play-to-win style of play (I’m deliberately not using the word ‘system’).

#2 allows us to check if the gameplay is indeed random or algorithmically driven

These two were my primary motivations for developing RR. The knowledge gained has helped me to develop a style of play that is financially much more beneficial than the one I had been using for more years than I care to mention. This has been an unexpected by-product of the outputs of RR and was not part of the original intent. But nonetheless very welcome.

Quote:

I assume this will help figure out symbol frequencies in order to help determine the payback and variance of a slot machine?



Yes, RR calculates the symbol's composition (frequency and sequence) of each reel in a game.

Quote:

Basically it's a Automated reel tracking software?



There are 2 primary functions. The first is to define the reels. The second is to use those definitions to determine the stopping positions of each reel in a game. So yes, it is automated tracking software.

Quote:

This will also help determine how often a bonus round will occur, how often you'll get the top jackpot or the frequencies of whatever combination you're trying to figure out?



The reel composition allows the probability of a bonus round to be calculated. For example, on Aristocrat Golden Century (and all other reskins) the chances of getting a hold and spin feature is about 1 in 131. The same goes for free games. If you get either of those features in the first 10 spins you know your luck is in! Similarly, you can calculate the odds of any given outcome (in the base game). You can also get closer to understanding the split between RTPs of base game versus bonus games.

Quote:

Most slots have multiple bonus rounds nowadays. Without a par sheet or a very large sample size, how can you figure out what the average bonus round pays back?



I don’t think that is possible. If we use Hold and Spin games as an example, the values on the coins are chosen from a look up table and the mechanism for that can’t be discovered by looking at the coins as they fly by in the feature.

Quote:

I guess once you apply all the hip frequencies what the pay table you can assume the bonus rounds make up for the rest?



Yes. We can determine the RTP of the base game and the rest is attributed to bonus rounds.

Quote:

But without knowing the actual Payback of the machine how could you determine what percentage a bonus round adds to the overall Payback? It seems to me like you could be as much as 5% off depending on what the slot machine is set at



Correct. You won’t be able to accurately calculate the RTP of the bonus rounds – just estimate the split between base and bonus e.g. 40/60 or 30/70 etc

Quote:

Rather than a Time reference (10-15 min) of how long someone should spin can you tell us how many spins would be sufficient? Is there a margin of error? How accurate would this be after 500 spins? What about 1000 spins, or even 5000 spins, or is that totally unnecessary and more spins won't help?



The 10-15 minutes of play is required to determine the reel composition. That’s all it needs. More spins won’t make a difference. If you want to determine the randomness or otherwise of the spins (i.e. have RR watch and record game outcomes), then more spins are better.

Quote:

Would you like someone to post your link on the Forum or would you rather have people private message you?



The link has been posted for those interested in developing something of their own. Props to RideTheEdge.
  • Jump to: