SamurAI 3x3 API. 1 Game Outline. 1.1 Actions of Samurai. 1.2 Scoring

Similar documents
EPIC ARMAGEDDON CHALLENGE

2 Textual Input Language. 1.1 Notation. Project #2 2

The Game of Hog. Scott Lee

SATURDAY APRIL :30AM 5:00PM

Special Notice. Rules. Weiss Schwarz Comprehensive Rules ver Last updated: September 3, Outline of the Game

Details of Play Each player counts out a number of his/her armies for initial deployment, according to the number of players in the game.

DC Tournament RULES June 2017 v1.1

LATE 19 th CENTURY WARGAMES RULES Based on and developed by Bob Cordery from an original set of wargames rules written by Joseph Morschauser

Special Notice. Rules. Weiß Schwarz (English Edition) Comprehensive Rules ver. 2.01b Last updated: June 12, Outline of the Game

Frontier/Modern Wargames Rules

BRONZE EAGLES Version II

On the day you also need to bring :

Operation Take the Hill Event Outline. Participant Requirements. Patronage Card

WARHAMMER 40K COMBAT PATROL

ASSAULT OBJECTIVES DEPLOYMENT HEXADOME SCORING ZONE END-GAME CONDITIONS. SCENARIOS v 1.3

ARMY LISTS AND CONSTRUCTION PREPARATION SPORTSMANSHIP. Tournament Guidelines

7:00PM 12:00AM

FRIDAY :: MARCH 24 ZONE MORTALIS #1

CONTENTS. 1. Number of Players. 2. General. 3. Ending the Game. FF-TCG Comprehensive Rules ver.1.0 Last Update: 22/11/2017

LATE 19 th CENTURY WARGAMES RULES Based on and developed by Bob Cordery from an original set of wargames rules written by Joseph Morschauser

Problem 2A Consider 101 natural numbers not exceeding 200. Prove that at least one of them is divisible by another one.

UTD Programming Contest for High School Students April 1st, 2017

::

2008 ACM ICPC Southeast USA Regional Programming Contest. 25 October, 2008 PROBLEMS

PASS Sample Size Software

Battle of Octavus Two-Five Tournament Packet

Aggression. Mary Jane O Neill, Stephanie Fan. August 6, 2013

Problem A. Alignment of Code

Halo Ground Command GT Missions

Problem A. Arithmetic Expression from an Integer

WARHAMMER 40K CHAMPIONSHIP

2017 ARRL January VHF Contest Rules

ARMY COMMANDER - GREAT WAR INDEX

MATH GAMES THAT SUPPORT SINGAPORE MATH GRADES

Steamroller 2010 Appendix

--- ISF Game Rules ---

Lightseekers Trading Card Game Rules

Caesar Augustus. Introduction. Caesar Augustus Copyright Edward Seager A board game by Edward Seager

Problem A. Worst Locations

n r for the number. (n r)!r!

Mythic Battles: Pantheon. Beta Rules. v2.8

Problem Darts Input File: DartsIn.txt Output File: DartsOut.txt Project File: Darts

Sponsored by IBM. 2. All programs will be re-compiled prior to testing with the judges data.

The Glory that was GREECE. Tanagra 457 BC

Dust Warfare: Tournament Rules

Learning Dota 2 Team Compositions

Primo Victoria. A fantasy tabletop miniatures game Expanding upon Age of Sigmar Rules Compatible with Azyr Composition Points

MATERIALS PROVIDED BY SCIENCE & TECH FAIR STAFF AT EVENT:

CONTENTS INTRODUCTION Compass Games, LLC. Don t fire unless fired upon, but if they mean to have a war, let it begin here.

UW-Madison's 2009 ACM-ICPC Individual Placement Test October 9th, 1:00-6:00pm, CS1350

CS61B, Fall 2014 Project #2: Jumping Cubes(version 3) P. N. Hilfinger

Theme & Rules. ABU Asia-Pacific Robot Contest 2009 Tokyo. Host Organising Committee. September 1st 2008

PASS Sample Size Software. These options specify the characteristics of the lines, labels, and tick marks along the X and Y axes.

Getting Started with Panzer Campaigns: Budapest 45

Unofficial Bolt Action Scenario Book. Leopard, aka Dale Needham

SATURDAY APRIL :30AM 5:00PM 7:00PM :00AM

WARHAMMER ANCIENTS DOUBLES TOURNAMENT

Titan Games and Hobbies AOS Tournament Rules

Irish Collegiate Programming Contest Problem Set

The US Chess Rating system

