Specifications
These are the specifications for the tournament version of "Capture
the Flag" for your review.
- The playing field consists of a 30 x 30 grid of positions.
- There are three types of objects:
- Persons on Teams. There will be two teams per game.
- Flags
- Walls, which may extend over several grid positions and are fixed in position.
- 3 players per team with 5 flags per team.
- You can move up, down, left and right by exactly one position
between states.
- You may not move outside the boundaries of the board.
- You may not occupy the same position as a wall, i.e. you will need
to move around them.
- There will be one home base.
- Players must return flags to base.
- Players must step on flags to pick them up, but only must be adjacent
to home base to drop it off.
- A person may carry zero or one flag.
- No two persons on your team may occupy the same space.
- Zero or more persons may move per turn.
- Two players may switch positions.
- The board is symmetric. One side gets randomly generated and then
flipped to complete the board. Players, flags, bases and walls get
placed randomly. You are guaranteed that the problem is solvable.
- You need to capture enemy flags and bring them back to your own
base. We will have team specific flags.
- If a flag gets returned to base, it re-spawns at its original
location.
- Players can be on the spawn point of the flags they are to catch.
- Players cannot be on the spawn point of the flags that they are to
defend.
- On your half of your board, running into an enemy player will
return them to the opponents base. If they carried a flag it will return to
its original position.
- A captured player needs to be freed by a teammate.
- Fog of war aspect: A player can see 4 spaces in each direction
with the corners missing. Fog-of-war only applies to visibility of
players, you will see all walls.
- You know the original position of the flag, but if a player
captures it, you only see it if the player is in your field of vision.
- You can see over walls.
- Everyone can see the spawn positions and the eight spaces immediately
adjacent to all bases and all flag spawn points at all times, whether
the flag is there or not.
- The point of view of each player consists of their own position as
well as spaces that are 4 or less spaces away, using Manhattan
distance. Graphically speaking, you can see an area the shape of a
diamond around your position.
The following specficiations are added to your software's performance:
- Each team gets a total of 3 minutes per game. You may decide how
much time you spend on a move.
- The server returns current score, when prompted. The score is the number
of flags you captured vs the number of flags your oponent captured.
- Send board data with your team as A and the opponents team as
B. See the protocol for details.
- The entire board state is sent as a string, with opponents that
are not in your field of view left out. See the protocol for details.