Package net.sf.colossus.ai
Class ExperimentalAI
- java.lang.Object
-
- net.sf.colossus.ai.AbstractAI
-
- net.sf.colossus.ai.SimpleAI
-
- 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
Fields Modifier and Type Field Description 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
Constructors Constructor Description ExperimentalAI(Client client)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<CritterMove>
battleMove()
Return a list of critter moves, in best move order.void
cleanupBattle()
a Battle is finishedprotected void
evaluateCritterMove_Defender(BattleCritter critter, ValueRecorder value, MasterBoardTerrain terrain, BattleHex hex, LegionClientSide legion, int turn)
this compute for non-titan defending critterprotected 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 critterprotected 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
-
-
-
-
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 classSimpleAI
-
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 interfaceAI
- Overrides:
battleMove
in classSimpleAI
-
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 classSimpleAI
-
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 classSimpleAI
-
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 classSimpleAI
-
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 classSimpleAI
-
evaluateLegionBattleMoveAsAWhole
protected int evaluateLegionBattleMoveAsAWhole(LegionMove lm, java.util.Map<BattleHex,java.lang.Integer> strikeMap, ValueRecorder value)
- Overrides:
evaluateLegionBattleMoveAsAWhole
in classSimpleAI
-
initBattle
public void initBattle()
Description copied from interface:AI
a Battle start- Specified by:
initBattle
in interfaceAI
- Overrides:
initBattle
in classAbstractAI
-
cleanupBattle
public void cleanupBattle()
Description copied from interface:AI
a Battle is finished- Specified by:
cleanupBattle
in interfaceAI
- Overrides:
cleanupBattle
in classAbstractAI
-
-