Solving Math/Computer Science Problem on Job for Gaming Co.

  • Thread starter Mark Morse
  • Start date
  • Tags
    Job
In summary: So it's important to make sure that all probabilities that are generated from simulation match up with the probabilities that were calculated from the mathematical model.In summary, according to the math department, the probability of the occurrence of each event is as follows:5 draws, 4 daubs, Paygroup: 07 draws, 6 daubs, Paygroup: 011 draws, 9 daubs, Paygroup: 0
  • #1
Mark Morse
2
0
Hi, I am a math developer for a gaming technology company, and need the assistance of a math/computer science guru.

We have a standard bingo card, with five rows, five columns, and a free space in the center. Column 1 contains 5 integers chosen at random from the set 1 thru 15. Column 2 ... 16-30. Column 3 contains 4 integers ... 31 thru 45. Column 4 contains 5 integers ... 46 thru 60. Column 5 ... 61 thru 75. This game is a slot machine version of bingo, where only one bingo card can used per game, and every card eventually achieves a bingo.

The Draw # is defined as the number of balls drawn when the player FIRST arrives at bingo. For instance if a player hits bingo after 4 numbers have been called, then the Draw # is 4.

If a number is called such that the player has this number on their card, then we call this a daub. Important note: A player can have only so many daubs before a bingo is reached.

The Pay Group # is defined to be the ones digit of the integer that results when the four "corner" numbers are summed together. For instance, if the four corner numbers are 6,12, 68, 71, then the pay group is 7. Important note: Column 1 can only contain integers contained in the set 1 thru 15, Column 5 ... 61 thru 75.

The pay table used to calculate winnings, if any, is based on three factors. Factor #1) The Draw #, Factor #2) The number of daubs, Factor #3) The Pay Group #. For instance if the Draw # is 9, number of daubs is 4, and the paygroup is 7, then the player receives a 2 to 1 return on their bet. Important Note- The paytable details are not important to this problem, the 3 factors used in determining pay are important.

Heres the problem: I need to calculate the probability of the occurence of each event. I have a list of all the events, and I can provide it, if necessary. For instance, I need to calculate the probabilities of the events,

5 draws, 4 daubs, Paygroup: 0
7 draws, 6 daubs, Paygroup: 0
11 draws, 9 daubs, Paygroup: 0
.
.
.

Any ideas on how to calculate?
 
Physics news on Phys.org
  • #2
Without getting into details of your problem, sound to me like it can be done just by simulation and brute force - write a program that simulates zillions of games (with all necessary conditions) and see how often you get each event. That's what the probability is about, isn't it?
 
  • #3
Hey Mark Morse and welcome to the forum.

One way that is easy to understand and easy to code up is to use what is known as simulation. Simulation is a fancy way of saying "let's use an appropriate pseudo-random number generator to obtain a distribution and hence a probability".

What you should do is simulate your process that corresponds to the distribution of each square of the bingo board and then using simple transformations, get the distribution (all of these are simulated) of the draws, daubs, and pay group.

I can run through this in more detail, but essentially the idea is that you turn your bingo board into a number of random variables and then do a lot of simulations to get an accurate enough distribution.

So as an example for the first row you can pick from 1-15. So what you would do is you would do five random simulations for the row where the next simulation takes out the values you got before (this is called sampling without replacement). You do the same sort of thing for the other rows.

But then you do the whole procedure in the above paragraph many thousands (tens of thousands) of times to obtain a distribution for each cell on your board. Once you have this you can then add some simple functionality to get your daub distribution, draw distribution and payout distribution.

The simulation itself might take a little while but the speed of computers is fast enough that if you use the right code, you can generate all distributions for the board, the daub, the draw and the payout possibly overnight with a decent computer (and probably a lot less, as in a few minutes or 10/20 minutes).
 
  • #4
Thank you for the replies. My CS department ran the simulations, and they generated probabilities that differ from what the math department came up with. The extent of the differences is unacceptable. In order to get approval from the gaming control board, the simulations need to fall within a certain range of the math-based calculations. Chiro, Borek, any thoughts on how to calculate this mathematically? (a program can be used to calculate the number of ways to get a bingo given "n" daubs.)
 
  • #5
