|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmas.agentsHempelsSofa.util.ActionGenerator
public class ActionGenerator
An action generator which provides some general actions for all strategy-based agents.
Constructor Summary | |
---|---|
ActionGenerator(Graph graph,
ZoneManager zoneManager,
StrategyBasedAgent agent)
|
Method Summary | |
---|---|
eis.iilang.Action |
buildZone()
generates an action which contributes to building a zone |
eis.iilang.Action |
destroyZone()
generates an action which contributes to destroying the enemies most precious zone |
eis.iilang.Action |
destroyZone(Zone targetZone)
generates an action which contributes to destroying a target zone |
int |
determineConnectivity(Vertex vertex,
Zone zone)
this method tells with how many frontier agents of a zone a vertex is connected when you call this method from an agents surrounding. |
eis.iilang.Action |
determineExpansion(Zone zone)
determines whether an agent on the frontier of the zone should try to expand, parry, survey or recharge |
eis.iilang.Action |
expandOwnComponent()
generates an action that extends the agents connected component by surveying (-> money), or taking a walk towards unsurveyed edges |
eis.iilang.Action |
expandZoneAtRandom(Zone zone)
generates a random goto action to the outside of the Zone if Agent is on frontier agent @ inside of zone: -> move towards frontier agent @ outside of zone: -> move towards frontier error: -> randomWalk() |
eis.iilang.Action |
expandZoneBySize(Zone zone)
creates an goto action to a vertex outside that will expand the Zone by moving to a Node outside of the Zone |
eis.iilang.Action |
expandZoneByValue(Zone zone)
creates an gotoAction towards a probably very precious Vertex outside of the Zone this vertex' value is guessed by the value of its neighbours |
Graph |
getGraph()
|
eis.iilang.Action |
moveFastTo(Vertex target)
generates an action, which leads to the path with least number of vertices |
eis.iilang.Action |
moveTowards(Vertex vertex)
Is agent-type unspecific method that generates a goto action towards the closest vertex part of the frontier |
eis.iilang.Action |
moveTowardsAgent(java.lang.String role)
generates an action that moves the agent to another agent. if the agent role is at the position, the returned action is "recharge" |
eis.iilang.Action |
moveTowardsNearest(java.util.LinkedList<Vertex> targetList)
Is agent-type unspecific method that generates a goto action towards the closest of the given vertices |
eis.iilang.Action |
randomWalk()
returns a random goto action |
void |
setGraph(Graph graph)
|
eis.iilang.Action |
stabilizeZone(Zone zone)
picks a vertex that is well connected to the current zone and goes towards it |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ActionGenerator(Graph graph, ZoneManager zoneManager, StrategyBasedAgent agent)
Method Detail |
---|
public eis.iilang.Action destroyZone()
public eis.iilang.Action destroyZone(Zone targetZone)
targetZone
- the zone to destroy
public eis.iilang.Action buildZone()
public eis.iilang.Action determineExpansion(Zone zone)
zone
- the zone which the agent might expand
public eis.iilang.Action expandOwnComponent()
public eis.iilang.Action randomWalk()
public eis.iilang.Action moveTowardsAgent(java.lang.String role)
role
- the role of the agent to go to
public eis.iilang.Action moveTowards(Vertex vertex)
vertex
- a vertex of the zone.
public eis.iilang.Action moveTowardsNearest(java.util.LinkedList<Vertex> targetList)
targetList
- the list of targets to choose from
public eis.iilang.Action moveFastTo(Vertex target)
target
- the vertex to move to
public eis.iilang.Action expandZoneAtRandom(Zone zone)
public eis.iilang.Action expandZoneByValue(Zone zone)
zone
-
public eis.iilang.Action expandZoneBySize(Zone zone)
zone
- public eis.iilang.Action stabilizeZone(Zone zone)
public int determineConnectivity(Vertex vertex, Zone zone)
vertex
- the positionzone
- the zone
public void setGraph(Graph graph)
public Graph getGraph()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |