Fixing simulate.py
[progcomp2012.git] / progcomp / judge / manager / manual.txt
index 3237241..239c6ac 100644 (file)
@@ -20,9 +20,19 @@ DESCRIPTION
                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.
-
        blue_player
                As red_player, except for controlling the Blue player.
+
+A WARNING ABOUT BUFFERING
+       The AI programs must unbuffer their stdin and stdout streams, otherwise it will be seen to be non-responsive.
+       If you C and you know a way to force the process started by exec() to have unbuffered stdin/stdout, please email the author.
+
+       In C or C++, unbuffering is accomplished with the following lines, which should appear near the start of main()
+               setbuf(stdin, NULL);
+               setbuf(stdout, NULL);
+       In python, unbuffering is accomplished by passing the -u switch to the interpreter, ie: The first line of a script reads:
+               #!/usr/bin/python -u
+       
        
 OPTIONS
        -g
@@ -74,7 +84,7 @@ OPTIONS
                
 
 GAME RULES
-               Each player controls up to 40 pieces on the Board. The pieces consist of the following:
+               Each player controls up to 40 pieces on the Board. The pieces are represented by the following characters:
 
                Piece   Name            Rank    Number  Abilities
                1       Marshal         1       1       Dies if attacked by Spy
@@ -84,11 +94,11 @@ GAME RULES
                5       Captain         5       4       
                6       Lieutenant      6       4
                7       Sergeant        7       4
-               8       Miner           8       5       Destroys Bombs without being killed
+               8       Miner           8       5       Destroys Bombs
                9       Scout           9       8       May move more through multiple empty squares
                s       Spy             10      1       If the Spy attacks the Marshal, the Marshal dies
-               B       Bomb            NA      6       Immobile. If any piece (except a Miner) encounters an enemy Bomb, both pieces are destroyed
-               F       Flag            NA      1       Immobile. If any piece encounters the enemy Flag, the controlling player wins.
+               B       Bomb            NA      6       Immobile. If any piece (except a Miner) attacks an enemy Bomb, that piece is destroyed.
+               F       Flag            NA      1       Immobile. If any piece attacks the enemy Flag, the controlling player wins.
 
                Additional pieces, not controlled by the player:
                Piece   Name                    Number  Notes
@@ -105,6 +115,9 @@ GAME RULES
                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 #).
+
+               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
@@ -205,13 +218,13 @@ EXIT/OUTPUT
        If possible, stratego will print the message "QUIT" to both AI programs, and they should exit as soon as possible.
        
 
-BUGS
-       WARNING:
-       stratego has been observed to segfault occassionally after the end of a game. It is not yet known what is causing these errors.
-       They appear to occur most often when the result is a draw, however they have been observed to occur under all exit conditions except the Illegal case. The result is still printed to stdout. However this bug _must_ be fixed before stratego can be used by simulation scripts.       
+BUGS   
+       Occasionally the result is not printed at the end of the game. 
+       So far this has only been observed to occur when RED wins the game by Flag capture.
 
        stratego is still a work in progress. Report another bug to the AUTHOR (see below).
 
+
 AUTHORS
        Sam Moore (for the UCC Programming Competition 2012) <[email protected]>
 
@@ -227,4 +240,7 @@ NOTES
  
        3. IRC Channel
           irc://irc.ucc.asn.au #progcomp
+
+THIS PAGE LAST UPDATED
+       20/12/11 by Sam Moore
        

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