BOLT ACTION COMBAT PATROL

PFLI COMPETITION RULES AND GUIDELINES Revised as of February 15, 2015

DOMINATION PLAYER A PLAYER B

Henry Bodenstedt s Game of the Franco-Prussian War

Operation Deep Jungle Event Outline. Participant Requirements. Patronage Card

Comprehensive Rules Document v1.1

MIDDLE-EARTH IN FLAMES. This complete campaign is set around

For 2 to 6 players / Ages 10 to adult

BRITISH GO ASSOCIATION. Tournament rules of play 31/03/2009

a b c d e f g h 1 a b c d e f g h C A B B A C C X X C C X X C C A B B A C Diagram 1-2 Square names

ACM ICPC 2012 Asia Regional Contest Kharagpur Site

The goal of an escalation league is to gather new players, train existing players, and have fun while

Olympiad Combinatorics. Pranav A. Sriram

IEEE PSU Student Chapter Robotics Competition 2014/2015

Venue: The competition will be held at the Group North Historical Wargaming Society venue. This is the A.E. Martin Hall on Woomera Avenue, Penfield.

Problem A. Backward numbers. backw.in backw.out

Sudoku goes Classic. Gaming equipment and the common DOMINARI - rule. for 2 players from the age of 8 up

EDC Championship rules v1.3 As adapted for ECA European Dealer Championship. General

BATMATCH RULES BASIC RULES CREW LISTS SCORES PLAYER S RESPONSIBILITY OCT 2017 V1.0

Game Components double-sided level sheets showing 42 game levels as follows: 2 5 screens (transparent sheets).

2012 CORE RULEBOOK WELCOME TO HEROCLIX!

Round-robin Tournament with Three Groups of Five Entries. Round-robin Tournament with Five Groups of Three Entries

Eleventh Annual Ohio Wesleyan University Programming Contest April 1, 2017 Rules: 1. There are six questions to be completed in four hours. 2.

Checkpoint Questions Due Monday, October 7 at 2:15 PM Remaining Questions Due Friday, October 11 at 2:15 PM

2013 CORE RULEBOOK WELCOME TO HEROCLIX!

Operation Blue Metal Event Outline. Participant Requirements. Patronage Card

19 TH AUGUST, RD ICA

Royal Battles. A Tactical Game using playing cards and chess pieces. by Jeff Moore

COMPONENT OVERVIEW Your copy of Modern Land Battles contains the following components. COUNTERS (54) ACTED COUNTERS (18) DAMAGE COUNTERS (24)

Introduction. robovitics club, VIT University, Vellore Robo-Sumo Event Details v1.2 Revised on Jan-30, 2012

Batmatch Rules Nov 2018 v1.0

Figure 1: The Game of Fifteen

Warzone: Atlanta 2018 Mission Primer

15MM FAST PLAY FANTASY RULES. 15mm figures on 20mm diameter bases Large Figures on 40mm Diameter bases

When placed on Towers, Player Marker L-Hexes show ownership of that Tower and indicate the Level of that Tower. At Level 1, orient the L-Hex

RESERVES RESERVES CONTENTS TAKING OBJECTIVES WHICH MISSION? WHEN DO YOU WIN PICK A MISSION RANDOM MISSION RANDOM MISSIONS

Parent Packet. HAUPPAUGE MATH DEPARTMENT CCLS Grade 1 MODULE 5

Copyright Co m u n i d a d Epistémica d e Mé x i c o Ma y a Ch e s s The Game of the Gods

Figure 1: A Checker-Stacks Position

details of the payment. You will be ed when the payment is received.

Transcription:

SamurAI 3x3 API SamurAI 3x3 (Samurai three on three) is a game played by an army of three samurai with different weapons, competing with another such army for wider territory. Contestants build an AI program that decides the actions of one of the samurai that plays the game in cooperation with two other friend samurai. The performances of AI programs are evaluated through many games played with varying weapons and varying army combinations. This document specifies the input/output specification of AI programs for SamurAI 3x3 games. 1 Game Outline The game battlefield is either square or rectangular and mesh-partitioned into sections. The objective of the game is to expand their territories; the number of sections they occupy on the battlefield. The performance of AI programs are evaluated by the total points obtained through many games played with varying weapons and varying army combinations. 1.1 Actions of Samurai Each of the samurai are initially at their own home positions, and take actions in turn. AI programs are given information on the situation of (a part of) the battlefield, and decide actions in their turns. Actions include: moving around in the battlefield, attacking and occupying surrounding areas, hiding themselves from enemies eyes, and showing themselves again. Each action is associated with its cost and actions in one turn can be an arbitrary combination of actions within the given budget. Samurai has its own weapon (a spear, swords, or a battleax) on which the area occupied at a time depends. Enemy samurai in the occupied area are injured, brought back to their home positions, and cannot take actions for a certain number of subsequent turns. The information a samurai obtains are: 1.2 Scoring Each participating samurai receives the total of the following points after each game. 1. Winning points The army with most total occupied section is the winner. All the samurai in the winning army are awarded

