mas.agentsHempelsSofa
Class StrategyBasedRepairerAgent

java.lang.Object
  extended by massim.javaagents.Agent
      extended by mas.agentsHempelsSofa.StrategyBasedAgent
          extended by mas.agentsHempelsSofa.StrategyBasedRepairerAgent

public class StrategyBasedRepairerAgent
extends StrategyBasedAgent


Field Summary
 
Fields inherited from class mas.agentsHempelsSofa.StrategyBasedAgent
ag, environment, graph, myToken, percepts, SHOW_GRAPH_WINDOW, tactics
 
Fields inherited from class massim.javaagents.Agent
beliefs, goals
 
Constructor Summary
StrategyBasedRepairerAgent(java.lang.String name, java.lang.String team)
          Default Constructor
 
Method Summary
 eis.iilang.Action generateAchievementAction(java.lang.String focus)
          Generates an action, which is meant to contribute to the achievements The possible tributes from a repairer agent are surveying, parrying or improving the zoneValue
 eis.iilang.Action generateBuyAction(java.lang.String focus)
          Generates a buy-Action, which purchases things fr the agents according to the focus
 eis.iilang.Action generateDefensiveAction(java.lang.String focus)
          Generates an defensive oriented action.
 eis.iilang.Action generateOffensiveAction(java.lang.String focus)
          Generates an offensive oriented move.
 eis.iilang.Action generateZoneAction(java.lang.String focus)
          Generates an Action, which contributes to building a Zone If the focus is received, it will be pursued for NUMBER_OF_STEPS_BuildZone Steps
 void handleAgentSpecificMessages()
          Handles the agent specific messages.
 void preferencesRevision()
          Revises the preferences of the agent.
 
Methods inherited from class mas.agentsHempelsSofa.StrategyBasedAgent
broadcast, checkEnergy, clearlog, enemyNearby, enemySaboteurAt, enemyUnknownAgentAt, finalize, getDefaultStrategy, getEnvironment, getGraph, getLastStrategy, getMyToken, getPercepts, getStrategy, getZoneManager, handlePercept, loadStrategy, loadStrategy, log, reloadStrategy, setEnvironment, setGraph, setMyToken, setPercepts, setStrategy, setZoneManager, step, toString, unsurveyedEdgesNearby
 
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, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StrategyBasedRepairerAgent

public StrategyBasedRepairerAgent(java.lang.String name,
                                  java.lang.String team)
Default Constructor

Parameters:
name - the name of the agent
team - the team of the agent
Method Detail

generateAchievementAction

public eis.iilang.Action generateAchievementAction(java.lang.String focus)
Generates an action, which is meant to contribute to the achievements The possible tributes from a repairer agent are surveying, parrying or improving the zoneValue

Specified by:
generateAchievementAction in class StrategyBasedAgent
Parameters:
focus -
  • achievementsProbedVertices,
  • achievementsSurveyedEdges,
  • achievementsInspectedAgents,
  • achievementsSuccessfulAttacks,
  • achievementsSuccessfulParries,
  • achievementsAreaValue
Returns:
a specific action.

generateBuyAction

public eis.iilang.Action generateBuyAction(java.lang.String focus)
Generates a buy-Action, which purchases things fr the agents according to the focus

Specified by:
generateBuyAction in class StrategyBasedAgent
Parameters:
focus -
  • buyBattery,
  • buySabotageDevice,
  • buySensor,
  • buyShield
Returns:
a specific action.

generateZoneAction

public eis.iilang.Action generateZoneAction(java.lang.String focus)
Generates an Action, which contributes to building a Zone If the focus is received, it will be pursued for NUMBER_OF_STEPS_BuildZone Steps

Specified by:
generateZoneAction in class StrategyBasedAgent
Parameters:
focus -
  • zoneExpand,
  • zoneStability,
  • zoneMainZone,
  • zoneDrawback
Returns:
a specific action.

generateOffensiveAction

public eis.iilang.Action generateOffensiveAction(java.lang.String focus)
Generates an offensive oriented move. If the focus is DestryoZones, the agent will move towards an enemy zone and seek to destroy it or, if the focus is Drawback, he will retreat towards the own main zone

Specified by:
generateOffensiveAction in class StrategyBasedAgent
Parameters:
focus -
  • offensiveDestroyZones,
  • offensiveDestroyAgents,
  • offensiveDrawback
Returns:
a specific action.

generateDefensiveAction

public eis.iilang.Action generateDefensiveAction(java.lang.String focus)
Generates an defensive oriented action. The agent will move towards the other repairer, if he is damaged Then he will seek to repair other damaged agents and move towards them

Specified by:
generateDefensiveAction in class StrategyBasedAgent
Parameters:
focus -
  • defensiveParry,
  • defensiveRunAway,
  • defensiveRepair,
Returns:
a specific action.

handleAgentSpecificMessages

public void handleAgentSpecificMessages()
Handles the agent specific messages. Not used so far.

Specified by:
handleAgentSpecificMessages in class StrategyBasedAgent

preferencesRevision

public void preferencesRevision()
Revises the preferences of the agent.

Specified by:
preferencesRevision in class StrategyBasedAgent


Copyright © 2012. All Rights Reserved.