Author: Russell Reagan
Date: 14:14:30 07/27/03
Go up one level in this thread
On July 27, 2003 at 16:53:32, Maurizio De Leo wrote:
>Yes, I understand your complaints. Anyway, my pointer to Roshambo was for
>letting people discover useful material, not for advertising the competition.
I understand your intention. It is unfortunate though that they have complicated
matters, because all that is needed is a _very_ simple communication protocol,
such as:
new - start a new game
go - make your choice (rock, paper, or scissors)
<choice> - the player's choice, which is a string of either "rock", "paper",
or "scissors"
quit - exit the program
That is really all that is needed. They could add extra features if they wanted
to inform the computer player of how many moves the "match" was, how long the
player should take to play all of its moves, and so on. Even then, the size of
the protocol would still be very small. Creating a player would be nice and
simple.
// untested
#include <cstdlib>
#include <string>
#include <iostream>
using namespace std;
const char * choice_strings[3] = {
"rock",
"paper",
"scissors",
};
void main () {
bool running = true;
while (running) {
string input;
cin >> input;
if (input == "go")
cout << choice_strings[rand() % 3] << endl;
else if (input == "quit")
running = false;
}
}
>You can see that somewhere else in this thread people are "rediscovering the
>wheel". For example sicilian reasoning (using the usual decision algoritm and
>then make the opposite) or return to random play when losing to "cut the loss".
>
>These and a lot of other ideas are present inside the roshambo bots of various
>competition (a lot of which I think are freely available on the website) and I
>hope that they will be useful for the discussion evolvin about "guessing
>competition".
Thanks for your references to the game of RoShamBo. It seems there is a lot of
research already done in this area, and I personally think it's quite
interesting.
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.