The python code reads odds of the various items in the lucky draw from the CSV file. It continues to play the draw the action till the intended item (Legendary Weapon) is received.
The although the items are different for each draw, the odds continue to be the same across the draws. We try to simulate the draw 10,000 times and determine how much percentage of players (out of 10,000) receive the draw in each of the turns.
The results of the simulation can be used as a aid for decision making. A snapshot of the simulation is obtained as
- Install Python: Make sure Python 3.x is installed on your system.
- Install required packages: Run
pip install -r requirements.txtin your project directory. - Run the simulation: Execute
python lucky_draw.pyfrom the command line in the project folder. - Customize draw settings: To change the cost or probability of each item, edit the values in
Primeveal_redux.csv. The simulation will use the updated values on the next run.
