cz.cuni.amis.pogamut.defcon.example
Class ExampleBotLogicController

Package class diagram package ExampleBotLogicController
java.lang.Object
  extended by cz.cuni.amis.pogamut.defcon.agent.impl.DefConAgentController<AGENT>
      extended by cz.cuni.amis.pogamut.defcon.agent.impl.DefConAgentLogicController<ExampleBot>
          extended by cz.cuni.amis.pogamut.defcon.example.ExampleBotLogicController
All Implemented Interfaces:
cz.cuni.amis.pogamut.base.agent.module.IAgentLogic<cz.cuni.amis.pogamut.base.agent.module.LogicModule<ExampleBot>>, IDefConAgentController<ExampleBot>, IDefConAgentLogicController<ExampleBot,cz.cuni.amis.pogamut.base.agent.module.LogicModule<ExampleBot>>

public class ExampleBotLogicController
extends DefConAgentLogicController<ExampleBot>

Example of a bot.

Author:
Radek 'Black_Hand' Pibil

Nested Class Summary
protected static class ExampleBotLogicController.PrecomputingStage
          Since this bot is implemented as a state machine we have to declare states.
 
Field Summary
protected static int BUILDING_PLACEMENT_TRANSPOSITIONS
           
protected  ExampleBotLogicController.PrecomputingStage[] buildingPlacementOrdering
           
protected  ClosestPointsManager closestPoints
           
protected  LinkedList<LinkedList<QuadTree>> enemyQuadTrees
           
protected  ClosestPointsLookUp lookup
           
protected  GameMapInfoPolygons mapInfo
           
protected  LinkedList<QuadTree> placeableWaterQuadTrees
           
protected  IPlacingFinishedListener placedFleetListener
          Reacts to fleets manager finishing placing.
protected  int placementIndex
           
protected  BuildingPlacementProvider placementProvider
           
protected  ExampleBotLogicController.PrecomputingStage precomputingStage
           
protected  QuadTreesManager qTreesManager
           
protected  int semaphore
           
 
Fields inherited from class cz.cuni.amis.pogamut.defcon.agent.impl.DefConAgentLogicController
buildingsManager, flagChecker, fleetsManager, gameInfo, gameStartedListener, logicModule, worldview
 
Fields inherited from class cz.cuni.amis.pogamut.defcon.agent.impl.DefConAgentController
agent
 
Constructor Summary
ExampleBotLogicController()
           
 
Method Summary
protected  void createClosestPoints()
           
protected  void createGameMapInfoPolygons()
          Prepares, construct and triggers processing of game map analysis.
protected  void createQuadTrees()
          Creates quad trees from game map info polys.
 void firstGameLogic()
           
 void gameLogic()
          State machine switch.
protected  ExampleBotLogicController.PrecomputingStage getNextBuildingPlacementStage()
           
protected  void permuteBuildingPlaccementOrdering()
           
 
Methods inherited from class cz.cuni.amis.pogamut.defcon.agent.impl.DefConAgentLogicController
addGameLogicListener, beforeFirstLogic, gameLogicWorker, getBuildingsManager, getFlagChecker, getFleetsManager, getLogicInitializeTime, getLogicShutdownTime, getMailBox, getRandom, initializeController, logic, logicInitialize, logicShutdown, preGameLogic, unregisterUpdates
 
Methods inherited from class cz.cuni.amis.pogamut.defcon.agent.impl.DefConAgentController
act, botStopped, getAct, getGameInfo, getLog, getWorldView
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface cz.cuni.amis.pogamut.defcon.agent.IDefConAgentController
botStopped
 

Field Detail

placeableWaterQuadTrees

protected LinkedList<QuadTree> placeableWaterQuadTrees

enemyQuadTrees

protected LinkedList<LinkedList<QuadTree>> enemyQuadTrees

mapInfo

protected GameMapInfoPolygons mapInfo

closestPoints

protected ClosestPointsManager closestPoints

lookup

protected ClosestPointsLookUp lookup

qTreesManager

protected QuadTreesManager qTreesManager

placementProvider

protected BuildingPlacementProvider placementProvider

precomputingStage

protected ExampleBotLogicController.PrecomputingStage precomputingStage

buildingPlacementOrdering

protected final ExampleBotLogicController.PrecomputingStage[] buildingPlacementOrdering

BUILDING_PLACEMENT_TRANSPOSITIONS

protected static final int BUILDING_PLACEMENT_TRANSPOSITIONS
See Also:
Constant Field Values

placementIndex

protected int placementIndex

semaphore

protected int semaphore

placedFleetListener

protected IPlacingFinishedListener placedFleetListener
Reacts to fleets manager finishing placing.

Constructor Detail

ExampleBotLogicController

public ExampleBotLogicController()
Method Detail

firstGameLogic

public void firstGameLogic()
Overrides:
firstGameLogic in class DefConAgentLogicController<ExampleBot>

permuteBuildingPlaccementOrdering

protected void permuteBuildingPlaccementOrdering()

getNextBuildingPlacementStage

protected ExampleBotLogicController.PrecomputingStage getNextBuildingPlacementStage()

createGameMapInfoPolygons

protected void createGameMapInfoPolygons()
Prepares, construct and triggers processing of game map analysis.


createQuadTrees

protected void createQuadTrees()
Creates quad trees from game map info polys.


createClosestPoints

protected void createClosestPoints()

gameLogic

public void gameLogic()
State machine switch.

Overrides:
gameLogic in class DefConAgentLogicController<ExampleBot>


Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.