winning points. The winning points is fixed, regardless of the margin of the victory. If two armies have the same number of total section, both teams receives half of the winning points. 2. Occupation points One occupation point is awarded to each individual samurai for every single section it occupies. 1.3 How Games Proceed A game consists of a sequence of turns, in each of which one samurai takes actions. Each action has an associated cost and the samurai can take a set of actions within a given budget in each turn. The decision of which actions to take are decided by the participating AI programs based on game state information. The samurai of each army, A and B, is identified by its weapon id, 0 through 2. Therefore, all the participating samurai are identified by A0, A1, A2, B0, B1, and B2. In each game, the participating samurai take their turns in the following order, which are repeated until the end of a game. A0 B0 B1 A1 A2 B2 B0 A0 A1 B1 B2 A2 The number of total turns in a single game is a multiple of 12, with the minimum of 12 turns and the maximum of 1008 turns. 1.4 Communication Summary The following figure depicts a summary of the communication between the game system and an AI program that controls a samurai. Game System AI Program At the Start of a Game [Game Information] total number of turns, army id, weapon id, field size, etc. [Acknowledgement] (within 100 ms) 0 Record the information and plot the strategy At one s turn [Turn Information] turn number, states of the battlefield and other samurai, etc. Analyze the situation and plan actions [Action Specification] (within 100 ms) Example: 1 6 9 0 Figure 1: Communication Summary

2 Representation of the Battlefield and Samurai 2.1 Battlefield Sections and Coordinates The battlefield of the game is mesh-partitioned to sections. Each section has two-dimensional coordinates,. The coordinate system is left-handed. With sections east-west and sections north-south, the northwest corner has the coordinates 0,0 and the southeast corner has 1, 1 as depicted in Figure 2 2.2 Weapons and Occupation Samurai can occupy battlefield sections around depending on its weapon. Figure 2: Battlefield Coordinates Figure 3 shows the IDs of weapons and the areas of their reach. Green circles in the figure show the positions of samurai and sections painted green can be occupied using the weapons. The figure shows areas when occupation actions are southward. Occupation can also be directed westward, eastward, and northward. 2.3 Samurai ID Two armies of three samurai play against each other, making a total of six participating samurai in each game. Each participating samurai are identified by a samurai ID in the AI program from its own perspective. Each of the three samurai of one army uses a different weapon, and thus each member can be identified by its weapon ID. Suppose a samurai in the friendly army uses a weapon with ID, then it has the samurai ID of, while the enemy samurai who uses same weapon has the ID 3. For example, if the samurai of the AI program uses a spear then it identifies itself with the samurai ID of 0, and a friendly samurai with a sword has the samurai ID of 1, while the samurai on the opposing army using the battle-axe has the samurai ID of 5. 3 AI Programs 3.1 Outline AI programs are initiated by the game system. On its initiation, the AI program receives the overall information and specification of the game (game information) from the standard input. The AI program then responds with an acknowledgement to the game system via the standard output, indicating that it is ready. After this initiation phase, the AI program will receive information on the state of the game (turn information) from the standard input when it is its turn to take action, and specifications of the actions that the AI program intends to take (action instructions) are written to the standard output. 3.2 Formats of Transferred Data 0:Spear 1:Sword 2:Battleax Figure 3: Weapons and Occupied Areas All the contents are represented in ASCII characters. Numerical values are decimal integers (a minus sign ( - ) in front of the number indicates a negative value). Decimal integers are delimited with blanks and

