LessThanDot Site Logo

LessThanDot

A Technical Community for IT Professionals

Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary.

LTD Social Sitings

Lessthandot twitter Lessthandot Linkedin Lessthandot facebook Lessthandot rss

Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.

Highly Rated Users

Forum
No Posts Rated

Top 50
Given
Received

Forum Statistics

Users
Members:
1879
Members Online:
4
Guests Online:
102

Total Post History
Posts:
81451
Topics:
18716

7-Day Post History
New Posts:
0
New Topics:
0
Active Topics:
0

Our newest member
mwojcik

Other

FAQ
All times are UTC [ DST ]

rock paper scissors to the max

Mind Boggling Puzzles, to keep that grey matter in shape...
Forum rules
Always post answers in a "Hidecode" tag, so that others have a chance to answer the question too.
Please wait...

rock paper scissors to the max

Postby phillip1882 on Wed Mar 23, 2011 6:15 pm

your mission, should you chose to accept it, is to generate a program that plays a game of rock 0, paper 1, or scissors 2. no random functions allowed! the program should be entirely deterministic. (in other words if your program plays against the same opponent program more than once the sequence of moves should be the same.) your program will recieve a list of your opponent's previous moves, your previous moves, and the round number; there will be 50 rounds per match. the tourament will be round robin format, the program with the greatest number of victories will be declared the rock paper scissors champion.
User avatar
phillip1882
Apprentice
Apprentice
LTD Bronze - Rating: 22
 
Posts: 19
Joined: Mon Mar 14, 2011 11:05 pm
Location: florida
Unrated

Re: rock paper scissors to the max

Postby phillip1882 on Wed Mar 23, 2011 7:42 pm

here's my code for the tournament
Code is hidden, SHOW

hope this is to everyone's satisfaction. the code is in python but i'll accept a submission in any programming language so long as the code is readable.
User avatar
phillip1882
Apprentice
Apprentice
LTD Bronze - Rating: 22
 
Posts: 19
Joined: Mon Mar 14, 2011 11:05 pm
Location: florida
Unrated

Re: rock paper scissors to the max

Postby chrissie1 on Wed Mar 23, 2011 7:49 pm

I changed your post to have the code in hidecode tags. Hope you don't mind? and made it python.
pink fuzzy slippers
User avatar
chrissie1
Senior Guru
Senior Guru
LTD Gold - Rating: 2135LTD Gold - Rating: 2135LTD Gold - Rating: 2135LTD Gold - Rating: 2135LTD Gold - Rating: 2135
LTD Gold - Rating: 2135LTD Gold - Rating: 2135LTD Gold - Rating: 2135LTD Gold - Rating: 2135LTD Gold - Rating: 2135
LTD Gold - Rating: 2135LTD Gold - Rating: 2135
 
Posts: 9475
Joined: Wed Oct 10, 2007 7:18 pm
Location: Belgium
Unrated

Re: rock paper scissors to the max

Postby Thirster42 on Wed Mar 23, 2011 8:08 pm

i'll get back to you on this one.
Ask three DBAs a question, and you’ll get four different answers.

-Brent Ozar
User avatar
Thirster42
Guru
Guru
LTD Silver - Rating: 517LTD Silver - Rating: 517LTD Silver - Rating: 517LTD Silver - Rating: 517LTD Silver - Rating: 517
LTD Silver - Rating: 517LTD Silver - Rating: 517LTD Silver - Rating: 517
 
Posts: 4646
Joined: Tue Nov 11, 2008 5:49 pm
Location: Jefferson City, Mo
Unrated

Re: rock paper scissors to the max

Postby phillip1882 on Wed Mar 23, 2011 9:04 pm

thanks chrissie! :-)
here's my first submission: i doubbed it halfandhalf. :D
Code is hidden, SHOW
User avatar
phillip1882
Apprentice
Apprentice
LTD Bronze - Rating: 22
 
Posts: 19
Joined: Mon Mar 14, 2011 11:05 pm
Location: florida
Unrated

Re: rock paper scissors to the max

Postby phillip1882 on Tue Mar 29, 2011 1:56 am

anyone? anyone? bueller?
User avatar
phillip1882
Apprentice
Apprentice
LTD Bronze - Rating: 22
 
Posts: 19
Joined: Mon Mar 14, 2011 11:05 pm
Location: florida