Olares Blog
How We Pick Winners for Giveaway
The random seed
Every random draw starts from a special number, like a key that unlocks the result.
In our giveaway, this key number, or the “seed”, is the total amount raised on Kickstarter at the end of the event.
How we pick the winners
After the event ends, we do the following:
- Take the seed.
- Take the total number of backers.
- Use a simple computer program to:
- Create a list of all Backer IDs.
- Shuffle this list using the seed.
- Pick 10 unique Backer IDs as winners.
If you want to verify the result yourself, you can use the Python code below.
Python
import random
def lottery(seed, total_users, winners_count=10):
if total_users < winners_count:
raise ValueError("Total number of users must be greater than or equal to the number of winners")
# Set the random seed (to make the result reproducible)
random.seed(seed)
# User IDs: 1 ~ total_users
users = list(range(1, total_users + 1))
# Randomly select winners without repetition
winners = random.sample(users, winners_count)
return winners
if __name__ == "__main__":
seed = int(input("Please enter the random seed: "))
total_users = int(input("Please enter the total number of users: "))
winners = lottery(seed, total_users)
print("Winning user IDs:")
for user in winners:
print(user)