Minor rule changes
authorSam Moore <[email protected]>
Mon, 9 Apr 2012 02:23:46 +0000 (10:23 +0800)
committerSam Moore <[email protected]>
Mon, 9 Apr 2012 02:23:46 +0000 (10:23 +0800)
simulate.py scores SURRENDER as 0 points for the surrendering AI, 3 points for its opponent.
SURRENDER can be sent instead of a normal move.

AIs must now place all 40 pieces during setup

agents/vixen/info
judge/manager/controller.cpp
judge/simulator/scores.plt
judge/simulator/simulate.py
judge/simulator/template.plt
web/doc/manager_manual.txt
web/oldindex.html

index 56945f6..59ec77b 100644 (file)
@@ -1,4 +1,4 @@
-vixen.py
+vixen.patched.py
 Sam Moore
 python
 Sample AI - An improvement on <a href=asmodeus.html>asmodeus'</a> score optimisation. Considers probabilities for unknown enemy units, and sums scores for paths with common first move.
index d268792..20b79aa 100644 (file)
@@ -62,6 +62,14 @@ MovementResult Controller::Setup(const char * opponentName)
        {
                return MovementResult::BAD_RESPONSE; //You need to include a flag!
        }
+       
+       //Added 9/04/12 - Check all pieces that can be placed are placed
+       for (int ii = 0; ii <= (int)(Piece::BOMB); ++ii)
+       {
+               if (usedUnits[ii] != Piece::maxUnits[ii])
+                       return MovementResult::BAD_RESPONSE; //You must place ALL possible pieces
+       }
+       
 
        return MovementResult::OK;
 
@@ -87,12 +95,15 @@ MovementResult Controller::MakeMove(string & buffer)
                buffer += " OK";
                return MovementResult::OK;
        }
+       */
+       //Restored SURRENDER 9/04/12, because... it kind of seems necessary?    
        if (buffer == "SURRENDER")
        {
                buffer += " OK";
                return MovementResult::SURRENDER;
        }
-       */
+
+
        
        int x; int y; string direction="";
        stringstream s(buffer);
index 67facbf..477ee90 100644 (file)
@@ -1,7 +1,7 @@
 set term png size 640,480
 set output "scores.png"
-set xtics 1
-set ytics 1
+#set xtics 1
+#set ytics 1
 set xrange [1:]
 set xlabel "Games Played"
 set ylabel "Score"
index 217a80e..b055945 100755 (executable)
@@ -51,7 +51,7 @@ if len(sys.argv) >= 5:
 
 
 #Score dictionary - Tuple is of the form: (end score, other score, other result) where end is the player on whose turn the result occurs, other is the other player, other result indicates what to record the outcome as for the other player.
-scores = {"VICTORY":(3,1, "DEFEAT"), "DEFEAT":(1,3, "VICTORY"), "SURRENDER":(1,3, "VICTORY"), "DRAW":(2,2, "DRAW"), "DRAW_DEFAULT":(1,1, "DRAW_DEFAULT"), "ILLEGAL":(-1,2, "DEFAULT"), "DEFAULT":(2,-1, "ILLEGAL"), "BOTH_ILLEGAL":(-1,-1, "BOTH_ILLEGAL"), "INTERNAL_ERROR":(0,0, "INTERNAL_ERROR"), "BAD_SETUP":(0,0,"BAD_SETUP")}
+scores = {"VICTORY":(3,1, "DEFEAT"), "DEFEAT":(1,3, "VICTORY"), "SURRENDER":(0,3, "VICTORY"), "DRAW":(2,2, "DRAW"), "DRAW_DEFAULT":(1,1, "DRAW_DEFAULT"), "ILLEGAL":(-1,2, "DEFAULT"), "DEFAULT":(2,-1, "ILLEGAL"), "BOTH_ILLEGAL":(-1,-1, "BOTH_ILLEGAL"), "INTERNAL_ERROR":(0,0, "INTERNAL_ERROR"), "BAD_SETUP":(0,0,"BAD_SETUP")}
 
 
 #Verbose - print lots of useless stuff about what you are doing (kind of like matches talking on irc...)
index 7efe965..04fee17 100644 (file)
@@ -1,7 +1,7 @@
 set term png size 640,480
 set output "[NAME].png"
-set xtics 1
-set ytics 1
+#set xtics 1
+#set ytics 1
 set xrange [1:]
 set xlabel "Games Played"
 set ylabel "Score"
index fc338ac..98a728b 100644 (file)
@@ -125,7 +125,7 @@ OPTIONS
                
 
 GAME RULES
