diff --git a/agents/vixen/info b/agents/vixen/info index 56945f648fce0b8af418a26aabf12cd1c40197f0..59ec77bf212201f005a0a12d906ce2395deb66d8 100644 --- a/agents/vixen/info +++ b/agents/vixen/info @@ -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. diff --git a/judge/manager/controller.cpp b/judge/manager/controller.cpp index d2687927e1301de5284af71f2dc0bafc05b4c806..20b79aa101328775c265e471db403817adce8b65 100644 --- a/judge/manager/controller.cpp +++ b/judge/manager/controller.cpp @@ -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); diff --git a/judge/simulator/scores.plt b/judge/simulator/scores.plt index 67facbf541b6363973600592f4e88a186b94f263..477ee908f2e8ec142009ccae690291696391395e 100644 --- a/judge/simulator/scores.plt +++ b/judge/simulator/scores.plt @@ -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" diff --git a/judge/simulator/simulate.py b/judge/simulator/simulate.py index 217a80eda54fc1cf96cd6ceec565563076206a48..b055945b67ae47e0e5cda478f920efe49baf964f 100755 --- a/judge/simulator/simulate.py +++ b/judge/simulator/simulate.py @@ -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...) diff --git a/judge/simulator/template.plt b/judge/simulator/template.plt index 7efe965a52f3ed48311fef6f47e38355879b49d9..04fee1764ca8c23bdc5bbf70a3a27d1cff947d7c 100644 --- a/judge/simulator/template.plt +++ b/judge/simulator/template.plt @@ -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" diff --git a/web/doc/manager_manual.txt b/web/doc/manager_manual.txt index fc338acf876fbaa2ac2077dbba5dedc7131784a5..98a728b2ae840a2ad9a4f6c66190250ae4b4ac63 100644 --- a/web/doc/manager_manual.txt +++ b/web/doc/manager_manual.txt @@ -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 diff --git a/web/oldindex.html b/web/oldindex.html index 2a50bca9b6cf32865ab725aadd1947857f576b40..5d3fec795dd694e9ef6c9e44cce792a4703bdce6 100644 --- a/web/oldindex.html +++ b/web/oldindex.html @@ -59,11 +59,14 @@ <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. @@ -87,13 +91,14 @@ <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>