net.sf.colossus.ai.objectives
Class BasicObjectiveHelper

java.lang.Object
  extended by net.sf.colossus.ai.objectives.BasicObjectiveHelper
All Implemented Interfaces:
IObjectiveHelper

public class BasicObjectiveHelper
extends java.lang.Object
implements IObjectiveHelper

A naive (basic!) implementation of @IObjectiveHelper. This is still mostly for testing the code.

Author:
Romain Dolbeau

Nested Class Summary
(package private)  class BasicObjectiveHelper.AllThereIsToKnowAboutYourCreature
           
protected  class BasicObjectiveHelper.ObjectiveEvalConstants
           
 
Field Summary
private  AbstractAI ai
           
private  Client client
           
private static java.util.Comparator<BasicObjectiveHelper.AllThereIsToKnowAboutYourCreature> HEURISTIC_ORDER
           
private static java.util.logging.Logger LOGGER
           
private  BasicObjectiveHelper.ObjectiveEvalConstants oec
           
private  Variant variant
           
 
Constructor Summary
BasicObjectiveHelper(Client client, AbstractAI ai, Variant variant)
           
 
Method Summary
 java.util.List<TacticalObjective> attackerObjective()
          Currently attackerObjective is very dumb: try and kill the Titan (if there) and the biggest creature
private  java.util.List<TacticalObjective> commonObjective(Legion myself)
           
 java.util.List<TacticalObjective> defenderObjective()
           
private  BasicObjectiveHelper.AllThereIsToKnowAboutYourCreature findCreatureToDestroyInAttacker()
          really stupid heuristic
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGGER

private static final java.util.logging.Logger LOGGER

oec

private final BasicObjectiveHelper.ObjectiveEvalConstants oec

client

private final Client client

ai

private final AbstractAI ai

variant

private final Variant variant

HEURISTIC_ORDER

private static final java.util.Comparator<BasicObjectiveHelper.AllThereIsToKnowAboutYourCreature> HEURISTIC_ORDER
Constructor Detail

BasicObjectiveHelper

public BasicObjectiveHelper(Client client,
                            AbstractAI ai,
                            Variant variant)
Method Detail

findCreatureToDestroyInAttacker

private BasicObjectiveHelper.AllThereIsToKnowAboutYourCreature findCreatureToDestroyInAttacker()
really stupid heuristic


commonObjective

private java.util.List<TacticalObjective> commonObjective(Legion myself)

attackerObjective

public java.util.List<TacticalObjective> attackerObjective()
Currently attackerObjective is very dumb: try and kill the Titan (if there) and the biggest creature

Specified by:
attackerObjective in interface IObjectiveHelper

defenderObjective

public java.util.List<TacticalObjective> defenderObjective()
Specified by:
defenderObjective in interface IObjectiveHelper