cz.cuni.pogamut.Client
Class AgentMemory

java.lang.Object
  extended by cz.cuni.pogamut.Client.AgentMemory
All Implemented Interfaces:
Inventory, Knowledge, RcvMsgListener, RecentMemory, WorldView, java.util.EventListener

public class AgentMemory
extends java.lang.Object
implements WorldView, RecentMemory, Inventory, Knowledge, RcvMsgListener

AgentMemory is taking care of implementation of WorldView and RecentMemory interfaces hence it uses History and methods are queries to History object

WorldView

RecentMemory

Another offered service is Inventory - methods to work with inventory, like add weapons, get weapon of some kind, usability of ammo, getBetterWeapon (according to player and enemy possition) etc.


Field Summary
private  Agent agent
           
private  Flag<java.lang.Integer> armor
           
private  AgentBody body
           
private  Flag<java.lang.Integer> currentAmmo
           
private  GameInfo gameInfo
           
private  Flag<java.lang.Integer> health
           
private  KnownItems knownItems
           
private  KnownNavPoints knownNavPoints
           
private  KnownPlayers knownPlayers
           
private  Flag<Triple> location
           
 boolean memoryRestarted
          if memory is restared, it creates a copy of memory and switch it with the obsolete one once it is ready for switch Switch is called in agent.run() when it is checking, whether memory is restarted or not.
private static int MOVING_MIN_VELOCITY
           
private  History myHistory
           
private  AgentInventory myInventory
           
private  Flag<java.lang.String> name
           
private  History newMyHistory
           
private  AgentInventory newMyInventory
           
private  java.util.logging.Logger platformLog
           
private  Flag<Triple> rotation
           
private  Flag<java.lang.Boolean> shooting
           
private  Flag<java.lang.Integer> team
           
private  Flag<Triple> velocity
           
private  Flag<java.lang.String> weapon
           
private static Triple zeroTriple
           
 
Constructor Summary
AgentMemory(java.util.logging.Logger logger, AgentBody body, Agent agent)
           
 
Method Summary
 java.util.HashMap<java.lang.Integer,java.lang.Double> allPlayersScores()
          get scores of all players
private  java.util.Set asSet(java.lang.Object[] objects)
           
protected  void clearListeners()
          Call at the end of the agent run to remove all listeners inside objects flags.
 Agent getAgent()
           
 int getAgentAlternativeAmmo()
          get agent alternative ammo for current weapon
 int getAgentAmmo()
          get agent ammo for current weapon
 int getAgentArmor()
          get agent armor from agent status
 int getAgentHealth()
          get agent health from agent status
 int getAgentID()
          get agent unique integer identifier from agent status
 boolean getAgentIsMoving()
          true if agent is moving
 Triple getAgentLocation()
          get agent location from agent status
 java.lang.String getAgentName()
          get agent name from agent status
 Triple getAgentRotation()
          get agent rotation from agent status
 double getAgentScore()
          get agent score - number of agents killed by him
 int getAgentTeam()
          get agent team from agent status
 double getAgentTeamScore()
          get agent team score
 java.lang.String getAgentUnrealID()
          get agent Unreal ID from agent status
 Triple getAgentVelocity()
          get agent velocity from agent status
 java.util.Collection<MessageObject> getAllFromCurrentBatch(MessageType type)
          Get all message of desired type from history.
 java.util.ArrayList<AddWeapon> getAllWeapons()
          provides an access to weapons
NOT SYNCHRONIZED!!!
 AddWeapon getAnyWeapon()
          get any loaded weapon from directory
 Flag<java.lang.Integer> getArmor()
           
 AutoTraceRay getAutoTrace(int ID)
          get auto-trace result according to supplied id
 java.util.ArrayList<java.lang.Integer> getAutoTraceIDs()
          obtain list of auto-trace message IDs from last batch
 java.util.ArrayList<AutoTraceRay> getAutoTraces()
          obtain list of auto-trace messages from last batch
 AddWeapon getBetterWeapon(Triple from, Triple to)
          Search inventory for better weapon - this is done according to distance between triples supplied as parameters.
 AgentBody getBody()
           
 ZoneChangedBot getBotZoneChanged()
          obtain full information about the zone change of agent- Id - by parsing Id user can obtain additional information
 java.util.ArrayList<AddWeapon> getCopyOfAllWeapons()
          obtain a copy of the structure in which inventory stores items
 Flag<java.lang.Integer> getCurrentAmmo()
           
 AddWeapon getCurrentWeapon()
          returns current agent weapon
 FlagInfo getEnemyFlag()
          true if agent holds the flag
 FastTrace getFastTraceResult(int id)
          get trace result of specified id - each trace is sent with unique user-defined ID
 ZoneChangedFoot getFootZoneChanged()
          obtain full information about the zone change of agent foot - Id - by parsing Id user can obtain additional information
 MessageObject getFromMyHistory(MessageType type)
          Get first message of desired type from history.
 GameInfo getGameInfo()
           
 ZoneChangedHead getHeadZoneChanged()
          obtain full information about the zone change of agent head - Id - by parsing Id user can obtain additional information
 Flag<java.lang.Integer> getHealth()
           
 boolean getHearNoise()
          identifies whether agent hear something
 boolean getHearPickUp()
          identifies whether agent hear a pick up noise
 java.util.ArrayList<Ammo> getKnownAmmos()
           
 java.util.Map<java.lang.String,Ammo> getKnownAmmos(java.lang.String[] unrealIds)
          Returns map
 java.util.ArrayList<Armor> getKnownArmors()
           
 java.util.Map<java.lang.String,Armor> getKnownArmors(java.lang.String[] unrealIds)
          Returns map
 java.util.ArrayList<Extra> getKnownExtras()
           
 java.util.Map<java.lang.String,Extra> getKnownExtras(java.lang.String[] unrealIds)
          Returns map
 java.util.ArrayList<Health> getKnownHealths()
           
 java.util.Map<java.lang.String,Health> getKnownHealths(java.lang.String[] unrealIds)
          Returns map
 java.util.ArrayList<Item> getKnownItemsOfType(MessageType type)
           
 java.util.ArrayList<NavPoint> getKnownNavPoints()
           
 java.util.Map<java.lang.String,NavPoint> getKnownNavPoints(java.lang.String[] unrealIds)
          Returns map
 java.util.ArrayList<Player> getKnownPlayers()
           
 java.util.ArrayList<Special> getKnownSpecials()
           
 java.util.Map<java.lang.String,Special> getKnownSpecials(java.lang.String[] unrealIds)
          Returns map
 java.util.ArrayList<Weapon> getKnownWeapons()
           
 java.util.Map<java.lang.String,Weapon> getKnownWeapons(java.lang.String[] unrealIds)
          Returns map
 Flag<Triple> getLocation()
           
 AddWeapon getMeleeWeapon()
          returns melee weapon, if there is not a single one, returns null!!!
 FlagInfo getMyFlag()
          true if agent holds the flag
 Flag<java.lang.String> getName()
           
 double getOpposingTeamScore()
          get opposing team score
