It is no longer run
It is a sort of ladder type tournament where you have to submit the source code for a bot- implemented as a Dll (Dynamics Link Libraries) to play the popular game : Rock Scissors Stone. (See below for details on how to play it). The weekly results will be updated each week and are found here:
To enter, you have to create a bot as a Dynamic Link Library in C, C++ or C# - skeleton source code is provided that you can adapt. The compiled dlls are run by a master program that plays all the matches and outputs results. Once a week your bot will fight a match of 100 hands against every other bot. All your wins will be totalled up and that determines your position for the next week.
The articles below provide detailed instructions and downloads so you can enter this contest.
- A General article about writing a bot for the contest
- How to Write a Bot in C and C++.
- How to Write a Bot in C#.
The Rules of Rock, Scissors Paper (RSP)Also known as Scissors, Paper, Stone, this is a simple game between two players. Both conceal a hand (usually behind the back), select a gesture for that hand where clenched fist is Rock, a V with first two fingers is Scissors and a flat hand represents Paper and then simultaneously show the two hands. Rock beats Scissors (blunts or breaks the blade!), Scissors beats Paper (cuts it) and Paper beats Rock (wraps it up).
Notes The program that coordinates matches and calls the dlls keeps tracks of past hands played in the current match. When it calls the dlls GetMove( function, it will pass in a string containing all of the opponents previous hands in this match. EG 'RSPRRSSP' where R=Rock, S= Scissors and P=Paper. This strings starts empty and is 99 characters long on the 100th hand.
Player EntriesWhen you first submit the bot dll source code you will be assigned an entry number and your files will be renamed skeleton23.c, skeleton42.cpp etc. I'll acknowledge each entry as it is submitted with your player number. You can re-submit new source code, but please make sure it uses this same player number. The most recent submitted entry will be used. Please do not send compiled code, just source code.
DLLS DetailsEach Dll has 6 functions. The C/C++ headers are shown below. The C# routines have the same name with strings not char *. Through the magic of C# Interopability, the MatchRunner application that I've written can load C# or C/C++ dlls at the same time.
From August 26 2007, a 2nd parameter will be added to GetMove()
SKELETON_API char * __cdecl GetBotName(void); // returns name of your Bot SKELETON_API char * __cdecl GetPlayerDetails(void); // returns name of your Bot SKELETON_API char * __cdecl GetBotDate(void); // return date of your bot (ie last change). SKELETON_API float __cdecl GetBotVersion(void); // return version of your bot SKELETON_API char __cdecl GetMove(char * Moves,char * MyMoves); // return move SKELETON_API int __cdecl GetSize(void); // return size SKELETON_API char * __cdecl DebugStr(void); // Use this for debugging your bot.
Try and think of an imaginative name for your bot but keep it under 20 characters long please and nothing naughty or bad. This is in the function GetBotName().
SKELETON_API char __cdecl GetMove(char * Moves,char * MyMoves);
Also, a test program is available for C and C++ entries so that you can run to test your dll and source code for C#. If that works with your dll, you can be sure that it should work in the contest.
RulesThis is for glory only. About.com does not permit prizes to be given.
Please submit your source code to the email@example.com email address with the subject line Ongoing Programming Challenge 1. It must compile with Microsoft Visual C++ 2005 Express Edition/Microsoft Visual Studio 2003/2005 or Borland Turbo C++ Explorer, Microsoft Visual C# 2005 Express Edition. If it doesn't compile, it can't be run so is automatically disqualified from this week's run. You can submit another entry at any time.
Please include your name, age (optional), blog/website url (optional) and country. Your email address will not be kept, used or displayed except to acknowledge your challenge entry. You can submit a new or changed bot each week.
Each week the results page, with the current state of the score board will be updated. It is a condition of entry that the source code for the #1 position program each week be made downloadable so that others can study it, learn from it and perhaps beat it.
Above all this is for fun, so enjoy it!