Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Rock Paper Scissors Contest
Index -> Contests
Goto page Previous  1, 2, 3  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
MysticVegeta




PostPosted: Fri Nov 11, 2005 7:19 pm   Post subject: (No subject)

this is... impossible.... in 1 function Confused
Sponsor
Sponsor
Sponsor
sponsor
rizzix




PostPosted: Fri Nov 11, 2005 9:08 pm   Post subject: (No subject)

well not with a function of that signature.. (string -> string)
Hikaru79




PostPosted: Sat Nov 12, 2005 7:53 pm   Post subject: (No subject)

Randomness is often the best way to go, at least against human competitors!

In the 2003 Paper-scisors-rock World Championship, which was held that year in Jerusalem, a 13-year-old boy won the $300,000 grand prize. How'd he do it? Everyone else was coming up with l33t mind-reading strategies and double-think. The little boy did something simpler -- he converted Pi to base-3, and memorized the consecutive digits up until a point, and then used those as his throws (starting where he left off from the last game). The trick is that we humans are never *truly* random, and we can be double-guessed. The kids strategy was, however, random (for anyone who didn't know about his trick), and he won. Smile
MysticVegeta




PostPosted: Sat Nov 12, 2005 9:18 pm   Post subject: (No subject)

Hold on a second, There are Rock-Paper-Scissors contests?? hmm randomization (i dont think its a word) wusing pies, i can only think about eating pies right now lol. Yeah, Also i agree that random strings is the only way to go, but I read Hacker Dan's post before about how the computers have algorithms to generate random #s, is it ever possible to decode that?
Hikaru79




PostPosted: Sat Nov 12, 2005 10:08 pm   Post subject: (No subject)

MysticVegeta wrote:
Hold on a second, There are Rock-Paper-Scissors contests??

Oh, yeah. They have world championships, leagues, professional players, the works Razz Look here: http://www.worldrps.com/index.html
Tony




PostPosted: Sun Nov 13, 2005 2:44 am   Post subject: (No subject)

MysticVegeta wrote:
the computers have algorithms to generate random #s, is it ever possible to decode that?

computers don't generate random numbers. There are algorithms that generate numbers from a seed that appear to be random. Though if the same seed was to be supplied to the function, identical output will be produced.

The seed is usually taken from system's time variable, and modified by the generated output of the previous number.

I would imagine that it could be possible to guess at the seed, over a very large output sample, requiring massive processing power. One would have to know the process of seeding though.

Of course if the program was to reset its seed to system's time during the run, the attempt will be pointless.
Hikaru79




PostPosted: Sun Nov 13, 2005 10:57 am   Post subject: (No subject)

True, but there used to be computers that WERE able to produce truly random numbers, until manufacturers stopped implementing the technology. Smells of an NSA conspiracy, but whatever. Read this blog post to see what I mean.
MysticVegeta




PostPosted: Sun Nov 13, 2005 12:54 pm   Post subject: (No subject)

hmm i have a doubt about turing random # generation algorithm.
try this :
code:
put Rand.Int(1, 100)


Now Keep on pressing F1 fast. There are so many times when the Random #s are same. I think that has something to do with the milliseconds taken to execute or some value that doesnt change on a quick basis. Try it, dont you think?
Sponsor
Sponsor
Sponsor
sponsor
Martin




PostPosted: Sun Nov 13, 2005 8:37 pm   Post subject: (No subject)

http://en.wikipedia.org/wiki/Rock,_Paper,_Scissors

Presents from above.
md




PostPosted: Sun Nov 13, 2005 10:08 pm   Post subject: (No subject)

From what I remember reading in the linux kernel config intel (and someone else) do indeed put hardware random number generators in some of their products (I happen to have one... I think... I should really check). Besides even if you don't have a computer that comes stalk with a random number generator it's not like it's hard... just point a webcam at teh sky, and use a hash of whatever it captures as your seed; reset the seed 30 times a second and you're done!
Martin




PostPosted: Mon Nov 21, 2005 7:58 pm   Post subject: (No subject)

Alright guys, give me another week. I'll have the results for monday. My computer didn't come through yet, so yeah.
Mazer




PostPosted: Mon Nov 21, 2005 10:06 pm   Post subject: (No subject)

MysticVegeta wrote:
hmm i have a doubt about turing random # generation algorithm.
try this :
code:
put Rand.Int(1, 100)


Now Keep on pressing F1 fast. There are so many times when the Random #s are same. I think that has something to do with the milliseconds taken to execute or some value that doesnt change on a quick basis. Try it, dont you think?

I've explained it many times over the years. Try looking up "random number seeds", it has to do with what time it is when you run the program.
Martin




PostPosted: Sat Nov 26, 2005 9:47 am   Post subject: (No subject)

Alright guys, tomorrow's the day. Although I have a few entries, there aren't nearly enough.

It's incredibly easy to make a program, anyone can join.

So please. Have fun. Smile
Martin




PostPosted: Mon Nov 28, 2005 6:59 pm   Post subject: (No subject)

If nobody else is going to enter, I'm posting the results tonight.
Hikaru79




PostPosted: Mon Nov 28, 2005 10:13 pm   Post subject: (No subject)

Hm, I kinda missed out on this one Sad But if we have another one afterwards, can we slightly change the contest to :
code:

String doRockPaperScissors (String [] match)
where match is an array of every throw in the match so far? (Where a match consists of, say, 1000 games). This was we can do statistical analyses, etc. This is the way the "official" Paper-Scissors-Rock programming contest was held. It seems much more exciting that way Very Happy
Display posts from previous:   
   Index -> Contests
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 2 of 3  [ 32 Posts ]
Goto page Previous  1, 2, 3  Next
Jump to:   


Style:  
Search: