Civ 5 giveaway

Civ 5 giveaway

Postby metulburr » Thu Mar 13, 2014 10:28 pm

This give away was "suppose" to be done on March 1 2014, but since the forums went down before then. I didnt want to do the drawing without people seeing it.

The game is Civilization 5 base game, no DLC.
The trailer
http://store.steampowered.com/app/8930/

The rules were: Put in a number from 1-1000 and i will do a drawing of a random number. The person nearest to the that random number wins the game.

The current people signed up were:

stranac 343
mckryall 496
xndrk 822
i will just set a new drawing date.So lets do March 15 2013 as the new drawing date.

The drawing will be using this code:
Code: Select all
import random

database = {
    'stranac':343,
    'mckryall':496,
    'xndrk':822
}

rand_num = random.randint(1,1000)
nearest_num = min(list(database.values()), key=lambda x:abs(x-rand_num))
print('Random number is: {}'.format(rand_num))

for k,v in database.items():
    if v == nearest_num:
        print('Winner is: {} with the number {}'.format(k,v))
        break

So if your interested, post your desired number here, 2 more days.
New Users, Read This
OS Ubuntu 14.04, Arch Linux, Gentoo, Windows 7/8
https://github.com/metulburr
steam
User avatar
metulburr
 
Posts: 1512
Joined: Thu Feb 07, 2013 4:47 pm
Location: Elmira, NY

Re: Civ 5 giveaway

Postby micseydel » Fri Mar 14, 2014 12:14 am

If you're going to use long ugly lines, might I suggest this?
Code: Select all
winner = min((abs(choice-target), person) for person, choice in database.iteritems())[1]

Also, I can tell you meant for this to be transparent and fair, but as it stands, stranac is most likely to win at about 42% chance and mckryall most likely to lose with a mere 24% chance. People who jump in later can take advantage of this information. Might I suggest simply using random.choice() on a list of names?
Join the #python-forum IRC channel on irc.freenode.net!

Please do not PM members regarding questions which are meant to be discussed publicly. The point of the forum is so that others can benefit from it. We don't want to help you over PMs or emails.
User avatar
micseydel
 
Posts: 1443
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA

Re: Civ 5 giveaway

Postby stranac » Fri Mar 14, 2014 12:50 am

micseydel wrote:Also, I can tell you meant for this to be transparent and fair, but as it stands, stranac is most likely to win at about 42% chance and mckryall most likely to lose with a mere 24% chance.

I think you made a mistake there.
My chance of winning actually gets doubled because I used a scientific method to choose the number, so it's would be about 84%.
But I get extra 10% for awesomeness, and 5% from magical power of unicorns, so my victory is almost guaranteed.
micseydel wrote:Might I suggest simply using random.choice() on a list of names?

But that takes away from the fun of it, and it would waste my efforts for scientifically choosing the best number.
Also, I would only have about 60% chance to win if he went with your suggestion.
Friendship is magic!

R.I.P. Tracy M. You will be missed.
User avatar
stranac
 
Posts: 1217
Joined: Thu Feb 07, 2013 3:42 pm

Re: Civ 5 giveaway

Postby metulburr » Fri Mar 14, 2014 3:32 am

I probably should of kept the code used quit before numbers were chosen. I was expecting enough people for each to claim about a 100 numbers, but not enough people joined.

Actually I dont think the number guess is the fairest method, because the next two users can get the next number before and after you leaving you with one number, while they are claiming the numbers you expected to get. I just figured i would try something different than put your name in for random.choice()
New Users, Read This
OS Ubuntu 14.04, Arch Linux, Gentoo, Windows 7/8
https://github.com/metulburr
steam
User avatar
metulburr
 
Posts: 1512
Joined: Thu Feb 07, 2013 4:47 pm
Location: Elmira, NY

Re: Civ 5 giveaway

Postby hansn » Fri Mar 14, 2014 7:07 am

So is the bet still on? :roll:
If so I'm going for 231
Last edited by hansn on Fri Mar 14, 2014 7:44 am, edited 1 time in total.
hansn
 
Posts: 87
Joined: Thu Feb 21, 2013 8:46 pm

Re: Civ 5 giveaway

Postby metulburr » Fri Mar 14, 2014 7:20 am

yeah raffle still is on.
New Users, Read This
OS Ubuntu 14.04, Arch Linux, Gentoo, Windows 7/8
https://github.com/metulburr
steam
User avatar
metulburr
 
Posts: 1512
Joined: Thu Feb 07, 2013 4:47 pm
Location: Elmira, NY

Re: Civ 5 giveaway

Postby metulburr » Sat Mar 15, 2014 7:16 am

The winner is:
Code: Select all
Random number is: 70
Winner is: hansn with the number 231


EDIT:
raffle video
https://www.youtube.com/watch?v=bXmbMTv ... e=youtu.be

Congrats hansn
New Users, Read This
OS Ubuntu 14.04, Arch Linux, Gentoo, Windows 7/8
https://github.com/metulburr
steam
User avatar
metulburr
 
Posts: 1512
Joined: Thu Feb 07, 2013 4:47 pm
Location: Elmira, NY

Re: Civ 5 giveaway

Postby hansn » Sat Mar 15, 2014 11:21 am

:mrgreen: :mrgreen:
hansn
 
Posts: 87
Joined: Thu Feb 21, 2013 8:46 pm


Return to Bar

Who is online

Users browsing this forum: No registered users and 1 guest