ctf.agent
Class SecretAgent

java.lang.Object
  |
  +--ctf.agent.Agent
        |
        +--ctf.agent.SecretAgent

public class SecretAgent
extends Agent

A sample agent implementing the Agent interface. Your class should look similar to this, except it should be called "YourNetIDAgent".
This agent plays in a rather naive fashion. It has no notion of defense. It heads towards the enemy flag until it gets the flag, and then it heads back towards its own base. It can avoid some obstacles, but still gets stuck permanently in certain situations. It has no notion of its teammates or its enemies, so it doesn't try to avoid them at all.

Author:
Jason Rohrer

Field Summary
(package private)  boolean mCorrectEast
           
(package private)  double mCorrectEastDirection
           
(package private)  boolean mCorrectNorth
           
(package private)  double mCorrectNorthDirection
           
(package private)  boolean mCorrectSouth
           
(package private)  double mCorrectSouthDirection
           
(package private)  boolean mCorrectWest
           
(package private)  double mCorrectWestDirection
           
(package private)  boolean mDefence
           
(package private)  boolean mDefenceSet
           
(package private)  boolean mHaveFlag
           
(package private)  int mMaxObstHits
           
(package private)  int mMoveCount
           
(package private)  int mObstEastCount
           
(package private)  int mObstNorthCount
           
(package private)  int mObstSouthCount
           
(package private)  int mObstWestCount
           
(package private)  int mReverseCount
           
(package private)  boolean mReverseMode
           
(package private)  boolean mSeenGoal
           
 
Fields inherited from class ctf.agent.Agent
mFillColor, mLineColor
 
Constructor Summary
SecretAgent()
           
 
Method Summary
 int getMove(AgentEnvironment inEnvironment)
          Gets the agent's next move.
 
Methods inherited from class ctf.agent.Agent
drawIcon, setColor
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mDefence

boolean mDefence

mDefenceSet

boolean mDefenceSet

mObstNorthCount

int mObstNorthCount

mObstSouthCount

int mObstSouthCount

mObstWestCount

int mObstWestCount

mObstEastCount

int mObstEastCount

mMaxObstHits

int mMaxObstHits

mCorrectNorth

boolean mCorrectNorth

mCorrectNorthDirection

double mCorrectNorthDirection

mCorrectSouth

boolean mCorrectSouth

mCorrectSouthDirection

double mCorrectSouthDirection

mCorrectEast

boolean mCorrectEast

mCorrectEastDirection

double mCorrectEastDirection

mCorrectWest

boolean mCorrectWest

mCorrectWestDirection

double mCorrectWestDirection

mMoveCount

int mMoveCount

mReverseCount

int mReverseCount

mReverseMode

boolean mReverseMode

mSeenGoal

boolean mSeenGoal

mHaveFlag

boolean mHaveFlag
Constructor Detail

SecretAgent

public SecretAgent()
Method Detail

getMove

public int getMove(AgentEnvironment inEnvironment)
Description copied from class: Agent
Gets the agent's next move. Implement this method in a class that extends Agent.
Overrides:
getMove in class Agent
Tags copied from class: Agent
Parameters:
inEnvironment - the current agent-centric environment state.
Returns:
an action constant. Valid values are defined in AgentAction.