mas.agentsHempelsSofa
Class StrategyBasedSaboteurAgent

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

public class StrategyBasedSaboteurAgent
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
StrategyBasedSaboteurAgent(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 Besides attacking, which is done in generateOffensiveAction(), the Saboteur Agent can Survey or contribute to the zone-value
 eis.iilang.Action generateBuyAction(java.lang.String focus)
          Generates a buy-Action, which purchases things for 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, which includes the messages from the other saboteur about a successful attack or a message for the defending saboteur agent in the zone
 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

StrategyBasedSaboteurAgent

public StrategyBasedSaboteurAgent(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 Besides attacking, which is done in generateOffensiveAction(), the Saboteur Agent can Survey or contribute to the zone-value

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 for 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. The agent will check, if there are agents on his actual position which he can attack. If there are no agents, he will seek to destroy an enemy zone or an enemy agent, according to the focus that was received

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 only time this is used, is when the agent itself is disabled

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

handleAgentSpecificMessages

public void handleAgentSpecificMessages()
Handles the agent specific messages, which includes the messages from the other saboteur about a successful attack or a message for the defending saboteur agent in the zone

Specified by:
handleAgentSpecificMessages in class StrategyBasedAgent

preferencesRevision

public void preferencesRevision()
Revises the preferences of the agent. First checks, if he has been attacked, then if he can attack and then, if there are tactics to follow

Specified by:
preferencesRevision in class StrategyBasedAgent


Copyright © 2012. All Rights Reserved.