-               Each player controls up to 40 pieces on the Board. The pieces are represented by the following characters:
+               Each player controls 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
@@ -152,13 +152,16 @@ GAME RULES
                Pieces may only move one square horizontally or vertically unless otherwise stated.
                Pieces may not move through squares occupied by allied pieces, or Obstacle (+) pieces.
                Pieces may move into squares occupied by Enemy Pieces (#), in which case the piece with the lower rank (higher number) is destroyed.
+               If the moved piece (attacker) has the lower rank, the stationary piece (defender) does _not_ move into the attacker's square.
 
                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 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.
+               Since 20/12/2011 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 9/04/2012 An AI must place ALL 40 pieces listed above, or its setup will be declared illegal
                
                
 
@@ -299,6 +302,8 @@ PROTOCOL
                                - ATTACKER_RANK and DEFENDER_RANK are the ranks of the attacking and defending piece respectively
                        - The moved piece attacked an opponent piece, and both pieces were destroyed: "BOTHDIE $ATTACKER_RANK $DEFENDER_RANK"
                                - ATTACKER_RANK and DEFENDER_RANK are the ranks of the attacking and defending piece respectively
+                       - Game ended due to the attacker capturing a flag: "VICTORY_FLAG"
+                       - Game ended due to the destruction of a player's last mobile piece (either attacker or defender): " 
 
                ROW1 -> ROW10 - The state of the board will be printed
                              - Each line represents a row on the board, from the top downwards
@@ -392,7 +397,7 @@ PROTOCOL
                ---------------------------------------------------
                Synopsis:
                ---------------------------------------------------
-               >> QUIT [RESULT]
+               >> QUIT [$RESULT]
                ---------------------------------------------------
                Explanation:
                ---------------------------------------------------
@@ -407,7 +412,22 @@ PROTOCOL
                Human players are not subject to the timeout restriction.
                ---------------------------------------------------
                Please see the information on the -T switch, and the "End Game" section above.
+
+       5. Resignation
+               ---------------------------------------------------
+               Description:
+               ---------------------------------------------------     
+               Instead of making a move, an AI program may resign.
+               ---------------------------------------------------
+               Synopsis:
+               ---------------------------------------------------
+               << SURRENDER
+               >> QUIT SURRENDER
+               ---------------------------------------------------
+               Explanation:
+               ---------------------------------------------------
                
+               ---------------------------------------------------             
                        
 
 EXIT/OUTPUT
@@ -494,5 +514,5 @@ NOTES
           irc://irc.ucc.asn.au #progcomp
 
 THIS PAGE LAST UPDATED
-       3/03/12 by Sam Moore
+       09/04/12 by Sam Moore
        
index 2a50bca..5d3fec7 100644 (file)
 <h2> Rounds and Events </h2>
 <ul>
        <li> 10th March 2012 - Progcomp Day - Sam will be in the UCC clubroom to explain stuff and help people </li>
-       <li> ?? - Preliminary Round 1 - Gives entrants a chance to test their AI against others. Not worth any points. </li>
-       <li> ?? - Preliminary Round 2 - Scores less than 0 are not counted. Scores above 0 are weighted by 0.1 </li>
-       <li> 14th May 2012 - Round 1 - The main event. </li>
+       <li> 28th April 2012 - Preliminary Round 1  </li>
+       <li> 5th May 2012 - Preliminary Round 2</li>
+       <li> 14th May 2012 - Finals - The main event. </li>
        <li> ?? - Winner and prize announcement - The creator of the AI with the highest score is the winner </li>
 </ul>
+<p> The scores for the preliminary rounds will contribute to 10% (each) of the final score. Scores less than zero in the preliminary rounds will not be counted. </p>
+<p> The finals will be worth the remaining 80% of the scores. </p>
+<p> Check out <a href="http://www.ucc.asn.au/infobase/events/"/>The UCC Events Page</a> where this and other interesting things are listed! </p>
 
 <h2> Sample AI Programs </h2>
 <p> Several sample AI programs are currently available. The sample programs can be downloaded from the <a href="http://git.ucc.asn.au/?p=progcomp2012.git;a=summary"/>git repository </a>
@@ -80,6 +83,7 @@
 <h2> Clarifications </h2>
 <ul>
        <li> We are using the newer rules described <a href="http://www.edcollins.com/stratego/stratego-rules-later.htm"/>here</a>. </li>
+       <li> When a piece "attacks" an enemy piece by moving onto its square, and is defeated, the defending piece will not move into the attacker's square. </li>
        <li> Scouts may move multiple spaces and attack in the same turn (in some versions they cannot). </li>
        <li> Bombs remain in place until destroyed by a Miner (some versions incorporate "single-use" Bombs). </li>
        <li> Victory is possible by either capturing the enemy Flag, or destroying all mobile enemy pieces.
        <li> The newest versions of the physical board game reverse the numbers of the ranks (10 is the Marshal, 1 is the Spy). Our system uses the original numbering (1 is the Marshal, 9 is the Scout and s is the Spy). </li>
        
        <li> You must always make a move. </li>
+       <li> You can surrender with "SURRENDER" </li>
        <li> <b>Remember to unbuffer stdin/stdout!</b> </li>
 </ul>
 
 <h2> Questions? </h2>
 <p> <a href="faq.html"/>Frequently Asked Questions</a> </p>
 <p> Please email matches@ or post to #progcomp with any questions not on that page. </p>
-<p> <b>Last webpage update: 03/02/12</b></p>
+<p> <b>Last webpage update: 09/04/12</b></p>
 </body>
 
 </html>

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