acura1234567890
acura1234567890
Joined: Sep 4, 2018
  • Threads: 5
  • Posts: 25
June 21st, 2021 at 7:41:51 AM permalink
So a nerdy question here,

You have an instant ticket game. The game has two "winning Player numbers" from 1-20 and you have to match a like number or multiple matches in a field of 10 numbers with the same range.

Example: Players Numbers 14 7

18 ($5) 20 ($100) 3 ($2500) 9 ($500) 10 ($50)

17 ($25) 4 ($1) 19 ($1000) 5 ($3) 12 ($2)

The game has predetermined winners in the entire game (a seeded outcome)

So the game would have a fixed number of prizes predetermined for the entire game.

EX.

4 $50,000
10 $5000
20 $500
200 $100
500 $50
1000 $25
2000 $5
5000 $2

How would one create an algorithm say in excel to achieve this?
Dieter
Administrator
Dieter
Joined: Jul 23, 2014
  • Threads: 8
  • Posts: 2354
June 21st, 2021 at 7:58:50 AM permalink
Don't overlook the importance of including $0 prizes in your lottery.
May the cards fall in your favor.
ThatDonGuy
ThatDonGuy
Joined: Jun 22, 2011
  • Threads: 106
  • Posts: 5076
June 21st, 2021 at 8:27:45 AM permalink
Here's one way to do it:
For each ticket, generate a set of 12 different numbers from 1-20, and randomize the order. The first 10 are the prize numbers, and the last two are the player numbers.
Also, generate a random order of the 10 prize amounts for each ticket, then assign the first amount to the first number, the second amount to the second number, and so on.
Once you have done that, start with the $50,000 prizes; take the first four tickets, and change one of the two player numbers to that ticket's $50,000 number.
Do the same thing with the ten $5000 prizes, then the 20 $500 prizes, and so on.
Since the first 12 numbers are different, this guarantees that any ticket that didn't have either of its player numbers set to a winning number will be a losing ticket.
ECoaster
ECoaster
Joined: Apr 21, 2014
  • Threads: 5
  • Posts: 156
June 21st, 2021 at 12:08:05 PM permalink
Quote: ThatDonGuy


Once you have done that, start with the $50,000 prizes; take the first four tickets, and change one of the two player numbers to that ticket's $50,000 number.



It's a good basic way to do it... of course actual lottery scratch offs are more complicated. For example, a $50 winner card might be generated by having 2 different $25 winning spots.
acura1234567890
acura1234567890
Joined: Sep 4, 2018
  • Threads: 5
  • Posts: 25
June 22nd, 2021 at 7:17:14 AM permalink
The Game I'm referring to is this: ml

I don't know if they pre populate a table of winning outcome tickets and then just generate the losing tickets as a conditional if statement that selects a 0 or 1. O being losing tickets and if 1 then select from winning ticket table.

The other issue is there seems to be a near miss feature built into the game so that when you scratch a "13" for example the field of number would contain a "10" or a "1" to give the player a sense that a winning number could be revealed.

Also I read an article that states that the designers batch the tickets and then randomize within the batches as to insure an equal distribution of a variety of prizes within each batch probably weighted toward the ends of the books of tickets as to allow the retailer to collect the funds in order to fund the prizes.

  • Jump to: