Package net.sf.colossus.ai.objectives
Class PreserveCreatureTacticalObjective
java.lang.Object
net.sf.colossus.ai.objectives.AbstractTacticalObjective
net.sf.colossus.ai.objectives.PreserveCreatureTacticalObjective
- All Implemented Interfaces:
TacticalObjective
The tactical objective of preserving all of a specific CreatureType.
The evaluation function currently return the negative of the highest amount
of point gang-banging any one of the creaturetype in our legion, multiplied
by the priority. Rangestriker count for half. This doesn't take a number
into account, so if you try to preserve 2 out of 3 Lions, this will
try to protect ALL Lions. This is capped to 0 after the objective has
failed.
The objective is attained as long as enough creature are alive.
- Author:
- Romain Dolbeau
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPreserveCreatureTacticalObjective
(float priority, Client client, Legion liveLegion, Creature critter) -
Method Summary
Modifier and TypeMethodDescriptionGet the description of this objective.boolean
Whether the objective is already achievedHow much does the 'current situation' contributes to the objective.Methods inherited from class net.sf.colossus.ai.objectives.AbstractTacticalObjective
changePriority, getPriority
-
Field Details
-
LOGGER
-
critter
-
liveLegion
-
client
-
count
private final int count
-
-
Constructor Details
-
PreserveCreatureTacticalObjective
-
-
Method Details
-
objectiveAttained
public boolean objectiveAttained()Description copied from interface:TacticalObjective
Whether the objective is already achieved- Returns:
- Whether the objective is already achieved
-
situationContributeToTheObjective
Description copied from interface:TacticalObjective
How much does the 'current situation' contributes to the objective. The actual value is currently added to the overall evaluation of the whole legion move.- Returns:
- How much does he 'current situation' contributes to the objective
-
getDescription
Description copied from interface:TacticalObjective
Get the description of this objective.- Returns:
- The description of this objective.
-