newlines. A sharp sign ( # ) indicates comments, and whatever follows until the end of the line are considered to be a part of the comment. 3.3 Time Limit AI programs should respond within the specified time limit. 1 Failing to meet the time limit disqualifies the samurai. The disqualified samurai will be returned and remain in the home position until the end of the game, and cannot perform any further action. 3.4 After Completing a Response The AI program will be suspended by the game system after completing its response until its next turn to take action. 4 Game Information Game information consists of the following in this order. 1. Total number of turns 2. Army ID 3. Samurai ID 4. Battlefield size 5. Recovery period 6. Home positions 7. Army composition Details are described in the following subsections. 4.1 Total Number of Turns The total number of turns is the number of turns played in a single game. On each turn, one of the participating samurai take a number of actions within its given budget. The total number of turns is always a multiple of twelve and thus all the six samurai has the same number of turns to take actions in each game. 4.2 Army ID If the samurai of the AI program belongs to the army A, then has the army ID of 0, and if it belongs to B, then it has the army ID of 1. Combining the army ID and the samurai ID specified in the following subsection, the AI can deduce the samurai's turn to make its action. 4.3 Samurai ID The samurai ID is the ID of the samurai whose turn it is to perform its actions. The possible value of the specified samurai ID is one of 0, 1, or 2, which is the ID of the weapon the samurai is using. 1 The time limit is planned to be 100 milliseconds, but is subject to change depending on the platforms. This is not CPU time but wall-clock time elapsed after the game management system sent information to an AI until the game system finishes receiving the response.

4.4 Battlefield Size The battlefield size is specified two integers and h. Here, is the number of sections in the east-west way and h is north-south. Both and h are between 10 and 20, inclusive. 4.5 Recovery Period The recovery period is the number of turns injured samurai have to take rests before they can take actions again. The period is the same for all the samurai in a game and is between 12 and 48, inclusive. 4.6 Home Positions Home positions give coordinates of home positions of all six samurai in the order of samurai IDs, each in two integers and meaning the position,. Home positions are initial positions of samurai. They are at sections on one (or two) of the outer edge(s) of the battlefield. The sections which are the home positions of samurai are already occupied by the corresponding samurai, and can never be occupied by any other samurai. 4.7 Army Composition Army composition is information on performance shown so far by all six samurai participating in the game. For each samurai, two integers, the rank and score sum up to the game just before. These are given for all six samurai in the order of their ID, and thus there will be twelve integers. The rank is the rank of the samurai among all the samurai participating in the tournament, not only those participating in this game. The score sum is the total of the score the samurai obtained so far. The highest rank is zero. When there are more than one samurai with the same score sum, they have the same rank. On the very first game of a tournament, all the samurai have their rank and score sum of both zero. 4.8 Game Parameters Game parameters such as battlefield sizes and home positions of samurai are decided for each tournament, but remains the same for all the games in one tournaments. They are noticed to the participants before submissions of AI programs. 2 2 Battlefield sizes and home positions are given in the game information so that the same software can be used on different tournaments with different parameters.

4.9 Game Information Example Figure 4 shows an example of game information. Lines starting with # are comments. The second line says that there will be total of 192 turns in the game, the samurai to control belongs to the army A and has weapon 2 (a battleax), the battlefield has the size of 15 15, and the cure period is 24. Six lines starting from the fourth tells the home positions. As the samurai to control has its ID 2, its home position is at 9,14. Six line starting from the eleventh gives the army composition. The samurai to control had rank 4 (as the highest rank is 0, it means the fifth position) and score sum of 31. # Game Info 192 1 2 15 15 24 # Home positions 0 5 0 14 9 14 14 9 14 0 5 0 # Ranks and scores of samurai 3 40 7 24 4 31 1 80 0 93 6 28 Figure 4: Game Information Example 5 Acknowledgement Response to the Game Information Receiving the game information, the AI program should return an integer zero and a newline to acknowledge it. This may include comments and extra spaces, but the total of characters should not exceed 100. The acknowledgement response should be made within the time limit, or else the samurai will be disqualified. 6 Turn Information Turn information consists of the following in this order. 1. Turn number 2. Recovery period 3. Samurai states 4. Battlefield states Details are discussed below. 6.1 Turn number Turn number is the sequential number of the turn for which the actions of the samurai should be planned. Turn numbers start with zero and is less than the total number of turns. 6.2 Recovery period When a samurai is injured by an enemy attack, it is immediately brought back to its home position and, for a certain number of turns, it cannot make any actions for recovery. Although no actions can be taken, the samurai can observe the battlefield states during this period. Recovery period tells how many more turns this recovery period will continue. If the samurai is not injured, it is zero and immediate actions are possible.

6.3 Samurai States Samurai states are information of all six samurai immediate before the turn. As information for one samurai is three integers, showing its current position and status, there are twelve integers in total. The current position has two integers and, which gives the coordinates, of the samurai before the turn. Positions of friendly samurai are always found, but those of enemy samurai cannot be found when they are out of the vision of all friendly samurai or they are hiding. For such samurai, their current positions are indicated as two 1. The status is whether or not the samurai is hiding itself. For friendly samurai, it is 1 when it is hiding and 0 otherwise. For enemies, you cannot tell whether they are hiding or simply out of the vision. The hiding status of 1 is given in either case. The status of a disqualified samurai is 1 for both friendly and enemy samurai. 6.4 Battlefield State Battlefield state gives occupation states of battlefield sections. The state of a section is given as a single integer. They are given in the ascending order of and axes, as h integers. Not all the sections are provided with their state information. Only those in the vicinity of friendly samurai are visible. The sections for which information are provided are those within the Manhattan distance of 5 from the positions of friendly samurai, that are, with a friendly samurai is at,, sections at, for 5 (Figure 5). Even if a samurai is in recovery or is disqualified, it can provide battlefield state information around its position (which is its home position). Information on each section is encoded as follows. 0 to 5: This section was last occupied by a samurai with that samurai ID. Figure 5: Field of Vision 8: Not occupied with any samurai yet. 9: No information is provided as there are no friendly samurai nearby.

6.5 Turn Information Example An example of turn information is shown in Figure 6. 7 Action Specification A samurai can be instructed to take any of the following ten actions of four categories within their cost sum of seven. # Turn information # <turn> 12 # <cure period> 0 # Samurai states 0 6 1 1 14 1 9 12 1-1 -1 1-1 -1 1-1 -1 1 # Battle field states 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 8 9 9 9 9 9 9 9 9 9 9 9 9 9 9 8 8 9 9 9 9 9 9 9 9 9 9 9 9 9 8 8 8 9 9 9 9 9 9 9 9 9 9 9 9 8 8 8 8 9 9 9 9 9 9 9 9 9 9 9 8 0 0 0 0 9 9 9 9 9 9 9 9 9 9 0 8 8 8 8 8 9 9 9 9 9 9 9 9 9 0 8 8 8 8 9 9 9 9 8 9 9 9 9 9 0 8 8 8 9 9 9 9 8 8 3 9 9 9 9 0 8 8 9 9 9 9 8 8 8 8 8 9 9 9 8 8 8 9 9 9 8 8 8 8 8 8 8 9 9 8 8 8 8 9 8 8 8 2 8 2 8 8 8 9 1 1 8 8 8 8 8 8 2 2 2 8 8 8 8 1 1 1 8 8 8 8 8 2 2 2 8 8 8 9 8 1 1 1 8 8 8 8 2 2 2 8 8 9 9 Occupy (1 through 4; cost 4): Occupies neighboring sections. The sections occupied are decided by the weapon used and the direction to apply it. The sections that can be occupied are shown in Figure 3. Directions to apply the weapon is specified as 1 for southward, 2 for eastward, 3 for northward, and 4 for westward. Occupation actions cannot be made while hiding. Move (5 through 7; cost 2): Moves to one of the adjacent sections. If the samurai is not hiding itself, it cannot move to a sections in which a non-hiding samurai is in. A samurai hiding itself can only move to a section already occupied by one of the friend samurai. The move direction is specified as 5 for southward, 6 for eastward, 7 for northward, and 8 for westward. Hide (9; cost1): Hides itself. Only possible when the samurai is in a section occupied by a friendly samurai Figure 6: Turn Information Example (including itself). Show (10; cost 1): Stop hiding itself. A samurai cannot stop hiding if there is another non-hiding samurai in the same section. Action specification consists of a list of integers indicating the above actions, with their total cost not exceeding the give amount of budget 7, and terminates with a zero. For example, an action specification consisting of a single 0 indicates that no actions are to be made. When an invalid action, such as moving out of the battlefield or into an enemy territory while hiding itself, such an action and any following actions instructed for the same turn are invalidated, although action instructions prior to it are effective. When the total cost of the actions exceed the given budget, action instructions up to their total cost of seven are valid, and the rest are invalid. Action specification for one turn should not exceed one hundred characters, and the samurai will be disqualified if this is violated. The AI programs are still required to give action specification even if it is in the recovery period, and the samurai will be disqualified if the AI program fails to give any action specification. An example of action specification is given in Figure 7. This specifies three actions, southward occupation, followed by a move eastwards, and then followed by hiding. The sum of the costs of actions is seven in this case. # Sample actions 1 6 9 0 Figure 7: Action Spec. Example

8 Miscellaneous In the acknowledgement response to the game information or the action specifications, any content following the terminating 0, including comments, will not be processed. The unprocessed contents will show up as the output of the AI program in its next turn, so it might cause the program to act unpredictably. AI programs will be terminated by the game system. Therefore, the AI programs are not required to process its own termination.