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
class PreserveCreatureTacticalObjective
- extends AbstractTacticalObjective
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOGGER
private static final java.util.logging.Logger LOGGER
critter
private final Creature critter
liveLegion
private final Legion liveLegion
client
private final Client client
count
private final int count
PreserveCreatureTacticalObjective
PreserveCreatureTacticalObjective(float priority,
Client client,
Legion liveLegion,
Creature critter)
objectiveAttained
public boolean objectiveAttained()
- Description copied from interface:
TacticalObjective
- Whether the objective is already achieved
- Returns:
- Whether the objective is already achieved
situationContributeToTheObjective
public ValueRecorder 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
public java.lang.String getDescription()
- Description copied from interface:
TacticalObjective
- Get the description of this objective.
- Returns:
- The description of this objective.