public class ActionGenerator extends Object
Constructor and Description |
---|
ActionGenerator(Graph graph,
ZoneManager zoneManager,
StrategyBasedAgent agent) |
Modifier and Type | Method and Description |
---|---|
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(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(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
|
public ActionGenerator(Graph graph, ZoneManager zoneManager, StrategyBasedAgent agent)
public eis.iilang.Action destroyZone()
public eis.iilang.Action destroyZone(Zone targetZone)
targetZone
- the zone to destroypublic eis.iilang.Action buildZone()
public eis.iilang.Action determineExpansion(Zone zone)
zone
- the zone which the agent might expandpublic eis.iilang.Action expandOwnComponent()
public eis.iilang.Action randomWalk()
public eis.iilang.Action moveTowardsAgent(String role)
role
- the role of the agent to go topublic eis.iilang.Action moveTowards(Vertex vertex)
vertex
- a vertex of the zone.public eis.iilang.Action moveTowardsNearest(LinkedList<Vertex> targetList)
targetList
- the list of targets to choose frompublic eis.iilang.Action moveFastTo(Vertex target)
target
- the vertex to move topublic 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 zonepublic void setGraph(Graph graph)
public Graph getGraph()
Copyright © 2013. All Rights Reserved.