Enter the Rock Paper Azure Challenge from Windows XP

The Rock Paper Azure Challenge’s Grand Tournament is coming to a head on July 13th, 2011 when we will present the top 12 contestants with $8,500 in prizes. The challenge is to code a ‘bot’ that will play the childhood game Rock Paper Scissors against the ‘bots’ of every other contestant in the tournament. The coder of the top bot is going to receive $5,000! There’s barely 24 hours left to code your bot and enter the Grand Tournament.

Several folks interested in entering the challenge have indicated that they use Windows XP. The Windows Azure tools and developer emulator do not run on Windows XP. (Windows 7, Vista, or Server 2008 are required.) This may seem to present a ‘challenge’ to entering the challenge. However, have no fear! It’s completely possible to code a ‘bot’ and enter the Rock Paper Azure Challenge from Windows XP.

The main steps to enter the RPA Challenge are on the “Get Started” page. Below is a slightly modified set of instructions to enter if running Windows XP.

Step 1: Get Your Windows Azure Account

This step is the same regardless of your OS. If you have an existing Windows Azure account (such as the free access included in MSDN subscriptions), go ahead and use that. If not, register for your free, 30-day Windows Azure account. Visit WindowsAzurePass.com and be sure to use Promo Code PLAYRPA.

Note: Registering for a free trial through WindowsAzurePass.com may take up to 24-48 hours to complete.

Step 2: Deploy the Bot Lab

Part of the challenge involves compiling a ‘Bot Lab’ to test your bot code and then deploying that ‘Bot Lab’ to Windows Azure. This will give you experience using the Windows Azure Management portal to understand how application deployment works in the cloud.

The “Bot Lab” is an ASP.NET MVC website that includes an implementation of the game server logic that lets you test different bots against each other. It is effectively a ‘test harness’ for your bot code. The Bot Lab solution was created with the Windows Azure tools for Visual Studio to enable packaging for the cloud. It is designed to be run locally in the Windows Azure developer emulator or in the cloud on Windows Azure itself.

Building the solution in Visual Studio will produce a package (.cspkg) file containing the contents of the application and a configuration (.cscfg) file. The .cspkg and .cscfg files are what you upload to the Windows Azure Management portal to deploy.

Unfortunately, the Windows Azure tools and developer emulator do not run on Windows XP. Therefore, you will not be able to run the Bot Lab solution locally on Windows XP. Instead, we have provided a pre-compiled Bot Lab package (.cspkg) and configuration (.cscfg) file on the contest website. You can download them and then deploy directly to Windows Azure to run it and test you bot code in the cloud.

Step 3: Code Your Bot

After extracting the RPAClient.zip file, you will find two directories with Visual Studio solution files (.sln) in them: “BotLab” and “MyBot”. You can ignore the “Bot Lab” solution as you already deployed the pre-compiled Bot Lab in the last step. The “MyBot.sln” contains the project in which you will write you bot code.

At this point, you can open the MyBot.cs file in the C# project and code your bot! Be sure to see the brief screen cast in step 3 of the “Getting Started” page for some tips that will get you started. As you can see in the screenshot below, I’ve added some logic to track the points at stake in each hand by monitoring when there has been a tie on the previous hands.

Step 4: Upload Your Bot & Enter The Contest

So, you’ve coded your bot. Now it is time to upload it to your Bot Lab for testing, and finally to enter it in the Rock Paper Azure Challenge!

Open your Windows Azure-hosted Bot Lab by visiting the URL you gave it when deploying earlier. (For example: http://<yourURL>.cloudapp.net) If you forgot your Bot Lab’s URL, you can return to the Windows Azure Management portal and launch it from there.