works only with two teams
 int getPlayerCount(int team)
          Returns number of players in 'team'.
 double getPlayerScore(int id)
          get score of agent of specified id - number of agents killed by him
 AddWeapon getRangedWeapon()
          returns ranged weapon, if there is not a single one, returns null!!!
 Flag<Triple> getRotation()
           
 Ammo getSeeAmmo()
          get first visible ammo agent sees
 Ammo getSeeAmmo(java.lang.String UnrealID)
          to get an object of UnrealID if it is visible
 java.util.ArrayList<Ammo> getSeeAmmos()
          get list of visible ammos around the agent
 boolean getSeeAnyAmmo()
          true if agent sees any ammo around
 boolean getSeeAnyArmor()
          true if agent sees any armor around
 boolean getSeeAnyDomPoint()
          true if agent sees any domination point around
 boolean getSeeAnyEnemy()
          true if bot sees any enemy
 boolean getSeeAnyExtra()
          true if agent sees any extra around
 boolean getSeeAnyFriend()
          true if bot sees any friend
 boolean getSeeAnyHealth()
          true if agent sees any health around
 boolean getSeeAnyItem()
          true if agent sees any item around
 boolean getSeeAnyMover()
          true if agent sees any mover around
 boolean getSeeAnyNavPoint()
          true if agent sees any navigation point around
 boolean getSeeAnyPlayer()
          true if bot sees any player
 boolean getSeeAnyReachableAmmo()
          true if agent sees any ammo around
 boolean getSeeAnyReachableArmor()
          true if agent sees any armor around
 boolean getSeeAnyReachableExtra()
          true if agent sees any extra around
 boolean getSeeAnyReachableHealth()
          true if agent sees any health around
 boolean getSeeAnyReachableItem()
          true if agent sees any item around
 boolean getSeeAnyReachableNavPoint()
          true if agent sees any navigation point around
 boolean getSeeAnyReachableWeapon()
          true if agent sees any weapon around
 boolean getSeeAnyWeapon()
          true if agent sees any weapon around
 Armor getSeeArmor()
          get first visible armor agent sees
 Armor getSeeArmor(java.lang.String UnrealID)
          to get an object of UnrealID if it is visible
 java.util.ArrayList<Armor> getSeeArmors()
          get list of visible armors around the agent
 DominationPoint getSeeDomPoint()
          get first visible domination point agent sees
 Player getSeeEnemy()
          get first visible enemy
 Extra getSeeExtra()
          get first visible extra agent sees
 Extra getSeeExtra(java.lang.String UnrealID)
          to get an object of UnrealID if it is visible
 java.util.ArrayList<Extra> getSeeExtras()
          get list of visible extras around the agent
 Player getSeeFriend()
          get first visible friendly player
 Health getSeeHealth()
          get first visible health agent sees
 Health getSeeHealth(java.lang.String UnrealID)
          to get an object of UnrealID if it is visible
 java.util.ArrayList<Health> getSeeHealths()
          get list of visible healths around the agent
 Item getSeeItem()
          get first visible item agent sees
 Item getSeeItem(int itemID)
          indicate whether item of supplied ID is visible
 Item getSeeItem(java.lang.String UnrealID)
          to get an object of UnrealID if it is visible
 java.util.ArrayList<Item> getSeeItems()
          get list of visible items around the agent
 Mover getSeeMover()
          get first visible mover agent sees
 Mover getSeeMover(int moverID)
          indicate whether mover of supplied ID is visible
 Mover getSeeMover(java.lang.String UnrealID)
          to get an object of UnrealID if it is visible
 java.util.ArrayList<Mover> getSeeMovers()
          get list of visible movers around the agent
 NavPoint getSeeNavPoint()
          get first visible navigation point agent sees
 NavPoint getSeeNavPoint(int navPointID)
          Returns navpoint with navPointID, if it is currently visible, null otherwise.
 NavPoint getSeeNavPoint(java.lang.String UnrealID)
          to get an object of UnrealID if it is visible
 java.util.ArrayList<NavPoint> getSeeNavPoints()
          Returns only visible NavPoints (NavPoints the agent sees).
 Player getSeePlayer()
          get first visible player
 Player getSeePlayer(int playerID)
          get Player if he is visible
 Player getSeePlayer(java.lang.String UnrealID)
          to get an object of UnrealID if it is visible
 java.util.ArrayList<Player> getSeePlayers()
          get all visible players
 Ammo getSeeReachableAmmo()
          get first visible ammo agent sees
 java.util.ArrayList<Ammo> getSeeReachableAmmos()
          get list of visible ammos around the agent
 Armor getSeeReachableArmor()
          get first visible armor agent sees
 Health getSeeReachableHealth()
          get first visible health agent sees
 NavPoint getSeeReachableNavPoint()
          get first visible navigation point agent sees
 java.util.ArrayList<NavPoint> getSeeReachableNavPoints()
          get list of visible navigation points around the agent
 Weapon getSeeReachableWeapon()
          get first visible weapon agent sees
 java.util.ArrayList<Weapon> getSeeReachableWeapons()
          get list of visible weapons around the agent
 Weapon getSeeWeapon()
          get first visible weapon agent sees
 Weapon getSeeWeapon(java.lang.String UnrealID)
          to get an object of UnrealID if it is visible
 java.util.ArrayList<Weapon> getSeeWeapons()
          get list of visible weapons around the agent
 Flag<java.lang.Boolean> getShooting()
           
 Flag<java.lang.Integer> getTeam()
           
 Flag<Triple> getVelocity()
           
 int getWasKilledBy()
          obtain unique integer identifier of killer of agent
 Flag<java.lang.String> getWeapon()
           
 AddWeapon getWeapon(ItemType weaponType)
          Returns a weapon object for a specified weapon type, if the bot has it (otherwise returns null).
 int getWhoAgentKilled()
          obtain unique integer identifier enemy agent killed by agent
 boolean hasAnyLoadedWeapon()
          checks if agent has loaded weapon
 boolean hasLoadedWeapon()
          check if agent has any loaded weapon
 boolean hasSelf()
          identifies whether agent has self, if he hasn't you can't call any methods below which needs self!
 boolean hasWeaponOfType(ItemType type)
          search inventory for weapon of supplied type
 boolean isAmmoSuitable(Ammo ammo)
          checks whether ammo is suitable for any weapon, agent has
 boolean isBeingDamaged()
          identifies if the agent is being damaged
 boolean isBotChangedZone()
          check of agent change of zone
 boolean isBumpingToAnotherActor()
          identifies whether agent bumped to another object
 boolean isColliding()
          identifies whether there is a collision with wall
 boolean isFalling()
          identifies a fall of agent
 boolean isFlagStolen()
          identifies the status of the team's flag
 boolean isFootChangedZone()
          check of agent's foot change of zone
 boolean isHeadChangedZone()
          check of agent's head change of zone - for figuring out if agent emersed from water for instance
 boolean isHoldingFlag()
          true if agent holds the flag
 boolean isMoving()
          check velocity from agent status
 boolean isProjectileComming()
          identifies whether projectile is comming
 boolean isShooting()
          Wether bot is shooting or not.
 Player lastPlayerInfo(int ID)
          Obtain last known information about player
 Triple lastPlayerPosition(int ID)
          returns last known position of player with specified ID
 int numberOfLoadedWeapons()
          number of loaded weapons in the inventory
 int numberOfWeapons()
          number of weapons in the inventory
 java.util.HashMap<java.lang.Integer,java.lang.Double> opposingTeamScores()
           
 void receiveMessage(RcvMsgEvent e)
          place to take care about messages on which you register listener
 void restartMemory()
          restarts variables, which became invalid after the agent got killed therefore erase myHistory and myInventory
