# RoShamBo Programming Competition

This topic is 5315 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

But, like the guy above me said, wouldn't your best strategy be to just make it completely random? I mean, I am a sucky programmer, but if I can just make a random robot and have an even chance of winning, what is going to stop me from killing off the toughest bot on the first round by unpredictable dumb luck?

##### Share on other sites
Well, a good bot would realize that your bot is completely random. So the good bot can then just output the exact same result every time, hence winning 66% of the time and beating the other bot.

##### Share on other sites
Quote:
 Original post by NietsnieSo the good bot can then just output the exact same result every time, hence winning 66% of the time and beating the other bot.

Its still a zero-sum game - even if one player is random, as long as the players choice is unknown, the odds will be fair, observe:

__| 1 | 2 | 3 |
1 |+0 |-2 |+2 | 0
2 |+2 |+0 |-2 | 0
3 |-2 |+2 |+0 | 0

____0___0___0

There is no saddle point, and the expected value of the game is 0. Assuming the player picks a random choice, and you always pick the same choice, the expected outcome is still 0.

You win by figuring out WHAT your opponent is going to choose, then choose the one that will make you win .
*hint: regressions, ANNs

EDIT: <TT> tags being a bitch

##### Share on other sites
Hmm... guess your right... I suck at probabilities/odds :)

Anyways, I think the points is you sumbit something that does more than output random numbers, because (as Mushu showed) it will finish around the middle of the pack.

##### Share on other sites
just playing around, trying to get an implementation of henny working (btw: it isnt so good except against rockbot) and nticed that you may want to add a cleanup function to the base bot, so that any dynamic memory can be freed. you can do it in the destructor, but its less elegant, imo.

##### Share on other sites
Bot->KickInNuts(Bot2, 50);
Bot2->KickInNuts(Bot, INT_MAX);

?

##### Share on other sites
To fix some warnings (I didn't even need -Wall to get these):

- "Reset()" should have a return type (I assume void)
- THROWS_PER_ROUND should have a type (I assume int)

Took me a while to get my first entry working properly (it seemed to work except it segfaulted at the end of the program run, some of the time - turns out I was calculating some bogus array indices because of putting the wrong variable somewhere ^^; ) but I have it done now. It beats all the easily beaten samples consistently, and is near a draw against the ones that aren't.

##### Share on other sites
If two bots both try and win by figuring out the opponent's stragegy, their own strategies will be modified... it sounds like you'd have to have a lot of rounds.
I still can't see that anything could beat a random-bot so why would you write anything else.
I'd say this is a weak contest compared to GDArena (what happened to that by the way - still going?)

Just my 2c though.

##### Share on other sites
http://www.cs.ualberta.ca/~darse/rsb-results1.html
Quote:
 Myth: Random (Optimal) can't be beat. The optimal strategy won't lose a match by a statistically significant margin, but it also won't win a match, regardless of how predictable the opponent is. Try winning a chess tournament by drawing every game! Moreover, the statement isn't even true in a more fundamental sense. Opportunistic strategies can be theoretically better, having positive expectation under more realistic assumptions. People interested in advanced game theory may enjoy the recent book "The Theory of Learning in Games" by Fudenberg and Levine.

##### Share on other sites
I've guaranteed there will be some bots that are not random (the sample bots) that can be beaten with a strategy. Thus, your bot can score better overall by taking advantage of those 'weak' bots. You might not be able to do well against RandomBot, but you don't really have to because there are many other bots to beat for good points. Perhaps I should also make a sample bot that does a very simple pattern analysis to take advantage of the bots so you HAVE to take advantage of something (or get lucky) to place above all the sample bots.

I plan on having at least 10000 rounds (as is currently in the framework), so you have quite a bit of time to adapt (ten times as much as in the international competition linked to in the OP). The number may be modified based on the speed of the bots (no more than 5 milliseconds per turn on average on my Athlon 2400+ w/ 640 MB PC2100 running Win XP Pro, but if all submissions take 5 milliseconds it might be a long while - an overnight run doesn't bother me tho)

N8dunn: Use the destructor. Adding a special cleanup function seems messy when there is already a standard way to do exactly that.

Zahlman: Fixed - Extrarius's RoShamBo Competition Framework v1.0.2. I set VS warings on highest as I should have done originally, and the only warnings I get are that the parameter isn't used in RegisterResult for some bots. If you'd like to do a -Wall compile and PM the warnings, I'd appreciate it. As I said, I'd like this to be platform independant aside from the few assumptions that are made for convenience.

I'm going on a small trip over the weekend, so I won't be here to make updates too long after this one until I get back late sunday.

As far as a deadline for the first matchup, how about all bots must be in before April 10th, 2005 1:00 AM Central Standard Time. EMail all entries to the address in the source (which has changed since the last version). You may make multiple unrelated entries, but if it is found that your bots cooperate, any or all of your submissions may be disqualified and future participation may be prohibited. If you send your bot and then decide you'd prefer a different version be used in the competition, send the different version before the deadline with text saying so.

I quite like the idea of an ongoing competition, but for the first few runs I think it probably needs to start off with a deadline to help give time to get a site up and running.

[Edited by - Extrarius on March 18, 2005 3:11:54 AM]

• ### Game Developer Survey

We are looking for qualified game developers to participate in a 10-minute online survey. Qualified participants will be offered a \$15 incentive for your time and insights. Click here to start!

• 12
• 30
• 9
• 16
• 12