0

We are trying to build a system in which the winners of prizes are selected on a daily basis and their relevant contact details (address, phone #, name) are pulled from database. The number of prizes is fixed, but can change on a daily basis if new prizes are added to the db. This is part of a quiz system, so we have determined that a user's odds of winning a getting daily prize is the:

# of sessions they have completed/ # of total sessions completed by all the users

Once a user has won a prize, their # of completed sessions is reset to 1. This is to ensure that people that have not won before have a greater chance of winning. Users are only eligible to win a daily prize if they have participated that day and attempted a certain amount of questions (10).

Is the proposed logic flawed? If not, how does one implement this logic into our automated system?

Kunal K
  • 9
  • 1
  • 1
    Hi! Please read http://stackoverflow.com/help/on-topic – Epodax Apr 20 '15 at 10:06
  • The logic sounds achievable, though whether it offers the right odds for your business model is up to you. Presumably you want to strike a balance between giving people reasonable odds of winning whilst not having to pay out so much you run out of money. How to implement the logic is a very broad question. Do you have a database design? If so, try writing a script that calculates the things you need (e.g. total sessions completed by all users). Then you can loop through all users and determine whether they have won or not. – halfer Apr 20 '15 at 10:30
  • What exact information do you need regarding the database design? – Kunal K Apr 20 '15 at 11:25

0 Answers0