net.sf.colossus.ai
Class ExperimentalAI

java.lang.Object
  extended by net.sf.colossus.ai.AbstractAI
      extended by net.sf.colossus.ai.SimpleAI
          extended by net.sf.colossus.ai.ExperimentalAI
All Implemented Interfaces:
AI
Direct Known Subclasses:
ParallelEvaluatorAI

public class ExperimentalAI
extends SimpleAI

Yet Another AI, to test some stuff.

Author:
Romain Dolbeau

Nested Class Summary
 
Nested classes/interfaces inherited from class net.sf.colossus.ai.SimpleAI
SimpleAI.PowerSkill, SimpleAI.TriggerTimeIsUp
 
Nested classes/interfaces inherited from class net.sf.colossus.ai.AbstractAI
AbstractAI.AbstractAIOracle, AbstractAI.CreatureValueConstants, AbstractAI.MoveInfo
 
Field Summary
private  java.util.List<TacticalObjective> listObjectives
           
private static java.util.logging.Logger LOGGER
           
private static long MAX_EXHAUSTIVE_SEARCH_MOVES
           
 
Fields inherited from class net.sf.colossus.ai.SimpleAI
MIN_ITERATIONS, timeIsUp, timeLimit
 
Fields inherited from class net.sf.colossus.ai.AbstractAI
bec, client, cvc, hintSectionUsed, random, variant
 
Constructor Summary
ExperimentalAI(Client client)
           
 
Method Summary
 java.util.List<CritterMove> battleMove()
          Return a list of critter moves, in best move order.
 void cleanupBattle()
          a Battle is finished
protected  void evaluateCritterMove_Defender(BattleCritter critter, ValueRecorder value, MasterBoardTerrain terrain, BattleHex hex, LegionClientSide legion, int turn)
          this compute for non-titan defending critter
protected  void evaluateCritterMove_Rangestrike(BattleCritter critter, java.util.Map<BattleHex,java.lang.Integer> strikeMap, ValueRecorder value, MasterBoardTerrain terrain, BattleHex hex, int power, int skill, LegionClientSide legion, int turn, java.util.Set<BattleHex> targetHexes)
          "Does nothing" override of evaluateCritterMove_Rangestrike in @SimpleAI.
protected  void evaluateCritterMove_Strike(BattleCritter critter, java.util.Map<BattleHex,java.lang.Integer> strikeMap, ValueRecorder value, MasterBoardTerrain terrain, BattleHex hex, int power, int skill, LegionClientSide legion, int turn, java.util.Set<BattleHex> targetHexes)
          "Does nothing" override of evaluateCritterMove_Strike in @SimpleAI.
protected  void evaluateCritterMove_Titan(BattleCritter critter, ValueRecorder value, MasterBoardTerrain terrain, BattleHex hex, Legion legion, int turn)
          this computes the special case of the Titan critter
protected  int evaluateLegionBattleMoveAsAWhole(LegionMove lm, java.util.Map<BattleHex,java.lang.Integer> strikeMap, ValueRecorder value)
           
(package private)  java.util.Collection<LegionMove> findLegionMoves(java.util.List<java.util.List<CritterMove>> allCritterMoves)
          allCritterMoves is a List of sorted MoveLists.
 void initBattle()
          a Battle start
 
Methods inherited from class net.sf.colossus.ai.SimpleAI
acquireAngel, chooseRecruit, concede, doInitialGameSplit, evaluateLegionBattleMove, findBestLegionMove, findWeakestTwoCritters, flee, getCreatureMoveLimit, getNativeValue, handleCarries, handleMulligans, masterMove, muster, pickColor, pickEngagement, pickEntrySide, pickMarker, pickStrikePenalty, RATIO_DRAW, RATIO_LOSE_HEAVY_LOSS, RATIO_WIN_HEAVY_LOSS, RATIO_WIN_MINIMAL_LOSS, reinforce, retryFailedBattleMoves, setupTimer, split, splitCallback, strike, summonAngel
 
