Probability program equation in app.

Click For Summary
The discussion centers on developing a feature for an iPhone/Android app that allows stores to create free offers with specific odds of winning. The user scans a barcode to potentially win one of several prizes, each with different winning odds. The main challenge is ensuring the app correctly calculates winners based on the assigned odds without exceeding the number of prizes the store is willing to give away. Suggestions include randomly selecting a prize upon scanning the barcode and applying the respective odds to determine if the user wins. Concerns are raised about the potential for manipulation if the app relies solely on chance without a control mechanism. The need for clarification on how the barcode relates to the winning process and whether multiple users can share the same barcode is also highlighted, emphasizing the importance of a robust system to prevent abuse.
Logger
Messages
28
Reaction score
0
Hi there,

I am getting an iphone/android app developed and there is a new part that needs to be programmed.

A store can create a free offer and assign the random probability odds of winning that prize.
If they create 3 offers for their restaurant with the following win odds.(they can have as many prizes as they want so the equation/code must be dynamic so based on the number of prizes the formula should always give out the correct prizes0

Prize 1 = Free starter with win odds 10:1
Prize 2 = Free main course with win odds 50:1
Prize 3 = Free main course with win odds 200:1

When the app user goes into the store they scan a barcode. This is where I am stuck, I want the user to have a chance to win any of the prizes and for the correct amount of people to have won a prize as I don't want the equation/code to be wrong and the store has to give out much more free stuff than what they had bargained for,I also don't want too few winners as people will stop using it if they are not winning.

Can anyone suggest the best way to code for this(I have no programming experience but have a team in India programming it but want to give them proper instructions). I was thinking the only way that it could be done is when you scan the barcode the program code will randomly select one of the prizes available and then apply the random odds of that prize to see if you won.

Is there a better way to approach this?
Is there a way to combine the odds?

Can anybody suggest how I can get this section to work right. If you need more info please post and I can answer.

Thanks in advance,
 
Technology news on Phys.org
Where does the barcode come from, and do many users get the same barcode?
In other words, do you want that the barcode determines who wins?

If not, how is the barcode related to that?
Do you want random winners, based on nothing else but the app and chance? In that case, it looks dangerous to let the user app do that, as it could be manipulated (or tricked, by scanning an arbitrary barcode generated by the user).
Do you plan some control mechanism, and how does it work?
 
This thread is half a year old and Logger didn't return to clarify the problem.
 
Learn If you want to write code for Python Machine learning, AI Statistics/data analysis Scientific research Web application servers Some microcontrollers JavaScript/Node JS/TypeScript Web sites Web application servers C# Games (Unity) Consumer applications (Windows) Business applications C++ Games (Unreal Engine) Operating systems, device drivers Microcontrollers/embedded systems Consumer applications (Linux) Some more tips: Do not learn C++ (or any other dialect of C) as a...

Similar threads

  • · Replies 15 ·
Replies
15
Views
2K
Replies
3
Views
1K
Replies
9
Views
3K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
6
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 10 ·
Replies
10
Views
2K
Replies
19
Views
4K