Updated manual page for stratego
[progcomp2012.git] / web / doc / manager_manual.txt
index bd9f0e1..c93927e 100644 (file)
@@ -15,11 +15,18 @@ DESCRIPTION
        Unless the -h (--help) or -f switch is given, both red_player and blue_player must be supplied.
 
        red_player
-               Should be either a path to an executable file which will control the Red player, or "human".
-               If set to "human", stratego will request the user to make moves for the Red player using stdin.
-               NOTES
-                       1. There is no plan to support AI programs named "human". Deal with it.
-                       2. The graphical interface for human players is... basic. Deal with it.
+               Should be either a path to an executable file which will control the Red player, or "@human" or "@network[:IP_ADDRESS]"
+
+               If player is @human, then control will be given to a human, via stdin if graphics is disabled, or via "point and click" if graphics is enabled.
+               
+               If player is @network, then commands will be read from another copy of stratego accross the network.
+               In addition, commands from the other player will be sent accross the network to the connected stratego program.
+               
+               If no IP_ADDRESS is given, the program acts as the server, and accepts the first connection it receives.
+               If an IP_ADDRESS is given, the program attempts to connect as the client to the specified address.
+
+               Each player uses a different port; both players may be network controlled.
+                       
        blue_player
                As red_player, except for controlling the Blue player.
 
@@ -136,6 +143,10 @@ PROTOCOL
        In order to interface with stratego, an AI program must satisfy the following protocol. 
        Each query is followed by a newline, and responses are expected to be followed with a newline.
        The queries are recieved through stdin, and responses should be written to stdout.
+
+       "QUERY" describes the information sent to a program's stdin stream.
+       "RESPONSE" describes the form of the information that the program should immediately respond with, to stdout.
+       "CONFIRMATION" describes more information sent to the program's stdin stream, that the program should NOT respond to.
        
        1. SETUP
                QUERY: YOUR_COLOUR OPPONENT_ID BOARD_WIDTH BOARD_HEIGHT
@@ -157,16 +168,14 @@ PROTOCOL
                        as described in the GAME_RULES section. Each line ends with the newline character.
                        
 
-               RESPONSE: X Y DIRECTION [MULTIPLIER=1] | NO_MOVE
+               RESPONSE: X Y DIRECTION [MULTIPLIER=1] 
                        X and Y are the coords (starting from 0) of the piece to move
                        DIRECTION is either UP, DOWN, LEFT or RIGHT
                        MULTIPLIER is optional and only valid for units of type Scout. Scouts may move through any number of unblocked squares
                        in one direction.
 
-                       The AI program should print "NO_MOVE" if it is unable to determine a move.
-                       This will typically occur when the only pieces belonging to the AI program are Bombs and the Flag.
 
-               CONFIRMATION: X Y DIRECTION [MULTIPLIER=1] OUTCOME | NO_MOVE {OK | ILLEGAL} | QUIT [RESULT]
+               CONFIRMATION: X Y DIRECTION [MULTIPLIER=1] OUTCOME | QUIT [RESULT]
 
                        OUTCOME may be either OK, ILLEGAL, KILLS or DIES
                                OK - Move was successful
@@ -174,14 +183,7 @@ PROTOCOL
                                KILLS ATTACKER_RANK DEFENDER_RANK - The piece moved into an occupied square and killed the defender.
                                DIES ATTACKER_RANK DEFENDER_RANK - The piece moved into an occupied square and was killed by the defender.
 
-                       Most turns will be confirmed with: "X Y DIRECTION [MULTIPLIER=1] OUTCOME"
-
-                       A confirmation of "NO_MOVE OK" occurs when the AI program made no move for a legitimate reason.
-                       "NO_MOVE ILLEGAL" is printed if the AI program made no move for an illegitimate reason.
-
-                       If both AI programs successively make a "NO_MOVE" response, then the game will end.
-                       The player with the highest piece value will win, or a draw will be declared if the values are equal.
-
+                       QUIT will only be sent when the game is about to end.
        3. END GAME
                If the CONFIRMATION line is of the form:
                        QUIT [RESULT]
@@ -240,12 +242,14 @@ BUILDING
        To enable graphics:
        1. Ensure that the first line of the source file "graphics.h" reads:
                #define BUILD_GRAPHICS
-       2. In "Makefile", uncomment the line "CPP = g++ -Wall -pedantic -lSDL -lGL  -g" and comment out the line "CPP = g++ -Wall -pedantic -g"
+       2. In "Makefile", uncomment the line "LIBRARIES = -lSDL -lGL -lpthread" 
+               and comment out the line "LIBRARIES = -lpthread"
 
        To disable graphics:
        1. Comment out the first line of "graphics.h" i.e ensure that it reads:
                //#define BUILD_GRAPHICS
-       2. In "Makefile", uncomment the line "CPP = g++ -Wall -pedantic -g" and comment out the line "CPP = g++ -Wall -pedantic -lSDL -lGL  -g"
+       2. In "Makefile", uncomment the line "LIBRARIES = -lpthread" 
+               and comment out the line "LIBRARIES = -lSDL -lGL -lpthread"
 
        If you intend to build with graphics enabled, you will need the SDL and OpenGL developement libraries installed first.
        If you intend to use graphics, please ensure the "images" directory is located in the executable's run directory.
@@ -267,7 +271,7 @@ NOTES
        0. This program is still a work in progress and subject to changes.
        
        1. UCC Programming Competition 2012 Description
-          http://matches.ucc.asn.au/stratego/
+          http://progcomp.ucc.asn.au
 
        2. UCC Programming Competition 2012 Git repository
           git://git.ucc.asn.au/progcomp2012.git
@@ -277,5 +281,5 @@ NOTES
           irc://irc.ucc.asn.au #progcomp
 
 THIS PAGE LAST UPDATED
-       23/12/11 by Sam Moore
+       2/02/12 by Sam Moore
        

UCC git Repository :: git.ucc.asn.au