according to synchronization issues switching is used
how it works:
- memory creates new instances of history and inventory (the rest don't need synchronization)
- when agent's logic ends current interation, it checks if it is ready to run again and call switchMemories()
- when the memories are switched - new are on their place, it waits for the first SELF message and let logic do its work again
 java.util.ArrayList<NavPoint> seeAllNavPoints()
          Returns ALL NavPoints that are around the agent (not only visible).
 java.util.ArrayList<Ammo> seenAmmos(int time)
          get ArrayList of Ammos from myHistory - they are stored here as MessageObjects so I do overtyping for all objects
when there is nothing yet stored - returns empty ArrayList!
 java.util.ArrayList<Armor> seenArmors(int time)
          get ArrayList of Armors from myHistory - they are stored here as MessageObjects so I do overtyping for all objects
when there is nothing yet stored - returns empty ArrayList!
 java.util.ArrayList<Health> seenHealths(int time)
          get ArrayList of Healths from myHistory - they are stored here as MessageObjects so I do overtyping for all objects
when there is nothing yet stored - returns empty ArrayList!
 java.util.ArrayList<Item> seenItems(int time)
          get ArrayList of Items from myHistory - they are stored here as MessageObjects so I do overtyping for all objects
when there is nothing yet stored - returns empty ArrayList!
 java.util.ArrayList<Mover> seenMovers(int time)
          get ArrayList of Movers from myHistory - they are stored here as MessageObjects so I do overtyping for all objects
when there is nothing yet stored - returns empty ArrayList!
 java.util.ArrayList<NavPoint> seenNavPoints(int time)
          get ArrayList of NavPoints from myHistory - they are stored here as MessageObjects so I do overtyping for all objects
when there is nothing yet stored - returns empty ArrayList!
 java.util.ArrayList<Player> seenPlayers(int time)
          get ArrayList of Players from myHistory - they are stored here as MessageObjects so I do overtyping for all objects
when there is nothing yet stored - returns empty ArrayList!
 java.util.ArrayList<Weapon> seenWeapons(int time)
          get ArrayList of Weaponss from myHistory - they are stored here as MessageObjects so I do overtyping for all objects
when there is nothing yet stored - returns empty ArrayList!
 Item seeReachableItem()
           
 java.util.ArrayList<Self> selfHistory(int time)
          to get all selfs in some past - useful for calculation based on recent agent's movement, status, etc.
 void switchMemories()
          replace obsolete instances of history and memory unregister all listeners so Garbage collector can do its job
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

gameInfo

private GameInfo gameInfo

myHistory

private History myHistory

myInventory

private AgentInventory myInventory

platformLog

private java.util.logging.Logger platformLog

knownPlayers

private KnownPlayers knownPlayers

knownItems

private KnownItems knownItems

knownNavPoints

private KnownNavPoints knownNavPoints

body

private AgentBody body

agent

private Agent agent

zeroTriple

private static final Triple zeroTriple

MOVING_MIN_VELOCITY

private static final int MOVING_MIN_VELOCITY
See Also:
Constant Field Values

name

private Flag<java.lang.String> name

location

private Flag<Triple> location

rotation

private Flag<Triple> rotation

velocity

private Flag<Triple> velocity

team

private Flag<java.lang.Integer> team

weapon

private Flag<java.lang.String> weapon

health

private Flag<java.lang.Integer> health

currentAmmo

private Flag<java.lang.Integer> currentAmmo

armor

private Flag<java.lang.Integer> armor

shooting

private Flag<java.lang.Boolean> shooting

memoryRestarted

public boolean memoryRestarted
if memory is restared, it creates a copy of memory and switch it with the obsolete one once it is ready for switch Switch is called in agent.run() when it is checking, whether memory is restarted or not. if memory is restarted, it calls switchMemories() and replace obsolete instance of memory by new one


newMyInventory

private AgentInventory newMyInventory

newMyHistory

private History newMyHistory
Constructor Detail

AgentMemory

public AgentMemory(java.util.logging.Logger logger,
                   AgentBody body,
                   Agent agent)
Method Detail

getGameInfo

public GameInfo getGameInfo()

receiveMessage

public void receiveMessage(RcvMsgEvent e)
place to take care about messages on which you register listener

Specified by:
receiveMessage in interface RcvMsgListener

getFromMyHistory

public MessageObject getFromMyHistory(MessageType type)
Get first message of desired type from history.

Parameters:
type -
Returns:
message of specified type

getAllFromCurrentBatch

public java.util.Collection<MessageObject> getAllFromCurrentBatch(MessageType type)
Get all message of desired type from history.

Parameters:
type -
Returns:
message of specified type

restartMemory

public void restartMemory()
restarts variables, which became invalid after the agent got killed therefore erase myHistory and myInventory
according to synchronization issues switching is used
how it works:
- memory creates new instances of history and inventory (the rest don't need synchronization)
- when agent's logic ends current interation, it checks if it is ready to run again and call switchMemories()
- when the memories are switched - new are on their place, it waits for the first SELF message and let logic do its work again


switchMemories

public void switchMemories()
replace obsolete instances of history and memory unregister all listeners so Garbage collector can do its job


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

numberOfWeapons

public int numberOfWeapons()
number of weapons in the inventory

Specified by:
numberOfWeapons in interface Inventory
Returns:
integer value

numberOfLoadedWeapons

public int numberOfLoadedWeapons()
number of loaded weapons in the inventory

Specified by:
numberOfLoadedWeapons in interface Inventory
Returns:
integer value

getMeleeWeapon

public AddWeapon getMeleeWeapon()
returns melee weapon, if there is not a single one, returns null!!!

Specified by:
getMeleeWeapon in interface Inventory
Returns:
melee loaded weapon

getRangedWeapon

public AddWeapon getRangedWeapon()
returns ranged weapon, if there is not a single one, returns null!!!

Specified by:
getRangedWeapon in interface Inventory
Returns:
ranged loaded weapon

getAnyWeapon

public AddWeapon getAnyWeapon()
Description copied from interface: Inventory
get any loaded weapon from directory

Specified by:
getAnyWeapon in interface Inventory
Returns:
first loaded weapon in inventory

isAmmoSuitable

public boolean isAmmoSuitable(Ammo ammo)
checks whether ammo is suitable for any weapon, agent has

Specified by:
isAmmoSuitable in interface Inventory
Returns:
true if the ammo type match to a weapon type in agent's inventory

getCurrentWeapon

public AddWeapon getCurrentWeapon()
returns current agent weapon

Specified by:
getCurrentWeapon in interface WorldView

hasLoadedWeapon

public boolean hasLoadedWeapon()
Description copied from interface: Inventory
check if agent has any loaded weapon

Specified by:
hasLoadedWeapon in interface Inventory
Returns:
if the agent has loaded weapon in hands

hasAnyLoadedWeapon

public boolean hasAnyLoadedWeapon()
Description copied from interface: Inventory
checks if agent has loaded weapon

Specified by:
hasAnyLoadedWeapon in interface Inventory
Returns:
if the agent has any loaded weapon in the inventory

hasWeaponOfType

public boolean hasWeaponOfType(ItemType type)
Description copied from interface: Inventory
search inventory for weapon of supplied type

Specified by:
hasWeaponOfType in interface Inventory
Returns:
if the agent has any loaded weapon in the inventory

getBetterWeapon

public AddWeapon getBetterWeapon(Triple from,
                                 Triple to)
Description copied from interface: Inventory
Search inventory for better weapon - this is done according to distance between triples supplied as parameters.
The returned weapon has the lowest effective distance bigger than the distance between triples. For Example if the fighting agents are very close to each other and the one calling this function possesses flak cannon this method picks it as it has the lowest effective distance

Specified by:
getBetterWeapon in interface Inventory
Parameters:
from - - typically agent location
to - - typically enemy location
Returns:
better weapon according to the distance between from and to

getAllWeapons

public java.util.ArrayList<AddWeapon> getAllWeapons()
provides an access to weapons
NOT SYNCHRONIZED!!! - better use getCopyOfAllWeapons - get clone so noone can change it during work better to use predefined methods

Specified by:
getAllWeapons in interface Inventory
Returns:
list of agents weapons - both loaded and unloaded

getCopyOfAllWeapons

public java.util.ArrayList<AddWeapon> getCopyOfAllWeapons()
Description copied from interface: Inventory
obtain a copy of the structure in which inventory stores items

Specified by:
getCopyOfAllWeapons in interface Inventory
Returns:
copy of all weapons form inventory - both loaded and unloaded

getAgent

public Agent getAgent()

hasSelf

public boolean hasSelf()
identifies whether agent has self, if he hasn't you can't call any methods below which needs self! agent has not self just at the very beginning of communication, so this is needed only to check when to start logic


getAgentAmmo

public int getAgentAmmo()
Description copied from interface: WorldView
get agent ammo for current weapon

Specified by:
getAgentAmmo in interface WorldView
Returns:
current state of agent ammo

getAgentAlternativeAmmo

public int getAgentAlternativeAmmo()
Description copied from interface: WorldView
get agent alternative ammo for current weapon

Specified by:
getAgentAlternativeAmmo in interface WorldView
Returns:
current state of agent ammo

getAgentArmor

public int getAgentArmor()
Description copied from interface: WorldView
get agent armor from agent status

Specified by:
getAgentArmor in interface WorldView
Returns:
current state of agent's armor

getAgentHealth

public int getAgentHealth()
Description copied from interface: WorldView
get agent health from agent status

Specified by:
getAgentHealth in interface WorldView
Returns:
current state of agent's health

getAgentIsMoving

public boolean getAgentIsMoving()
Description copied from interface: WorldView
true if agent is moving

Specified by:
getAgentIsMoving in interface WorldView
Returns:
identifies movement of agent's

getAgentLocation

public Triple getAgentLocation()
Description copied from interface: WorldView
get agent location from agent status

Specified by:
getAgentLocation in interface WorldView
Returns:
agent's location

getAgentName

public java.lang.String getAgentName()
Description copied from interface: WorldView
get agent name from agent status

Specified by:
getAgentName in interface WorldView
Returns:
agent's name

getAgentRotation

public Triple getAgentRotation()
Description copied from interface: WorldView
get agent rotation from agent status

Specified by:
getAgentRotation in interface WorldView
Returns:
agent's rotation

getAgentTeam

public int getAgentTeam()
Description copied from interface: WorldView
get agent team from agent status

Specified by:
getAgentTeam in interface WorldView
Returns:
agent's team

getAgentVelocity

public Triple getAgentVelocity()
Description copied from interface: WorldView
get agent velocity from agent status

Specified by:
getAgentVelocity in interface WorldView
Returns:
agent's velocity

getAgentUnrealID

public java.lang.String getAgentUnrealID()
Description copied from interface: WorldView
get agent Unreal ID from agent status

Specified by:
getAgentUnrealID in interface WorldView
Returns:
agent's Unreal ID

getAgentID

public int getAgentID()
Description copied from interface: WorldView
get agent unique integer identifier from agent status

Specified by:
getAgentID in interface WorldView
Returns:
agent's unreal ID

selfHistory

public java.util.ArrayList<Self> selfHistory(int time)
to get all selfs in some past - useful for calculation based on recent agent's movement, status, etc.

Parameters:
time -
Returns:
list of selfs in the past time

allPlayersScores

public java.util.HashMap<java.lang.Integer,java.lang.Double> allPlayersScores()
Description copied from interface: WorldView
get scores of all players

Specified by:
allPlayersScores in interface WorldView
Returns:
score table of all players

getAgentTeamScore

public double getAgentTeamScore()
Description copied from interface: WorldView
get agent team score

Specified by:
getAgentTeamScore in interface WorldView
Returns:
agent's team score

getAgentScore

public double getAgentScore()
Description copied from interface: WorldView
get agent score - number of agents killed by him

Specified by:
getAgentScore in interface WorldView
Returns:
agent's score

getBody

public AgentBody getBody()

getOpposingTeamScore

public double getOpposingTeamScore()
Description copied from interface: WorldView
get opposing team score
works only with two teams

Specified by:
getOpposingTeamScore in interface WorldView
Returns:
score of the opposing team

opposingTeamScores

public java.util.HashMap<java.lang.Integer,java.lang.Double> opposingTeamScores()
Specified by:
opposingTeamScores in interface WorldView
Returns:
HashMap of scores of opposing team(s)

getPlayerScore

public double getPlayerScore(int id)
Description copied from interface: WorldView
get score of agent of specified id - number of agents killed by him

Specified by:
getPlayerScore in interface WorldView
Parameters:
id - - player's ID
Returns:
score of specified player

getHearNoise

public boolean getHearNoise()
identifies whether agent hear something

Specified by:
getHearNoise in interface WorldView
Returns:
true if agent heard noise

getHearPickUp

public boolean getHearPickUp()
identifies whether agent hear a pick up noise

Specified by:
getHearPickUp in interface WorldView
Returns:
true if agent heard pickup noise

isBeingDamaged

public boolean isBeingDamaged()
identifies if the agent is being damaged

Specified by:
isBeingDamaged in interface WorldView
Returns:
true if agent damaged message arrived recently

isBumpingToAnotherActor

public boolean isBumpingToAnotherActor()
identifies whether agent bumped to another object

Specified by:
isBumpingToAnotherActor in interface WorldView
Returns:
true if agent hit another actor recently

isColliding

public boolean isColliding()
identifies whether there is a collision with wall

Specified by:
isColliding in interface WorldView
Returns:
true if agent hit wall recently

isFalling

public boolean isFalling()
identifies a fall of agent

Specified by:
isFalling in interface WorldView
Returns:
true if agent is falling

isProjectileComming

public boolean isProjectileComming()
identifies whether projectile is comming

Specified by:
isProjectileComming in interface WorldView
Returns:
true if projectile is comming

isShooting

public boolean isShooting()
Wether bot is shooting or not.

Specified by:
isShooting in interface WorldView
Returns:
true if agent is shooting | false

isMoving

public boolean isMoving()
Description copied from interface: WorldView
check velocity from agent status

Specified by:
isMoving in interface WorldView
Returns:
true if agent is moving

getSeeNavPoint

public NavPoint getSeeNavPoint()
Description copied from interface: WorldView
get first visible navigation point agent sees

Specified by:
getSeeNavPoint in interface WorldView
Returns:
first NavPoint that agent sees

getSeeReachableNavPoint

public NavPoint getSeeReachableNavPoint()
Description copied from interface: WorldView
get first visible navigation point agent sees

Specified by:
getSeeReachableNavPoint in interface WorldView
Returns:
first reachable NavPoint that agent sees

getSeeReachableNavPoints

public java.util.ArrayList<NavPoint> getSeeReachableNavPoints()
Description copied from interface: WorldView
get list of visible navigation points around the agent

Specified by:
getSeeReachableNavPoints in interface WorldView
Returns:
first reachable NavPoint that agent sees

getSeeAnyReachableNavPoint

public boolean getSeeAnyReachableNavPoint()
Description copied from interface: WorldView
true if agent sees any navigation point around

Specified by:
getSeeAnyReachableNavPoint in interface WorldView
Returns:
first reachable NavPoint that agent sees

getSeeNavPoint

public NavPoint getSeeNavPoint(int navPointID)
Returns navpoint with navPointID, if it is currently visible, null otherwise.

Specified by:
getSeeNavPoint in interface WorldView
Returns:
true if specified navigation point is visible | false

getSeePlayer

public Player getSeePlayer(int playerID)
Description copied from interface: WorldView
get Player if he is visible

Specified by:
getSeePlayer in interface WorldView
Returns:
player of specified ID if agent currently sees it, else null

getSeeMover

public Mover getSeeMover(int moverID)
Description copied from interface: WorldView
indicate whether mover of supplied ID is visible

Specified by:
getSeeMover in interface WorldView
Returns:
mover of specified ID if agent currently sees it

getSeeItem

public Item getSeeItem(int itemID)
Description copied from interface: WorldView
indicate whether item of supplied ID is visible

Specified by:
getSeeItem in interface WorldView
Returns:
item of specified ID if agent currently sees it

getSeeAmmo

public Ammo getSeeAmmo()
Description copied from interface: WorldView
get first visible ammo agent sees

Specified by:
getSeeAmmo in interface WorldView
Returns:
first Ammo that agent sees

getSeeReachableAmmo

public Ammo getSeeReachableAmmo()
Description copied from interface: WorldView
get first visible ammo agent sees

Specified by:
getSeeReachableAmmo in interface WorldView
Returns:
reachable and visible ammo

getSeeAmmos

public java.util.ArrayList<Ammo> getSeeAmmos()
Description copied from interface: WorldView
get list of visible ammos around the agent

Specified by:
getSeeAmmos in interface WorldView
Returns:
all Ammos that agent sees

getSeeReachableAmmos

public java.util.ArrayList<Ammo> getSeeReachableAmmos()
Description copied from interface: WorldView
get list of visible ammos around the agent

Specified by:
getSeeReachableAmmos in interface WorldView
Returns:
all reachable and visible ammos

getSeeAnyAmmo

public boolean getSeeAnyAmmo()
Description copied from interface: WorldView
true if agent sees any ammo around

Specified by:
getSeeAnyAmmo in interface WorldView
Returns:
whether agent see any Ammo

getSeeAnyReachableAmmo

public boolean getSeeAnyReachableAmmo()
Description copied from interface: WorldView
true if agent sees any ammo around

Specified by:
getSeeAnyReachableAmmo in interface WorldView
Returns:
whether agent see and can reach any ammo

getSeeAnyArmor

public boolean getSeeAnyArmor()
Description copied from interface: WorldView
true if agent sees any armor around

Specified by:
getSeeAnyArmor in interface WorldView
Returns:
whether agent see any Armor

getSeeReachableArmor

public Armor getSeeReachableArmor()
Description copied from interface: WorldView
get first visible armor agent sees

Specified by:
getSeeReachableArmor in interface WorldView
Returns:
reachable and visible armor

getSeeAnyEnemy

public boolean getSeeAnyEnemy()
Description copied from interface: WorldView
true if bot sees any enemy

Specified by:
getSeeAnyEnemy in interface WorldView
Returns:
whether agent see any Enemy

getSeeAnyFriend

public boolean getSeeAnyFriend()
Description copied from interface: WorldView
true if bot sees any friend

Specified by:
getSeeAnyFriend in interface WorldView
Returns:
whether agent see any Friend

getSeeAnyItem

public boolean getSeeAnyItem()
Description copied from interface: WorldView
true if agent sees any item around

Specified by:
getSeeAnyItem in interface WorldView
Returns:
whether agent see any Item

getSeeAnyReachableItem

public boolean getSeeAnyReachableItem()
Description copied from interface: WorldView
true if agent sees any item around

Specified by:
getSeeAnyReachableItem in interface WorldView
Returns:
reachable and visible item

seeReachableItem

public Item seeReachableItem()
Returns:
reachable and visible item

getSeeAnyHealth

public boolean getSeeAnyHealth()
Description copied from interface: WorldView
true if agent sees any health around

Specified by:
getSeeAnyHealth in interface WorldView
Returns:
whether agent see any Health

getSeeReachableHealth

public Health getSeeReachableHealth()
Description copied from interface: WorldView
get first visible health agent sees

Specified by:
getSeeReachableHealth in interface WorldView
Returns:
reachable and visible Health

getSeeAnyReachableHealth

public boolean getSeeAnyReachableHealth()
Description copied from interface: WorldView
true if agent sees any health around

Specified by:
getSeeAnyReachableHealth in interface WorldView
Returns:
whether agent sees reachable and visible Health

getSeeAnyMover

public boolean getSeeAnyMover()
Description copied from interface: WorldView
true if agent sees any mover around

Specified by:
getSeeAnyMover in interface WorldView
Returns:
whether agent see any Mover

getSeeAnyNavPoint

public boolean getSeeAnyNavPoint()
Description copied from interface: WorldView
true if agent sees any navigation point around

Specified by:
getSeeAnyNavPoint in interface WorldView
Returns:
whether agent see any NavPoint

getSeeAnyPlayer

public boolean getSeeAnyPlayer()
Description copied from interface: WorldView
true if bot sees any player

Specified by:
getSeeAnyPlayer in interface WorldView
Returns:
whether agent see any Player

getSeeAnyWeapon

public boolean getSeeAnyWeapon()
Description copied from interface: WorldView
true if agent sees any weapon around

Specified by:
getSeeAnyWeapon in interface WorldView
Returns:
whether agent see any Weapon

getSeeArmor

public Armor getSeeArmor()
Description copied from interface: WorldView
get first visible armor agent sees

Specified by:
getSeeArmor in interface WorldView
Returns:
first armor agent sees

getSeeAnyReachableArmor

public boolean getSeeAnyReachableArmor()
Description copied from interface: WorldView
true if agent sees any armor around

Specified by:
getSeeAnyReachableArmor in interface WorldView
Returns:
whether agent sees reachable and visible Armor

getSeeArmors

public java.util.ArrayList<Armor> getSeeArmors()
Description copied from interface: WorldView
get list of visible armors around the agent

Specified by:
getSeeArmors in interface WorldView
Returns:
all armors agent sees

getSeeEnemy

public Player getSeeEnemy()
Description copied from interface: WorldView
get first visible enemy

Specified by:
getSeeEnemy in interface WorldView
Returns:
first enemy agent sees

getSeeFriend

public Player getSeeFriend()
Description copied from interface: WorldView
get first visible friendly player

Specified by:
getSeeFriend in interface WorldView
Returns:
first friend agent sees

getSeeItem

public Item getSeeItem()
Description copied from interface: WorldView
get first visible item agent sees

Specified by:
getSeeItem in interface WorldView
Returns:
first Item agent sees

getSeeItems

public java.util.ArrayList<Item> getSeeItems()
Description copied from interface: WorldView
get list of visible items around the agent

Specified by:
getSeeItems in interface WorldView
Returns:
all Items agent sees

getSeeHealth

public Health getSeeHealth()
Description copied from interface: WorldView
get first visible health agent sees

Specified by:
getSeeHealth in interface WorldView
Returns:
first Health agent sees

getSeeHealths

public java.util.ArrayList<Health> getSeeHealths()
Description copied from interface: WorldView
get list of visible healths around the agent

Specified by:
getSeeHealths in interface WorldView
Returns:
all Healths agent sees

getSeeMover

public Mover getSeeMover()
Description copied from interface: WorldView
get first visible mover agent sees

Specified by:
getSeeMover in interface WorldView
Returns:
first Mover agent sees

getSeeMovers

public java.util.ArrayList<Mover> getSeeMovers()
Description copied from interface: WorldView
get list of visible movers around the agent

Specified by:
getSeeMovers in interface WorldView
Returns:
all Movers agent sees

getSeeNavPoints

public java.util.ArrayList<NavPoint> getSeeNavPoints()
Returns only visible NavPoints (NavPoints the agent sees).
Note that agent is receiving all navpoints as if it has 360 degrees field of view (because of AStar and path finding)

Specified by:
getSeeNavPoints in interface WorldView
Returns:
all NavPoints that are visible to agent

seeAllNavPoints

public java.util.ArrayList<NavPoint> seeAllNavPoints()
Returns ALL NavPoints that are around the agent (not only visible).
Note that agent is receiving all navpoints as if it has 360 degrees field of view (because of AStar and path finding)

Returns:
all NavPoints agent sees

getSeePlayer

public Player getSeePlayer()
Description copied from interface: WorldView
get first visible player

Specified by:
getSeePlayer in interface WorldView
Returns:
first Player agent sees

getSeePlayers

public java.util.ArrayList<Player> getSeePlayers()
Description copied from interface: WorldView
get all visible players

Specified by:
getSeePlayers in interface WorldView
Returns:
all Players agent sees

getSeeWeapon

public Weapon getSeeWeapon()
Description copied from interface: WorldView
get first visible weapon agent sees

Specified by:
getSeeWeapon in interface WorldView
Returns:
first Weapon agent sees

getSeeReachableWeapon

public Weapon getSeeReachableWeapon()
Description copied from interface: WorldView
get first visible weapon agent sees

Specified by:
getSeeReachableWeapon in interface WorldView
Returns:
reachable and visible weapon

getSeeAnyReachableWeapon

public boolean getSeeAnyReachableWeapon()
Description copied from interface: WorldView
true if agent sees any weapon around

Specified by:
getSeeAnyReachableWeapon in interface WorldView
Returns:
reachable and visible ammo

getSeeReachableWeapons

public java.util.ArrayList<Weapon> getSeeReachableWeapons()
Description copied from interface: WorldView
get list of visible weapons around the agent

Specified by:
getSeeReachableWeapons in interface WorldView
Returns:
all reachable and visible weapons

getSeeWeapons

public java.util.ArrayList<Weapon> getSeeWeapons()
Description copied from interface: WorldView
get list of visible weapons around the agent

Specified by:
getSeeWeapons in interface WorldView
Returns:
all Weapons agent sees

getWasKilledBy

public int getWasKilledBy()
Description copied from interface: WorldView
obtain unique integer identifier of killer of agent

Specified by:
getWasKilledBy in interface WorldView
Returns:
ID of Player who killed agent, 0 when its unknown

getWhoAgentKilled

public int getWhoAgentKilled()
Description copied from interface: WorldView
obtain unique integer identifier enemy agent killed by agent

Specified by:
getWhoAgentKilled in interface WorldView
Returns:
ID of player who the agent killed

getSeeAnyExtra

public boolean getSeeAnyExtra()
Description copied from interface: WorldView
true if agent sees any extra around

Specified by:
getSeeAnyExtra in interface WorldView
Returns:
if agent sees any Extra class item

getSeeAnyReachableExtra

public boolean getSeeAnyReachableExtra()
Description copied from interface: WorldView
true if agent sees any extra around

Specified by:
getSeeAnyReachableExtra in interface WorldView
Returns:
if agent sees any reachable Extra class item

getSeeExtra

public Extra getSeeExtra()
Description copied from interface: WorldView
get first visible extra agent sees

Specified by:
getSeeExtra in interface WorldView
Returns:
first seen Extra object

getSeeExtras

public java.util.ArrayList<Extra> getSeeExtras()
Description copied from interface: WorldView
get list of visible extras around the agent

Specified by:
getSeeExtras in interface WorldView
Returns:
list of seen Extra objects

seenNavPoints

public java.util.ArrayList<NavPoint> seenNavPoints(int time)
get ArrayList of NavPoints from myHistory - they are stored here as MessageObjects so I do overtyping for all objects
when there is nothing yet stored - returns empty ArrayList!

Specified by:
seenNavPoints in interface RecentMemory
Parameters:
time - - how deep to the past
Returns:
ArrayList of NavPoints

seenAmmos

public java.util.ArrayList<Ammo> seenAmmos(int time)
get ArrayList of Ammos from myHistory - they are stored here as MessageObjects so I do overtyping for all objects
when there is nothing yet stored - returns empty ArrayList!

Specified by:
seenAmmos in interface RecentMemory
Parameters:
time - - how deep to the past
Returns:
ArrayList of Ammos

seenArmors

public java.util.ArrayList<Armor> seenArmors(int time)
get ArrayList of Armors from myHistory - they are stored here as MessageObjects so I do overtyping for all objects
when there is nothing yet stored - returns empty ArrayList!

Specified by:
seenArmors in interface RecentMemory
Parameters:
time - - how deep to the past
Returns:
ArrayList of Armors

seenHealths

public java.util.ArrayList<Health> seenHealths(int time)
get ArrayList of Healths from myHistory - they are stored here as MessageObjects so I do overtyping for all objects
when there is nothing yet stored - returns empty ArrayList!

Specified by:
seenHealths in interface RecentMemory
Parameters:
time - - how deep to the past
Returns:
ArrayList of Healths

seenItems

public java.util.ArrayList<Item> seenItems(int time)
get ArrayList of Items from myHistory - they are stored here as MessageObjects so I do overtyping for all objects
when there is nothing yet stored - returns empty ArrayList!

Specified by:
seenItems in interface RecentMemory
Parameters:
time - - how deep to the past
Returns:
ArrayList of Items

seenMovers

public java.util.ArrayList<Mover> seenMovers(int time)
get ArrayList of Movers from myHistory - they are stored here as MessageObjects so I do overtyping for all objects
when there is nothing yet stored - returns empty ArrayList!

Specified by:
seenMovers in interface RecentMemory
Parameters:
time - - how deep to the past
Returns:
ArrayList of Movers

seenPlayers

public java.util.ArrayList<Player> seenPlayers(int time)
get ArrayList of Players from myHistory - they are stored here as MessageObjects so I do overtyping for all objects
when there is nothing yet stored - returns empty ArrayList!

Specified by:
seenPlayers in interface RecentMemory
Parameters:
time - - how deep to the past
Returns:
ArrayList of Players

seenWeapons

public java.util.ArrayList<Weapon> seenWeapons(int time)
get ArrayList of Weaponss from myHistory - they are stored here as MessageObjects so I do overtyping for all objects
when there is nothing yet stored - returns empty ArrayList!

Specified by:
seenWeapons in interface RecentMemory
Parameters:
time - - how deep to the past
Returns:
ArrayList of Weapons

getKnownNavPoints

public java.util.ArrayList<NavPoint> getKnownNavPoints()
Specified by:
getKnownNavPoints in interface Knowledge
Returns:
all navigation points in the map

getKnownPlayers

public java.util.ArrayList<Player> getKnownPlayers()
Specified by:
getKnownPlayers in interface Knowledge
Returns:
list of known players

lastPlayerPosition

public Triple lastPlayerPosition(int ID)
Description copied from interface: Knowledge
returns last known position of player with specified ID

Specified by:
lastPlayerPosition in interface Knowledge
Returns:
last known position of specified agent - null when we have no record about him - which is quite unusual

lastPlayerInfo

public Player lastPlayerInfo(int ID)
Obtain last known information about player

Specified by:
lastPlayerInfo in interface Knowledge
Returns:
last known information about specified agent - null when we have no record about him - which is quite unusual

getKnownAmmos

public java.util.ArrayList<Ammo> getKnownAmmos()
Specified by:
getKnownAmmos in interface Knowledge
Returns:
list of known ammos - could be used to get manualy desired ammo

getKnownArmors

public java.util.ArrayList<Armor> getKnownArmors()
Specified by:
getKnownArmors in interface Knowledge
Returns:
list of known armors - could be used to get manualy desired armor

getKnownHealths

public java.util.ArrayList<Health> getKnownHealths()
Specified by:
getKnownHealths in interface Knowledge
Returns:
list of known healths - could be used to get manualy desired health

getKnownItemsOfType

public java.util.ArrayList<Item> getKnownItemsOfType(MessageType type)
Returns:
list of known items by type

getKnownSpecials

public java.util.ArrayList<Special> getKnownSpecials()
Specified by:
getKnownSpecials in interface Knowledge
Returns:
list of known specials - could be used to get manualy desired special

getKnownExtras

public java.util.ArrayList<Extra> getKnownExtras()
Specified by:
getKnownExtras in interface Knowledge
Returns:
list of known specials - could be used to get manualy desired special

getKnownWeapons

public java.util.ArrayList<Weapon> getKnownWeapons()
Specified by:
getKnownWeapons in interface Knowledge
Returns:
list of known weapons - could be used to get manualy desired weapon

getFastTraceResult

public FastTrace getFastTraceResult(int id)
Description copied from interface: WorldView
get trace result of specified id - each trace is sent with unique user-defined ID

Specified by:
getFastTraceResult in interface WorldView
Returns:
FastTrace object with the result of trace of specified id

getBotZoneChanged

public ZoneChangedBot getBotZoneChanged()
Description copied from interface: WorldView
obtain full information about the zone change of agent- Id - by parsing Id user can obtain additional information

Specified by:
getBotZoneChanged in interface WorldView
Returns:
object with the bot zone changed message - contains ID of the new terrain

getFootZoneChanged

public ZoneChangedFoot getFootZoneChanged()
Description copied from interface: WorldView
obtain full information about the zone change of agent foot - Id - by parsing Id user can obtain additional information

Specified by:
getFootZoneChanged in interface WorldView
Returns:
object with the bot's foot zone changed message - contains ID of the new terrain

getHeadZoneChanged

public ZoneChangedHead getHeadZoneChanged()
Description copied from interface: WorldView
obtain full information about the zone change of agent head - Id - by parsing Id user can obtain additional information

Specified by:
getHeadZoneChanged in interface WorldView
Returns:
object with the bot's head zone changed message - contains ID of the new terrain

isBotChangedZone

public boolean isBotChangedZone()
Description copied from interface: WorldView
check of agent change of zone

Specified by:
isBotChangedZone in interface WorldView
Returns:
true if bot changed zone

isFootChangedZone

public boolean isFootChangedZone()
Description copied from interface: WorldView
check of agent's foot change of zone

Specified by:
isFootChangedZone in interface WorldView
Returns:
true if bot's foot changed zone

isHeadChangedZone

public boolean isHeadChangedZone()
Description copied from interface: WorldView
check of agent's head change of zone - for figuring out if agent emersed from water for instance

Specified by:
isHeadChangedZone in interface WorldView
Returns:
true if bot's head changed zone

getAutoTrace

public AutoTraceRay getAutoTrace(int ID)
Description copied from interface: WorldView
get auto-trace result according to supplied id

Specified by:
getAutoTrace in interface WorldView
Returns:
AutoTraceRay - ray from auto trace with specified id

getAutoTraceIDs

public java.util.ArrayList<java.lang.Integer> getAutoTraceIDs()
Description copied from interface: WorldView
obtain list of auto-trace message IDs from last batch

Specified by:
getAutoTraceIDs in interface WorldView
Returns:
ids of all auto traces assigned to the agent

getAutoTraces

public java.util.ArrayList<AutoTraceRay> getAutoTraces()
Description copied from interface: WorldView
obtain list of auto-trace messages from last batch

Specified by:
getAutoTraces in interface WorldView
Returns:
all auto trace results in current batch

isFlagStolen

public boolean isFlagStolen()
identifies the status of the team's flag

Specified by:
isFlagStolen in interface WorldView
Returns:
true if flag is stolen

isHoldingFlag

public boolean isHoldingFlag()
true if agent holds the flag

Specified by:
isHoldingFlag in interface WorldView
Returns:
true if agent is holding a flag | false

getSeeAnyDomPoint

public boolean getSeeAnyDomPoint()
Description copied from interface: WorldView
true if agent sees any domination point around

Specified by:
getSeeAnyDomPoint in interface WorldView
Returns:
true if agent sees any domination point around

getSeeDomPoint

public DominationPoint getSeeDomPoint()
Description copied from interface: WorldView
get first visible domination point agent sees

Specified by:
getSeeDomPoint in interface WorldView
Returns:
first if any domination point agent sees

getName

public Flag<java.lang.String> getName()

getLocation

public Flag<Triple> getLocation()

getRotation

public Flag<Triple> getRotation()

getVelocity

public Flag<Triple> getVelocity()

getTeam

public Flag<java.lang.Integer> getTeam()

getWeapon

public Flag<java.lang.String> getWeapon()

getHealth

public Flag<java.lang.Integer> getHealth()

getCurrentAmmo

public Flag<java.lang.Integer> getCurrentAmmo()

getArmor

public Flag<java.lang.Integer> getArmor()

getShooting

public Flag<java.lang.Boolean> getShooting()

getSeeAmmo

public Ammo getSeeAmmo(java.lang.String UnrealID)
to get an object of UnrealID if it is visible

Specified by:
getSeeAmmo in interface WorldView
Parameters:
UnrealID -
Returns:
null if agent doesn't see the Ammo of supplied UnrealID, else return object

getSeeArmor

public Armor getSeeArmor(java.lang.String UnrealID)
to get an object of UnrealID if it is visible

Specified by:
getSeeArmor in interface WorldView
Parameters:
UnrealID -
Returns:
null if agent doesn't see the Armor of supplied UnrealID, else return object

getSeeExtra

public Extra getSeeExtra(java.lang.String UnrealID)
to get an object of UnrealID if it is visible

Specified by:
getSeeExtra in interface WorldView
Parameters:
UnrealID -
Returns:
null if agent doesn't see the Extra of supplied UnrealID, else return object

getSeeHealth

public Health getSeeHealth(java.lang.String UnrealID)
to get an object of UnrealID if it is visible

Specified by:
getSeeHealth in interface WorldView
Parameters:
UnrealID -
Returns:
null if agent doesn't see the Health of supplied UnrealID, else return object

getSeeItem

public Item getSeeItem(java.lang.String UnrealID)
to get an object of UnrealID if it is visible

Specified by:
getSeeItem in interface WorldView
Parameters:
UnrealID -
Returns:
null if agent doesn't see the Item of supplied UnrealID, else return object

getSeeWeapon

public Weapon getSeeWeapon(java.lang.String UnrealID)
to get an object of UnrealID if it is visible

Specified by:
getSeeWeapon in interface WorldView
Parameters:
UnrealID -
Returns:
null if agent doesn't see the Weapon of supplied UnrealID, else return object

getSeePlayer

public Player getSeePlayer(java.lang.String UnrealID)
to get an object of UnrealID if it is visible

Specified by:
getSeePlayer in interface WorldView
Parameters:
UnrealID -
Returns:
null if agent doesn't see the Player of supplied UnrealID, else return object

getSeeNavPoint

public NavPoint getSeeNavPoint(java.lang.String UnrealID)
to get an object of UnrealID if it is visible

Specified by:
getSeeNavPoint in interface WorldView
Parameters:
UnrealID -
Returns:
null if agent doesn't see the NavPoint of supplied UnrealID, else return object

getSeeMover

public Mover getSeeMover(java.lang.String UnrealID)
to get an object of UnrealID if it is visible

Specified by:
getSeeMover in interface WorldView
Parameters:
UnrealID -
Returns:
null if agent doesn't see the Mover of supplied UnrealID, else return object

clearListeners

protected void clearListeners()
Call at the end of the agent run to remove all listeners inside objects flags.


asSet

private java.util.Set asSet(java.lang.Object[] objects)

getKnownWeapons

public java.util.Map<java.lang.String,Weapon> getKnownWeapons(java.lang.String[] unrealIds)
Returns map

Specified by:
getKnownWeapons in interface Knowledge
Parameters:
unrealIds -
Returns:

getKnownAmmos

public java.util.Map<java.lang.String,Ammo> getKnownAmmos(java.lang.String[] unrealIds)
Returns map

Specified by:
getKnownAmmos in interface Knowledge
Parameters:
unrealIds -
Returns:

getKnownArmors

public java.util.Map<java.lang.String,Armor> getKnownArmors(java.lang.String[] unrealIds)
Returns map

Specified by:
getKnownArmors in interface Knowledge
Parameters:
unrealIds -
Returns:

getKnownHealths

public java.util.Map<java.lang.String,Health> getKnownHealths(java.lang.String[] unrealIds)
Returns map

Specified by:
getKnownHealths in interface Knowledge
Parameters:
unrealIds -
Returns:

getKnownSpecials

public java.util.Map<java.lang.String,Special> getKnownSpecials(java.lang.String[] unrealIds)
Returns map

Specified by:
getKnownSpecials in interface Knowledge
Parameters:
unrealIds -
Returns:

getKnownExtras

public java.util.Map<java.lang.String,Extra> getKnownExtras(java.lang.String[] unrealIds)
Returns map

Specified by:
getKnownExtras in interface Knowledge
Parameters:
unrealIds -
Returns:

getKnownNavPoints

public java.util.Map<java.lang.String,NavPoint> getKnownNavPoints(java.lang.String[] unrealIds)
Returns map

Specified by:
getKnownNavPoints in interface Knowledge
Parameters:
unrealIds -
Returns:

getWeapon

public AddWeapon getWeapon(ItemType weaponType)
Description copied from interface: Inventory
Returns a weapon object for a specified weapon type, if the bot has it (otherwise returns null).

Specified by:
getWeapon in interface Inventory
Returns:

getMyFlag

public FlagInfo getMyFlag()
true if agent holds the flag


getEnemyFlag

public FlagInfo getEnemyFlag()
true if agent holds the flag


getPlayerCount

public int getPlayerCount(int team)
Returns number of players in 'team'.

Parameters:
team -
Returns: