public class GraphSimulationAgentState extends Object implements AgentState
Modifier and Type | Field and Description |
---|---|
String |
action
Holds the name of the action that the agents wants to execute in the current step.
|
boolean |
attacked
A flag to indicate that the agent was attacked in the current step.
|
int |
energy
The agent's current energy.
|
int |
health
The agent's current health.
|
String |
lastAction
Holds the name of the last executed action, to be used in next perception as well as in
monitoring.
|
String |
lastActionParam
Holds the parameter String of the last executed action, to be used in next perception as well as in
monitoring.
|
String |
lastActionResult
Holds the result of the last executed action, to be used in next perception as well as in
monitoring.
|
int |
lastEffectiveRange
Holds the agent's last relevant effective range (to add the surveyed edges to the percept)
|
int |
maxEnergy
The agent's maximum energy (that can be increased via the
buy action). |
int |
maxEnergyDisabled
The agent's maximum energy if the agent is disabled (when
health == 0 ). |
int |
maxHealth
The agent's maximum health (that can be increased via the
buy action). |
String |
name
The name of the agent
|
GraphNode |
node
The current node of this agent (that is, the agent's position within the map).
|
String |
param
Holds the parameter String for the action that the agents wants to execute in the current step.
|
String |
roleName
The name of the agent's role
|
int |
strength
The agent's strength (that can be increased via the
buy action). |
String |
team
The name of the agent's team
|
int |
visRange
The agent's visibility range (that can be increased via the
buy action). |
Constructor and Description |
---|
GraphSimulationAgentState() |
Modifier and Type | Method and Description |
---|---|
void |
addDistance(String vertex,
int distance)
Stores the pair of vertex and distance in the map
|
int |
getDistance(String vertexName)
Getter for the distance between the agent and a given vertex
|
void |
resetDistances()
Resets the mapping of distances to an empty map
|
void |
setAction(String action)
Setter for the name of the action that this agent wants to execute in this simulation step.
|
void |
setNode(GraphNode node)
Setter for the current node of this agent (that is, the agent's position within the map).
|
public String team
public String name
public String roleName
public int maxEnergy
buy
action).public int maxEnergyDisabled
health == 0
).public int energy
public int maxHealth
buy
action).public int health
public int strength
buy
action).public int visRange
buy
action).public GraphNode node
public String action
public String param
public String lastAction
public String lastActionResult
public String lastActionParam
public int lastEffectiveRange
public boolean attacked
public void setNode(GraphNode node)
node
- public void setAction(String action)
action
- public void resetDistances()
public void addDistance(String vertex, int distance)
vertex
- distance
- public int getDistance(String vertexName)
vertexName
- the name of the vertexCopyright © 2013. All Rights Reserved.