Both simulation programmers and mathematical reasoners can easily make mistakes in this sort of problem. I suggest having the math and CS people calculate special cases and compare answers on those. That might isolate the errors in programming or calculation. For example, look at the case when the numbers on a card are a given set of numbers in a given set of places and only vary the numbers picked by the bingo caller. Or specialize even further and assume a particular 5 numbers have been called by the bingo caller in a particular order and only vary the remaining numbers that are picked at random.

If your CS people are good at simulations, they will run tests on their random number generator. It can be a source of insidious problems. Even if an academic paper has been published saying version 4.1.32 of the generator is above reproach, if you upgrade to version 4.1.33, you'd better test it again.
 
  • #6
Mark Morse said:
Thank you for the replies. My CS department ran the simulations, and they generated probabilities that differ from what the math department came up with. The extent of the differences is unacceptable. In order to get approval from the gaming control board, the simulations need to fall within a certain range of the math-based calculations. Chiro, Borek, any thoughts on how to calculate this mathematically? (a program can be used to calculate the number of ways to get a bingo given "n" daubs.)

You can do it analytically by using a sample without replacement distribution.

Take a look at this for modelling every single row:

http://en.wikipedia.org/wiki/Hypergeometric_distribution#Multivariate_hypergeometric_distribution
 
  • #7
Mark,

It's usually easier to criticize a proposed solution than to find a solution. Given the limited time that mathematical internet strangers are willing to devote to someone else's questions, I think you'll get more substantial help on the forum if you reveal the details of your mathematicians' work - or at least some of it.
 
  • #8
I think you can reduce the complexity a lot, if 1 to 75 all have the same probability to get drawn:

- the used numbers in each group (1-15, ...) do not matter for the bingo probability, you can easily fix them (for example "first column on the board is 1 2 3 4 5").
- the pay group is independent of the chances to win, you can calculate the relative probability to get a specific pay group independently. This can be done in an analytic way or with a quick simulation.
- the probability to get n daubs with m draws is given by the hypergeometric distribution
- the probability to get a bingo depends on the number of daubs only. How do you treat the empty square? I think I would use a simulation here, this does not require many boards and can be done quickly.

To put it together:
"11 draws, 9 daubs, Paygroup: 0"
=> use your calculated value to be in paygroup 0, multiply with your calculated probability to win with the 9th daub (and not earlier), multiply with the probability to get 9 daubs in 11 (but not less) draws.
 

1. What type of math and computer science skills are needed for a job in gaming?

The specific skills needed for a job in gaming will vary depending on the specific role and responsibilities. However, some common math and computer science skills that are frequently used in gaming include programming languages such as C++ and Java, knowledge of algorithms and data structures, and proficiency in linear algebra and calculus.

2. How important is problem-solving in a gaming job?

Problem-solving is crucial in a gaming job as it involves creating and implementing complex systems and mechanics. Being able to identify and solve technical issues quickly and efficiently is essential for a successful career in gaming.

3. How can I improve my problem-solving skills for a gaming job?

One way to improve problem-solving skills for a gaming job is to practice by solving various math and programming problems. Additionally, staying up to date with the latest technology and industry developments can also help in developing problem-solving skills.

4. Is it necessary to have a background in both math and computer science for a gaming job?

While having a background in both math and computer science can be beneficial for a gaming job, it is not always necessary. Some roles may require a strong understanding of one over the other, but having a solid foundation in both can make you a well-rounded candidate.

5. How can I showcase my math and computer science skills in a job application for a gaming company?

In addition to highlighting relevant coursework and experience on your resume, you can also showcase your skills by providing examples of projects or games you have worked on that demonstrate your abilities. You can also participate in online coding challenges or competitions to showcase your problem-solving skills.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
422
  • Set Theory, Logic, Probability, Statistics
Replies
7
Views
1K
Replies
9
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
5
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
7
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
17
Views
7K
Replies
1
Views
2K
Back
Top