|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcz.cuni.amis.pogamut.base.agent.AbstractAgent
cz.cuni.amis.pogamut.base.agent.AbstractObservingAgent<WORLD_VIEW>
cz.cuni.amis.pogamut.base.agent.AbstractGhostAgent<WORLD_VIEW>
cz.cuni.amis.pogamut.base.agent.AbstractEmbodiedAgent<WORLD_VIEW>
cz.cuni.amis.pogamut.ut2004.bot.AbstractUT2004Bot<WorldView>
cz.cuni.amis.pogamut.ut2004.bot.ThreadedUT2004Bot<WorldView>
cz.cuni.amis.pogamut.ut2004.bot.SyncUT2004Bot<cz.cuni.amis.pogamut.ut2004.agent.worldview.UT2004SyncLockableWorldView>
bot.PolymorphBot
public class PolymorphBot
Emotional scenario polymorph.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class cz.cuni.amis.pogamut.base.agent.AbstractGhostAgent |
|---|
cz.cuni.amis.pogamut.base.agent.AbstractGhostAgent.AgentAct |
| Field Summary | |
|---|---|
cz.cuni.amis.pogamut.ut2004.agent.module.sensor.AgentInfo |
agentInfo
bot memory module - general info about this agent - location, rotation, etc. |
private static double |
AVOID_OBSTACLE_FUNCTION
|
private static double |
AVOID_OBSTACLE_FUNCTION_MULTI
|
private static double |
AVOID_OBSTACLE_MIN_DISTANCE
|
private static double |
AVOID_OBSTACLE_RUN_LENGTH
|
private static double |
AVOID_OBSTACLE_RUN_VECTOR_LENGTH
|
static double |
AVOID_OBSTACLE_SECOND_RUN_MULTI
|
boolean |
bHostilePolymorph
If we are good or bad polymorph |
double |
biteDelayConst
Minimal delay between two bites |
double |
biteDurationConst
How long we will pause logic when we are biting. |
boolean |
bStationaryPolymorph
Ff our polymorph is just staying at its place |
double |
currentTime
Current UnrealTournament time |
cz.cuni.amis.pogamut.ut2004.agent.module.sensor.Game |
game
bot memory module - general info about the game - map, timelimit, etc |
java.util.HashMap<cz.cuni.amis.pogamut.ut2004.communication.messages.UnrealId,cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.NavPoint> |
knownNavPoints
All NavPoints on the map are stored here |
double |
lastBiteTime
Last time we have bitten someone |
double |
lastMessageTime
Last time we have sent text message |
double |
lastMovementTime
Last time we've actually moved |
double |
messageDelayConst
Minimal delay between two messages sent |
double |
messageFadeOutConst
Message text bubble fade out time |
cz.cuni.amis.pogamut.base.agent.worldview.WorldEventListener |
myBegListener
Listens to BeginMessage and stores current UnrealTournament time |
cz.cuni.amis.pogamut.base.agent.worldview.WorldEventListener |
myMapListObtainedListener
Here we will listen to map event and store all nav points in our internals |
cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.NavPoint |
myNavTarget
NavPoint i am heading to |
java.util.ArrayList<cz.cuni.amis.pogamut.base3d.worldview.objects.ILocated> |
myPath
agent pathing helper variable |
cz.cuni.amis.pogamut.base.agent.navigation.PathPlannerListener |
myPathListener
Path listener - initialized in goToLocation method |
cz.cuni.amis.pogamut.ut2004.agent.navigation.UTAstar |
myPathPlanner
Path finding module |
boolean |
pathReceived
agent pathing helper variable |
boolean |
pathRequested
agent pathing helper variable |
cz.cuni.amis.pogamut.ut2004.agent.module.sensor.Players |
players
bot memory module - general info about other agents we can see - location, rotation, etc. |
cz.cuni.amis.pogamut.base3d.worldview.objects.Location |
startLocation
Our start location |
cz.cuni.amis.pogamut.base3d.worldview.objects.Rotation |
startRotation
Our start rotation |
| Fields inherited from class cz.cuni.amis.pogamut.ut2004.bot.ThreadedUT2004Bot |
|---|
logicAlive, logicRunning, logicShouldBeAlive, logicShouldRun, logicThread |
| Fields inherited from class cz.cuni.amis.pogamut.base.agent.AbstractAgent |
|---|
DEFAULT_AGENT_TIMEOUT_MILLIS |
| Constructor Summary | |
|---|---|
PolymorphBot(cz.cuni.amis.pogamut.base.utils.logging.AgentLogger logger,
cz.cuni.amis.pogamut.ut2004.agent.worldview.UT2004SyncLockableWorldView worldView,
cz.cuni.amis.pogamut.base.communication.commands.ICommandSerializer commandSerializer)
Constructor. |
|
| Method Summary | |
|---|---|
private cz.cuni.amis.pogamut.base3d.worldview.objects.Location[] |
adjustLocations(cz.cuni.amis.pogamut.base3d.worldview.objects.Location[] moveLocation)
This will compute new Location to avoid hitting other players. |
protected void |
botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.ConfigChange config,
cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.InitedMessage init)
The bot is initilized in the environment - a physical representation of the bot is present in the game. |
protected void |
botKilled(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.BotKilled event)
Called each time our bot die. |
protected cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands.Initialize |
createInitializeCommand()
Here we can modify initializing command for our bot. |
protected void |
doLogic()
Main method that controls the bot - makes decisions what to do next. |
private double |
forceFunction(double x,
double distance)
Used by obstacle avoidance code. |
protected cz.cuni.amis.pogamut.base3d.worldview.objects.Location |
getNearestNavLocation(cz.cuni.amis.pogamut.base3d.worldview.objects.Location targetLocation)
Returns nearest navigation point to input location in the map. |
boolean |
goToLocation(cz.cuni.amis.pogamut.base3d.worldview.objects.Location targetLocation)
Goes to target location. |
void |
initPolymoprh(ScenarioType type)
Will set up our polymorph internal variables so he can be later set up correctly in the environment by INIT command. |
private cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.NavPoint |
pickNewRandomNavTarget()
Rendomly picks some navigation point to head to. |
protected void |
postPrepareBot(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo info)
Here we have already received information about game in GameInfo |
protected void |
prePrepareBot()
Initialize all necessary variables here, before the bot actually receives anything from the environment. |
void |
shutdown()
Does nothign for the polymorph yet. |
| Methods inherited from class cz.cuni.amis.pogamut.ut2004.bot.SyncUT2004Bot |
|---|
doBotLogic |
| Methods inherited from class cz.cuni.amis.pogamut.ut2004.bot.ThreadedUT2004Bot |
|---|
getBotAlive, getLastLogicRunMillis, getLogicPeriodMillis, kill, logicThreadCreated, pause, resume, setLogicPeriodMillis, start, stop |
| Methods inherited from class cz.cuni.amis.pogamut.ut2004.bot.AbstractUT2004Bot |
|---|
createPasswordReply, getGameInfo, getInitializeCommand, getPasswordReply, getWorldView, initCommandRequested, readyCommandRequested, setPassword |
| Methods inherited from class cz.cuni.amis.pogamut.base.agent.AbstractGhostAgent |
|---|
getAct |
| Methods inherited from class cz.cuni.amis.pogamut.base.agent.AbstractAgent |
|---|
addAgentJMXComponents, getAgentState, getAgentStopTimeoutMillis, getFolder, getJMX, getLogger, getName, log, logPlatform, setAgentState, setAgentState, setAgentStateDescription, terminate, terminate, terminate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public java.util.ArrayList<cz.cuni.amis.pogamut.base3d.worldview.objects.ILocated> myPath
public boolean pathRequested
public boolean pathReceived
public java.util.HashMap<cz.cuni.amis.pogamut.ut2004.communication.messages.UnrealId,cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.NavPoint> knownNavPoints
public cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.NavPoint myNavTarget
public double currentTime
public double lastMovementTime
public double lastBiteTime
public double lastMessageTime
public boolean bHostilePolymorph
public boolean bStationaryPolymorph
public cz.cuni.amis.pogamut.base3d.worldview.objects.Location startLocation
public cz.cuni.amis.pogamut.base3d.worldview.objects.Rotation startRotation
public double biteDurationConst
public double biteDelayConst
public double messageDelayConst
public double messageFadeOutConst
private static final double AVOID_OBSTACLE_FUNCTION
private static final double AVOID_OBSTACLE_FUNCTION_MULTI
private static final double AVOID_OBSTACLE_MIN_DISTANCE
private static final double AVOID_OBSTACLE_RUN_VECTOR_LENGTH
private static final double AVOID_OBSTACLE_RUN_LENGTH
public static double AVOID_OBSTACLE_SECOND_RUN_MULTI
public cz.cuni.amis.pogamut.ut2004.agent.module.sensor.Game game
public cz.cuni.amis.pogamut.ut2004.agent.module.sensor.AgentInfo agentInfo
public cz.cuni.amis.pogamut.ut2004.agent.module.sensor.Players players
public cz.cuni.amis.pogamut.ut2004.agent.navigation.UTAstar myPathPlanner
public cz.cuni.amis.pogamut.base.agent.worldview.WorldEventListener myMapListObtainedListener
public cz.cuni.amis.pogamut.base.agent.worldview.WorldEventListener myBegListener
public cz.cuni.amis.pogamut.base.agent.navigation.PathPlannerListener myPathListener
| Constructor Detail |
|---|
public PolymorphBot(cz.cuni.amis.pogamut.base.utils.logging.AgentLogger logger,
cz.cuni.amis.pogamut.ut2004.agent.worldview.UT2004SyncLockableWorldView worldView,
cz.cuni.amis.pogamut.base.communication.commands.ICommandSerializer commandSerializer)
logger - worldView - commandSerializer - | Method Detail |
|---|
protected void prePrepareBot()
prePrepareBot in class cz.cuni.amis.pogamut.ut2004.bot.AbstractUT2004Bot<cz.cuni.amis.pogamut.ut2004.agent.worldview.UT2004SyncLockableWorldView>protected void postPrepareBot(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo info)
postPrepareBot in class cz.cuni.amis.pogamut.ut2004.bot.AbstractUT2004Bot<cz.cuni.amis.pogamut.ut2004.agent.worldview.UT2004SyncLockableWorldView>info - protected cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands.Initialize createInitializeCommand()
createInitializeCommand in class cz.cuni.amis.pogamut.ut2004.bot.AbstractUT2004Bot<cz.cuni.amis.pogamut.ut2004.agent.worldview.UT2004SyncLockableWorldView>
protected void botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.ConfigChange config,
cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.InitedMessage init)
botInitialized in class cz.cuni.amis.pogamut.ut2004.bot.AbstractUT2004Bot<cz.cuni.amis.pogamut.ut2004.agent.worldview.UT2004SyncLockableWorldView>config - information about configurationinit - information about configuration
protected void doLogic()
throws cz.cuni.amis.pogamut.base.exceptions.PogamutException
doLogic in class cz.cuni.amis.pogamut.ut2004.bot.SyncUT2004Bot<cz.cuni.amis.pogamut.ut2004.agent.worldview.UT2004SyncLockableWorldView>cz.cuni.amis.pogamut.base.exceptions.PogamutExceptionprotected void botKilled(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.BotKilled event)
botKilled in class cz.cuni.amis.pogamut.ut2004.bot.ThreadedUT2004Bot<cz.cuni.amis.pogamut.ut2004.agent.worldview.UT2004SyncLockableWorldView>event - public void initPolymoprh(ScenarioType type)
type - public void shutdown()
private double forceFunction(double x,
double distance)
x - distance -
private cz.cuni.amis.pogamut.base3d.worldview.objects.Location[] adjustLocations(cz.cuni.amis.pogamut.base3d.worldview.objects.Location[] moveLocation)
moveLocation -
public boolean goToLocation(cz.cuni.amis.pogamut.base3d.worldview.objects.Location targetLocation)
targetLocation -
protected cz.cuni.amis.pogamut.base3d.worldview.objects.Location getNearestNavLocation(cz.cuni.amis.pogamut.base3d.worldview.objects.Location targetLocation)
targetLocation -
private cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.NavPoint pickNewRandomNavTarget()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||