|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmassim.javaagents.Agent
mas.agents0815.SubsumptionAgent
public abstract class SubsumptionAgent
Field Summary |
---|
Fields inherited from class massim.javaagents.Agent |
---|
goals |
Constructor Summary | |
---|---|
SubsumptionAgent(java.lang.String name,
java.lang.String team)
|
Method Summary | |
---|---|
static int |
getAnzangents()
|
HelpFunctions |
getHelpFunctions()
|
apltk.interpreter.data.LogicGoal |
getLastGoal()
|
int |
getMoney()
|
int |
getMyEnergy()
|
int |
getMyHealth()
|
int |
getMyID()
|
java.lang.String |
getMyLastAction()
|
java.lang.String |
getMyLastActionResult()
|
int |
getMyMaxEnergy()
|
int |
getMyMaxEnergyDisabled()
|
int |
getMyMaxHealth()
|
java.lang.String |
getMyName()
|
java.lang.String |
getMyPos()
|
abstract java.lang.String |
getMyRole()
|
int |
getMyStrength()
|
java.lang.String |
getMyTeam()
|
java.util.Vector<Rule> |
getRelation()
|
int |
getRussianCounter()
|
int |
getStep()
|
int |
getZoneStart()
|
void |
handlePercept(eis.iilang.Percept p)
This method is called if the environment-interface sends a percept as a notification. |
boolean |
initDirectEdges(java.util.Collection<eis.iilang.Percept> percepts)
Initiates the Topology-Map Creates a (NxN)-Matrix with an edges value |
eis.iilang.Action |
processAction(InternalAction a,
java.util.Collection<apltk.interpreter.data.LogicBelief> beliefs,
java.util.Collection<apltk.interpreter.data.LogicGoal> goals)
|
boolean |
processMessages(java.util.Collection<apltk.interpreter.data.Message> messages,
java.util.Collection<eis.iilang.Percept> percepts)
evaluates the MailBox, updates BeliefBase with others agents information, receive topology from agents which I can see now |
protected boolean |
removeBelief(apltk.interpreter.data.LogicBelief deleteThis)
|
boolean |
removeGoal(apltk.interpreter.data.LogicGoal deleteThis)
|
void |
removeLastGoal()
|
eis.iilang.Action |
selectAction()
main control function; updates belief and goal base, find the possible action with the highest priority and process it further if it is an internalAction |
boolean |
sendTopologyToUnseenAgents()
Agents send their topology information to all unseen agents so that the message-receiver can check whether he and the sender share at least one vertex (i.e. they see each other) |
void |
setMoney(int money)
|
void |
setMyEnergy(int myEnergy)
|
void |
setMyHealth(int myHealth)
|
void |
setMyID(int myID)
|
void |
setMyLastAction(java.lang.String myLastAction)
|
void |
setMyLastActionResult(java.lang.String myLastActionResult)
|
void |
setMyMaxEnergy(int myMaxEnergy)
|
void |
setMyMaxEnergyDisabled(int value)
|
void |
setMyMaxHealth(int myMaxHealth)
|
void |
setMyName(java.lang.String myName)
|
void |
setMyPos(java.lang.String myPos)
|
void |
setMyStrength(int value)
|
void |
setMyTeam(java.lang.String myTeam)
|
void |
setStep(int step)
|
eis.iilang.Action |
step()
Executes one step of the agent. |
boolean |
updateUnseenAgents(java.util.Collection<eis.iilang.Percept> percepts,
java.util.Collection<apltk.interpreter.data.Message> messages)
Checks whether a new agent can be seen. |
Methods inherited from class massim.javaagents.Agent |
---|
addBelief, addGoal, broadcastBelief, clearBeliefs, clearGoals, containsBelief, containsGoal, createAgentFromClass, equals, getAllBeliefs, getAllPercepts, getBeliefBase, getEnvironmentInterface, getGoalBase, getMessages, getName, getTeam, hashCode, println, removeBeliefs, removeGoals, sendMessage, setEnvironmentInterface |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SubsumptionAgent(java.lang.String name, java.lang.String team)
Method Detail |
---|
public abstract java.lang.String getMyRole()
public java.util.Vector<Rule> getRelation()
public void handlePercept(eis.iilang.Percept p)
Agent
getAllPercepts
method which
yields all percepts.
handlePercept
in class Agent
p
- the percept to be handledpublic eis.iilang.Action step()
Agent
step
in class Agent
public eis.iilang.Action selectAction()
-
-
step()
public eis.iilang.Action processAction(InternalAction a, java.util.Collection<apltk.interpreter.data.LogicBelief> beliefs, java.util.Collection<apltk.interpreter.data.LogicGoal> goals)
the
- internalAction which to process, percepts/beliefs/goals
selectAction()
public boolean initDirectEdges(java.util.Collection<eis.iilang.Percept> percepts)
Collection
- selectAction()
public boolean processMessages(java.util.Collection<apltk.interpreter.data.Message> messages, java.util.Collection<eis.iilang.Percept> percepts)
all
- percepts and messages
selectAction()
public boolean updateUnseenAgents(java.util.Collection<eis.iilang.Percept> percepts, java.util.Collection<apltk.interpreter.data.Message> messages)
percepts
- messages
-
public boolean sendTopologyToUnseenAgents()
-
-
selectAction()
public boolean removeGoal(apltk.interpreter.data.LogicGoal deleteThis)
LogicGoal
- deleteThis (the goal which should be deleted)
protected boolean removeBelief(apltk.interpreter.data.LogicBelief deleteThis)
LogicGoal
- deleteThis (the belief which should be deleted)
public void removeLastGoal()
public apltk.interpreter.data.LogicGoal getLastGoal()
public static int getAnzangents()
public int getZoneStart()
public java.lang.String getMyName()
public int getMyID()
public java.lang.String getMyTeam()
public int getMyEnergy()
public int getMyMaxEnergy()
public int getMyMaxEnergyDisabled()
public int getMyHealth()
public int getMyMaxHealth()
public int getMyStrength()
public java.lang.String getMyPos()
public java.lang.String getMyLastActionResult()
public int getStep()
public int getMoney()
public java.lang.String getMyLastAction()
public HelpFunctions getHelpFunctions()
public int getRussianCounter()
public void setMyName(java.lang.String myName)
public void setMyID(int myID)
public void setMyTeam(java.lang.String myTeam)
public void setMyEnergy(int myEnergy)
public void setMyMaxEnergy(int myMaxEnergy)
public void setMyMaxEnergyDisabled(int value)
public void setMyHealth(int myHealth)
public void setMyMaxHealth(int myMaxHealth)
public void setMyStrength(int value)
public void setMyPos(java.lang.String myPos)
public void setMyLastActionResult(java.lang.String myLastActionResult)
public void setMyLastAction(java.lang.String myLastAction)
public void setMoney(int money)
public void setStep(int step)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |