Trivial changes to webpage
[progcomp2012.git] / web / doc / manager_manual.txt
index 239c6ac..5fc8d4e 100644 (file)
@@ -5,7 +5,7 @@ WARNING
        This program is still a work in progress. Consider it a Beta version.
 
 SYNOPSIS
        This program is still a work in progress. Consider it a Beta version.
 
 SYNOPSIS
-       stratego {[-gpirb] [-o output_file ] [-t stall_time] [-m max_turns] {red_player blue_player | -f input_file} | {-h | --help} }
+       stratego {[-gpirb] [-o output_file ] [-t stall_time] [-T timeout_time] [-m max_turns] {red_player blue_player | -f input_file} | {-h | --help} }
 
 DESCRIPTION
        stratego manages a game of Stratego. It stores the state of the board, and uses a simple protocol to interface with AI programs.
 
 DESCRIPTION
        stratego manages a game of Stratego. It stores the state of the board, and uses a simple protocol to interface with AI programs.
@@ -36,6 +36,8 @@ A WARNING ABOUT BUFFERING
        
 OPTIONS
        -g
        
 OPTIONS
        -g
+               NOTE: This switch only functions if stratego is built with graphics enabled. See BUILDING for more information.
+
                By default, graphics are disabled. If the -g switch is present, stratego will draw the game as it is played using SDL/OpenGL
                
        -p
                By default, graphics are disabled. If the -g switch is present, stratego will draw the game as it is played using SDL/OpenGL
                
        -p
@@ -67,6 +69,15 @@ OPTIONS
                
                It is tentatively planned to allow the user to enter various commands to alter the game or proceed to specified turns.
                However this is slightly complicated. So it might never be done.
                
                It is tentatively planned to allow the user to enter various commands to alter the game or proceed to specified turns.
                However this is slightly complicated. So it might never be done.
+
+       -T
+               By default, stratego allows AI programs 2 seconds to respond before declaring their move ILLEGAL due to a timeout.
+               If the -T switch is present, AI programs will be allowed timeout_time to respond before their move is declared ILLEGAL.
+
+               If timeout_time is negative or "inf", stratego will never declare moves illegal due to timeouts.
+       
+               Human players are never subject to timeouts.
+               
        -m
                By default, the game is declared a Draw after 5000 turns have ellapsed.
                Use this option to change the maximum number of turns.
        -m
                By default, the game is declared a Draw after 5000 turns have ellapsed.
                Use this option to change the maximum number of turns.
@@ -114,11 +125,12 @@ GAME RULES
 
                Each player's pieces are hidden from the other player. When two pieces encounter each other, the ranks will be revealed.
 
 
                Each player's pieces are hidden from the other player. When two pieces encounter each other, the ranks will be revealed.
 
-               The objective is to destroy all Enemy Pieces (#) or capture the Enemy Flag (also #).
+               The objective is to either destroy all enemy pieces except the Bombs and Flag, or to capture the Flag.
 
                Since 20/12 Bombs reflect the traditional rules; they are only destroyed by Miners.
                In previous versions contact of an attacker other than a Miner with a Bomb destroyed the Bomb as well as the attacking piece.
                
 
                Since 20/12 Bombs reflect the traditional rules; they are only destroyed by Miners.
                In previous versions contact of an attacker other than a Miner with a Bomb destroyed the Bomb as well as the attacking piece.
                
+               
 
 PROTOCOL
        In order to interface with stratego, an AI program must satisfy the following protocol. 
 
 PROTOCOL
        In order to interface with stratego, an AI program must satisfy the following protocol. 
@@ -145,16 +157,14 @@ PROTOCOL
                        as described in the GAME_RULES section. Each line ends with the newline character.
                        
 
                        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.
 
                        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
 
                        OUTCOME may be either OK, ILLEGAL, KILLS or DIES
                                OK - Move was successful
@@ -162,14 +172,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.
 
                                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]
        3. END GAME
                If the CONFIRMATION line is of the form:
                        QUIT [RESULT]
@@ -179,8 +182,10 @@ PROTOCOL
                
        
        4. TIMEOUTS
                
        
        4. TIMEOUTS
-               If a program fails to respond to a query within 2 (two) seconds, the game will end and that AI will be sent the ILLEGAL result.
+               If a program fails to respond to a query, the game will end and that AI will be sent the ILLEGAL result.
                Human players are not subject to the timeout restriction.
                Human players are not subject to the timeout restriction.
+
+               Please see the information on the -T switch.
                
                        
 
                
                        
 
@@ -216,6 +221,29 @@ EXIT/OUTPUT
 
        If an error occurs within stratego itself, an error message will be printed to stderr and return exit code 1.
        If possible, stratego will print the message "QUIT" to both AI programs, and they should exit as soon as possible.
 
        If an error occurs within stratego itself, an error message will be printed to stderr and return exit code 1.
        If possible, stratego will print the message "QUIT" to both AI programs, and they should exit as soon as possible.
+
+BUILDING
+       To build from source, simply run make in the source directory.
+       You will need the C pthread library (which should come with gcc)
+
+       stratego can be built with or without graphics enabled. By default, graphics are disabled.
+
+       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 "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 "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.
+
+       
        
 
 BUGS   
        
 
 BUGS   
@@ -242,5 +270,5 @@ NOTES
           irc://irc.ucc.asn.au #progcomp
 
 THIS PAGE LAST UPDATED
           irc://irc.ucc.asn.au #progcomp
 
 THIS PAGE LAST UPDATED
-       20/12/11 by Sam Moore
+       3/01/12 by Sam Moore
        
        

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