X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=web%2Fagent_text.html;h=aff9be50126ed5e1f5c95b219bd8b649c33780e4;hb=159708785516e4dd5a1ddceadd1e371f48dd3d23;hp=1bb5efc12cfcd7a128e1fdb28026924580a0b01a;hpb=baa4d9d6440dac63367a80b88b1c466deb9263a9;p=progcomp2013.git diff --git a/web/agent_text.html b/web/agent_text.html index 1bb5efc..aff9be5 100644 --- a/web/agent_text.html +++ b/web/agent_text.html @@ -12,13 +12,12 @@
Be sure to read and understand the rules before reading this page.
All agents (even python ones) are stand alone programs which qchess spawns instances of to play a game. Qchess sends state updates and requests moves from players through pipes. From the agent's point of view, all it has to do is read commands from stdin and respond to stdout.
-Note: Although pipes are pretty damn awesome, they unfortunately always get buffered by default, with a stupidly large size like 4KB. This means that it is unlikely a program will work unless it is able to unbuffer its stdin/stdout streams. In some languages this is trivial. In others it is probably impossible. If you want to use a language where it is impossible, please tell the organiser. Even if I have to rewrite half of the code dealing with external agents, I will make it work.
In the following, lines prefixed with "<< " indicate input to the agent, lines prefixed with ">> " indicate output.
+In the following, lines prefixed with "<< " indicate input to the agent, lines prefixed with ">> " indicate output.
The end line character is a unix new line character '\n'. There is no carriage return.
A token prefixed with '$' is taken to be variable, whilst all other tokens are to be interpreted literally.
@@ -26,7 +25,7 @@<< $colour
+<< $colour
Where:
<< SELECTION?
->> $x $y
-<< $x $y $index $type +
<< SELECTION?
+>> $x $y
+>> $x $y $index $type
Where:
<< MOVE?
->> $x $y
+<< MOVE?
+>> $x $y
If an agent selects a piece that cannot move, it will not receive this request before its next selection.
@@ -83,7 +82,7 @@<< $x $y $index $type
+<< $x $y $index $type
Where:
<< $x1 $y1 -> $x2 $y2
+<< $x1 $y1 -> $x2 $y2
Where:
Note: The token between the two pairs of co-ordinates is a minus sign followed by a greater than sign. It's supposed to look like an arrow, but in html it's a bit hard to see.
+<< QUIT
+<< QUIT
Where:
@@ -132,7 +133,7 @@Page last updated 2013-02-18 by matches
+Page last updated 2013-02-19 by matches