Methods inherited from class net.sf.colossus.ai.AbstractAI
buildEnemyAttackMap, couldRecruitUp, countCreatureAccrossAllLegionFromPlayer, findStrikeMap, generateDamageMap, generateLegionMoves, getAcqStepValue, getBattleStrike, getBattleUnit, getCaretaker, getHintedRecruitmentValue, getHintedRecruitmentValueNonTitan, getHintedRecruitmentValueNonTitan, getInitialSplitHint, getKillValue, getKillValue, getNumberOfWaysToTerrain, getVariantRecruitHint, hasOpponentNativeCreature, isHumanLegion, makeLegionMove, rangeToClosestOpponent, setVariant
 
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

MAX_EXHAUSTIVE_SEARCH_MOVES

private static final long MAX_EXHAUSTIVE_SEARCH_MOVES
See Also:
Constant Field Values

listObjectives

private java.util.List<TacticalObjective> listObjectives
Constructor Detail

ExperimentalAI

public ExperimentalAI(Client client)
Method Detail

findLegionMoves

java.util.Collection<LegionMove> findLegionMoves(java.util.List<java.util.List<CritterMove>> allCritterMoves)
Description copied from class: SimpleAI
allCritterMoves is a List of sorted MoveLists. A MoveList is a sorted List of CritterMoves for one critter. Return a sorted List of LegionMoves. A LegionMove is a List of one CritterMove per mobile critter in the legion, where no two critters move to the same hex.

Overrides:
findLegionMoves in class SimpleAI

battleMove

public java.util.List<CritterMove> battleMove()
Description copied from class: SimpleAI
Return a list of critter moves, in best move order.

Specified by:
battleMove in interface AI
Overrides:
battleMove in class SimpleAI

evaluateCritterMove_Titan

protected void evaluateCritterMove_Titan(BattleCritter critter,
                                         ValueRecorder value,
                                         MasterBoardTerrain terrain,
                                         BattleHex hex,
                                         Legion legion,
                                         int turn)
this computes the special case of the Titan critter

Overrides:
evaluateCritterMove_Titan in class SimpleAI

evaluateCritterMove_Defender

protected void evaluateCritterMove_Defender(BattleCritter critter,
                                            ValueRecorder value,
                                            MasterBoardTerrain terrain,
                                            BattleHex hex,
                                            LegionClientSide legion,
                                            int turn)
this compute for non-titan defending critter

Overrides:
evaluateCritterMove_Defender in class SimpleAI

evaluateCritterMove_Strike

protected void evaluateCritterMove_Strike(BattleCritter critter,
                                          java.util.Map<BattleHex,java.lang.Integer> strikeMap,
                                          ValueRecorder value,
                                          MasterBoardTerrain terrain,
                                          BattleHex hex,
                                          int power,
                                          int skill,
                                          LegionClientSide legion,
                                          int turn,
                                          java.util.Set<BattleHex> targetHexes)
"Does nothing" override of evaluateCritterMove_Strike in @SimpleAI. The job of that one is handled (supposedly better... I wish) by the objectives code.

Overrides:
evaluateCritterMove_Strike in class SimpleAI

evaluateCritterMove_Rangestrike

protected void evaluateCritterMove_Rangestrike(BattleCritter critter,
                                               java.util.Map<BattleHex,java.lang.Integer> strikeMap,
                                               ValueRecorder value,
                                               MasterBoardTerrain terrain,
                                               BattleHex hex,
                                               int power,
                                               int skill,
                                               LegionClientSide legion,
                                               int turn,
                                               java.util.Set<BattleHex> targetHexes)
"Does nothing" override of evaluateCritterMove_Rangestrike in @SimpleAI. The job of that one is handled (supposedly better... I wish) by the objectives code.

Overrides:
evaluateCritterMove_Rangestrike in class SimpleAI

evaluateLegionBattleMoveAsAWhole

protected int evaluateLegionBattleMoveAsAWhole(LegionMove lm,
                                               java.util.Map<BattleHex,java.lang.Integer> strikeMap,
                                               ValueRecorder value)
Overrides:
evaluateLegionBattleMoveAsAWhole in class SimpleAI

initBattle

public void initBattle()
Description copied from interface: AI
a Battle start

Specified by:
initBattle in interface AI
Overrides:
initBattle in class AbstractAI

cleanupBattle

public void cleanupBattle()
Description copied from interface: AI
a Battle is finished

Specified by:
cleanupBattle in interface AI
Overrides:
cleanupBattle in class AbstractAI