|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotController<BOT>
cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotLogicController<BOT>
cz.cuni.amis.pogamut.ut3.bot.impl.UT3BotModuleController<cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004Bot>
nl.tudelft.goal.ut3.agent.UT3BotBehavior
public class UT3BotBehavior
Field Summary | |
---|---|
protected long |
actionCount
|
protected nl.tudelft.pogamut.unreal.agent.module.shooting.util.OrderedFocusProvider |
focus
|
protected long |
logicIteration
|
protected nl.tudelft.pogamut.unreal.agent.module.shooting.util.FocusProvider |
lookFocus
|
protected List<ContextSelector> |
lookSelector
|
protected nl.tudelft.goal.unreal.messages.BotParameters |
parameters
Settings for the bot. |
protected eis.eis2java.util.AllPerceptsModule |
percepts
|
protected nl.tudelft.pogamut.unreal.agent.module.sensor.Projectiles |
projectiles
|
protected nl.tudelft.goal.unreal.floydwarshall.SharedFloydWarshallMap |
sfwMap
Path-planner ( IPathPlanner using NavPoint s), you may use
it to find paths inside the environment wihtout waiting for round-trip of
GetPath command and PathList s response from UT2004. |
protected List<ContextSelector> |
targetSelector
|
protected nl.tudelft.pogamut.unreal.agent.module.shooting.WeaponryShooting |
weaponShooting
|
Fields inherited from class cz.cuni.amis.pogamut.ut3.bot.impl.UT3BotModuleController |
---|
act, body, config, ctf, fwMap, game, getBackToNavGraph, info, items, listenerRegistrator, move, navBuilder, navigation, pathExecutor, pathPlanner, players, random, raycasting, runStraight, senses, shoot, visibility, weaponPrefs, weaponry, world |
Fields inherited from class cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotLogicController |
---|
logicModule |
Fields inherited from class cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotController |
---|
bot, log, USER_LOG_CATEGORY_ID |
Constructor Summary | |
---|---|
UT3BotBehavior()
|
Method Summary | |
---|---|
nl.tudelft.goal.unreal.messages.Percept |
actionCount()
Deprecated. |
void |
addAction(nl.tudelft.goal.unreal.actions.Action action)
Queues up the action to be executed on the first evaluation of the logic cycle. |
nl.tudelft.goal.unreal.messages.Percept |
armor()
|
Collection<nl.tudelft.goal.unreal.messages.Percept> |
base()
Information about the location of the base. |
void |
beforeFirstLogic()
Called before the evaluation of the first logic. |
Collection<nl.tudelft.goal.unreal.messages.Percept> |
bot()
Percept provided when another bot becomes visible to this bot. |
nl.tudelft.goal.unreal.messages.Percept |
currentWeapon()
Information about weapon the bot is currently holding. |
void |
deploy()
Bot tries to deploy a deployable weapon. |
Collection<nl.tudelft.goal.unreal.messages.Percept> |
deployable()
Information about the deployable the bot is currently holding. |
void |
finishControllerInitialization()
Finish controller initialisation. |
Collection<nl.tudelft.goal.unreal.messages.Percept> |
flag()
Description: Percept provided when the flag is visible. |
Collection<nl.tudelft.goal.unreal.messages.Percept> |
flagState()
Description: Percept that provides information about the current state of the flag. |
List<nl.tudelft.goal.unreal.messages.Percept> |
fragged()
This percept is provided when one bot is violently fragmented by another. |
nl.tudelft.goal.unreal.messages.Percept |
game()
Information about the type of game being played, the map and the score required for winning the game. |
Map<Method,Object> |
getAllPercepts()
Returns a previously prepared batch of percepts. |
cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands.Initialize |
getInitializeCommand()
Prepares the initialization message for Gamebots using the BotParameters provided to the UT2004BotRunner . |
void |
initializeController(cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004Bot bot)
|
protected void |
initializeModules(cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004Bot bot)
Initialize projectiles and weaponshooting modules. |
protected void |
initializePathFinding(cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004Bot bot)
Initializes path-finding modules: UT2004BotModuleControllerNew#pathPlanner ,
UT2004BotModuleController.fwMap and
UT2004BotModuleControllerNew#pathExecutor . |
protected void |
initializeWeaponShootings()
Adds handlers to deal with different weapons. |
Collection<nl.tudelft.goal.unreal.messages.Percept> |
item()
Description: Provides information items the bot sees in the world. |
void |
logic()
The bot will evaluate its the logic every 100ms. |
nl.tudelft.goal.unreal.messages.Percept |
logicIteration()
Deprecated. |
void |
look(SelectorList targets)
Tells the bot how to prioritize what it looks at. |
void |
msgBotKilled(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.BotKilled msg)
Event listener for deaths of this bot. |
void |
msgPlayerKilled(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.PlayerKilled msg)
Event listener for deaths of other bots & players. |
void |
navigate(nl.tudelft.goal.unreal.messages.UnrealIdOrLocation destination)
When called the bot will make a best effort attempt to navigate to requested destination. |
nl.tudelft.goal.unreal.messages.Percept |
navigation()
Information about the state of the navigation. |
Collection<nl.tudelft.goal.unreal.messages.Percept> |
navPoint()
Information about point in the map. |
nl.tudelft.goal.unreal.messages.Percept |
orientation()
Information about the bot's position, rotation and velocity. |
nl.tudelft.goal.unreal.messages.Percept |
path(nl.tudelft.goal.unreal.messages.UnrealIdOrLocation from,
nl.tudelft.goal.unreal.messages.UnrealIdOrLocation to)
The bot computes a path from a to b. |
Collection<nl.tudelft.goal.unreal.messages.Percept> |
pickup()
Information indicating at which navpoint weapons, ammo, and health can be found. |
Collection<nl.tudelft.goal.unreal.messages.Percept> |
powerup()
Description: Percept provided when the bot picks up a powerup |
void |
prefer(WeaponPrefList weaponList)
Tells the bot which weapon it should prefer. |
void |
respawn()
When called the bot will respawn in at a random spawn point of its team. |
nl.tudelft.goal.unreal.messages.Percept |
score()
Information about the number of kills, deaths, and suicides this bot accumulated. |
nl.tudelft.goal.unreal.messages.Percept |
self()
Information about the bot's identity and team. |
void |
shoot(SelectorList targets)
Tells the bot how to prioritize who it shoots. |
void |
skip()
Does nothing. |
nl.tudelft.goal.unreal.messages.Percept |
slowvolume()
Description: Percept provided when the bot see's a slow volume. |
nl.tudelft.goal.unreal.messages.Percept |
status()
Information about the bot's current physical state. |
void |
stop()
When called the bot will stop. |
void |
stopShooting()
* |
nl.tudelft.goal.unreal.messages.Percept |
teamScore()
Percept that provides information about the current state of the game. |
Collection<nl.tudelft.goal.unreal.messages.Percept> |
visiblePickup()
Information indicating which pickup is visible. |
Collection<nl.tudelft.goal.unreal.messages.Percept> |
weapon()
Information about weapons the bot has in its inventory. |
Methods inherited from class cz.cuni.amis.pogamut.ut3.bot.impl.UT3BotModuleController |
---|
getBody, getConfig, getFwMap, getGame, getInfo, getItems, getMove, getNavBuilder, getNavigation, getPathExecutor, getPathPlanner, getPlayers, getRandom, getRaycasting, getSenses, getShoot, getVisibility, getWeaponPrefs, getWeaponry, getWorld, initializeListeners |
Methods inherited from class cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotLogicController |
---|
getLogicInitializeTime, getLogicShutdownTime, initializeLogic, logicInitialize, logicShutdown |
Methods inherited from class cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotController |
---|
botFirstSpawn, botInitialized, botKilled, botShutdown, getAct, getBot, getLog, getName, getPassword, getWorldView, prepareBot |
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.ut2004.bot.IUT2004BotController |
---|
botFirstSpawn, botInitialized, botKilled, botShutdown, getAct, getBot, getLog, getPassword, getWorldView, prepareBot |
Field Detail |
---|
protected List<ContextSelector> targetSelector
protected List<ContextSelector> lookSelector
protected nl.tudelft.pogamut.unreal.agent.module.sensor.Projectiles projectiles
protected nl.tudelft.pogamut.unreal.agent.module.shooting.WeaponryShooting weaponShooting
protected nl.tudelft.pogamut.unreal.agent.module.shooting.util.FocusProvider lookFocus
protected nl.tudelft.pogamut.unreal.agent.module.shooting.util.OrderedFocusProvider focus
protected eis.eis2java.util.AllPerceptsModule percepts
protected nl.tudelft.goal.unreal.messages.BotParameters parameters
protected long logicIteration
protected long actionCount
protected nl.tudelft.goal.unreal.floydwarshall.SharedFloydWarshallMap sfwMap
IPathPlanner
using NavPoint
s), you may use
it to find paths inside the environment wihtout waiting for round-trip of
GetPath
command and PathList
s response from UT2004. It is
much faster than UT2004BotModuleController.pathPlanner
but you
need to pass NavPoint
instances to planner instead of
ILocated
... to find the nearest NavPoint
instance,
DistanceUtils
is a handy, check especially
DistanceUtils.getNearest(java.util.Collection, ILocated)
.
Constructor Detail |
---|
public UT3BotBehavior()
Method Detail |
---|
public void initializeController(cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004Bot bot)
initializeController
in interface cz.cuni.amis.pogamut.ut2004.bot.IUT2004BotController<cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004Bot>
initializeController
in class UT3BotModuleController<cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004Bot>
protected void initializeModules(cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004Bot bot)
initializeModules
in class UT3BotModuleController<cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004Bot>
protected void initializeWeaponShootings()
protected void initializePathFinding(cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004Bot bot)
UT2004BotModuleControllerNew#pathPlanner
,
UT2004BotModuleController.fwMap
and
UT2004BotModuleControllerNew#pathExecutor
. If you need different
path planner / path executor - override this method and initialize your
own modules.
initializePathFinding
in class UT3BotModuleController<cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004Bot>
bot
- public cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands.Initialize getInitializeCommand()
BotParameters
provided to the UT2004BotRunner
.
getInitializeCommand
in interface cz.cuni.amis.pogamut.ut2004.bot.IUT2004BotController<cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004Bot>
getInitializeCommand
in class cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotController<cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004Bot>
public void finishControllerInitialization()
finishControllerInitialization
in interface cz.cuni.amis.pogamut.ut2004.bot.IUT2004BotController<cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004Bot>
finishControllerInitialization
in class UT3BotModuleController<cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004Bot>
public void beforeFirstLogic()
beforeFirstLogic
in interface cz.cuni.amis.pogamut.base.agent.module.IAgentLogic<cz.cuni.amis.pogamut.base.agent.module.LogicModule>
beforeFirstLogic
in class cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotLogicController<cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004Bot>
public void logic()
Selector
in the list set by
UT3BotBehavior#target(SelectorList)
that returns a valid
target.Selector
in the list set by
look(SelectorList)
that returns a valid
target.
logic
in interface cz.cuni.amis.pogamut.base.agent.module.IAgentLogic<cz.cuni.amis.pogamut.base.agent.module.LogicModule>
logic
in class cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotLogicController<cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004Bot>
public void addAction(nl.tudelft.goal.unreal.actions.Action action) throws InterruptedException
action
-
InterruptedException
public Map<Method,Object> getAllPercepts()
getAllPercepts
in interface eis.eis2java.util.AllPerceptsProvider
public void navigate(nl.tudelft.goal.unreal.messages.UnrealIdOrLocation destination) throws InterruptedException
Location
or
the UnrealId of an ILocated
such as NavPoint
or
Player
. When provided with a player the bot will actively pursue
the player provided the player remains visible.
The destination is considered reached when the bot is within 50 UT units
from the destination. Or 100 UT units when trying to navigate to a
player.
The navigation can fail when there is no path to the destination, when
the bot gets stuck. A bot can be considered stuck by three heuristics.
Either the UT2004DistanceStuckDetector
when the bot has not be
closing in on its target enough, UT2004PositionStuckDetector
when
it has not been moving at all, or the UT2004TimeStuckDetector
when it has not moved enough over time.
When the bot dies or respawns the navigation will reset to waiting.
destination
- where the bot should go.
InterruptedException
public void stop() throws InterruptedException
InterruptedException
public void respawn() throws InterruptedException
InterruptedException
public void deploy() throws InterruptedException
Bot tries to deploy a deployable weapon.
Syntax: deploy
Will only work if the bot picked up a deployable weapon, the bot can't switch to another weapon while holding a deployable weapon.
location
-
InterruptedException
public nl.tudelft.goal.unreal.messages.Percept path(nl.tudelft.goal.unreal.messages.UnrealIdOrLocation from, nl.tudelft.goal.unreal.messages.UnrealIdOrLocation to)
The bot computes a path from a to b.
Syntax: path(From,To)
The action results in a path percept containing the path from a to b.
Syntax: path(Length,[NavPointId])
from
- the navpoint from which the path starts.to
- the navpoint where the path should go to
public void shoot(SelectorList targets) throws InterruptedException
Tells the bot how to prioritize who it shoots.
Syntax: shoot([Selector])
Syntax: shoot(Selector)
Note:
InterruptedException
public void stopShooting() throws InterruptedException
Tells the bot to stop shooting.
Syntax: stopShoot
Note: Executes shoot([])
InterruptedException
public void prefer(WeaponPrefList weaponList) throws InterruptedException
Tells the bot which weapon it should prefer. The bot will select the first weapon from the list it can use. A weapon can be used when the bot has the and the ammo for it.
Syntax: prefer([weapon(WeaponId, FireMode)])
Syntax: prefer(weapon(WeaponId, FireMode))
Note: By Default the bot prefers the weapons in this order:
InterruptedException
public void look(SelectorList targets) throws InterruptedException
Tells the bot how to prioritize what it looks at.
Syntax: look([Selector])
Syntax: look(Selector)
Note:
InterruptedException
public void skip()
Does nothing.
Syntax: skip
@Deprecated public nl.tudelft.goal.unreal.messages.Percept logicIteration()
Information about iteration of the bots logic.
Type: On Change
Syntax: logic(Iteration)
Notes:
@Deprecated public nl.tudelft.goal.unreal.messages.Percept actionCount()
public nl.tudelft.goal.unreal.messages.Percept armor()
public nl.tudelft.goal.unreal.messages.Percept self()
Information about the bot's identity and team.
Type: On Change
Syntax: self(UnrealId, NickName, Team)
public nl.tudelft.goal.unreal.messages.Percept orientation()
Information about the bot's position, rotation and velocity.
Type: On Change
Syntax: orientation(location(X,Y,Z), rotation(Pitch,Yaw,Roll), velocity(Vx, Vy,Vz))
public nl.tudelft.goal.unreal.messages.Percept status()
Information about the bot's current physical state.
Type: On Change
Syntax status(Health, Armour, Adrenaline,ActiveCombo)
public nl.tudelft.goal.unreal.messages.Percept score()
Information about the number of kills, deaths, and suicides this bot accumulated.
Type: On Change
Syntax: score(Kills, Deaths, Suicides)
Note: Using the respawn action and being fragged by an opponent both count as a death. Being killed by the your own weapon counts as a suicide.
public nl.tudelft.goal.unreal.messages.Percept currentWeapon()
Information about weapon the bot is currently holding.
Type: On Change
Syntax: currentWeapon(WeaponType,FireMode)
TODO: List available weapons.
public Collection<nl.tudelft.goal.unreal.messages.Percept> weapon()
Information about weapons the bot has in its inventory.
Type: On change
Syntax: weapon(WeaponType, PriAmmo, SecAmmo)
public Collection<nl.tudelft.goal.unreal.messages.Percept> deployable()
Information about the deployable the bot is currently holding.
Type: On change
Syntax: deployable(Name)
Note: the bot can't switch weapons if it's holding a deployable weapon.
public void msgBotKilled(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.BotKilled msg)
msg
- public void msgPlayerKilled(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.PlayerKilled msg)
msg
- public List<nl.tudelft.goal.unreal.messages.Percept> fragged()
This percept is provided when one bot is violently fragmented by another.
Type: Always
Syntax: fragged(Time,KillerID,VictemID,Weapon)
Notes:
public nl.tudelft.goal.unreal.messages.Percept navigation()
Information about the state of the navigation. The available states are:
Type: On Change
Syntax: navigation(State,Destination)
public Collection<nl.tudelft.goal.unreal.messages.Percept> navPoint()
Information about point in the map. Together these form a directed graph that spans the entire map.
Type: Once
Syntax: navPoint(UnrealID, location(X,Y,Z), [NeigsUnrealID])
public Collection<nl.tudelft.goal.unreal.messages.Percept> visiblePickup()
Information indicating which pickup is visible.
Type: On change with negation
Syntax: pickup(UnrealID)
public Collection<nl.tudelft.goal.unreal.messages.Percept> pickup()
Information indicating at which navpoint weapons, ammo, and health can be found.
Type: Once
Syntax: pickup(UnrealID, Label, ItemType)
Notes:
public Collection<nl.tudelft.goal.unreal.messages.Percept> base()
Information about the location of the base. The opposing team will try to steal the flag from this location. Your team must deliver any capture flags to the base.
Type: Once
Syntax: base(Team, UnrealID)
public nl.tudelft.goal.unreal.messages.Percept game()
Information about the type of game being played, the map and the score required for winning the game.
Type: On Change
Syntax: game(Gametype, Map, TeamScoreLimit, RemainingTime)
public nl.tudelft.goal.unreal.messages.Percept teamScore()
Percept that provides information about the current state of the game.
Type: On change
Syntax: teamScore(TeamScore, OpponentTeamScore)
Notes
public Collection<nl.tudelft.goal.unreal.messages.Percept> flagState()
Description: Percept that provides information about the current state of the flag.
Type: On change with negation.
Syntax: flagState(Team,FlagState)
Notes:
public Collection<nl.tudelft.goal.unreal.messages.Percept> item()
Description: Provides information items the bot sees in the world.
Type: On change with negation.
Syntax: item(UnrealID, Label, ItemType, NavPointId)
Syntax: item(UnrealID, Label, ItemType, location(X,Y,Z)) when dropped.
Notes:
public Collection<nl.tudelft.goal.unreal.messages.Percept> flag()
Description: Percept provided when the flag is visible.
Type: On change with negation.
Syntax: flag(Team, UnrealId, location(X,Y,Z))
Notes:
public Collection<nl.tudelft.goal.unreal.messages.Percept> bot()
Percept provided when another bot becomes visible to this bot.
Type: On change with negation.
Syntax: bot(UnrealId, Team, location(X,Y,Z), Weapon, FireMode)
public Collection<nl.tudelft.goal.unreal.messages.Percept> powerup()
Description: Percept provided when the bot picks up a powerup
Type: On change
Syntax: powerup(Name, Time)
public nl.tudelft.goal.unreal.messages.Percept slowvolume()
Description: Percept provided when the bot see's a slow volume.
Type: On change
Syntax: slowVolume([NavPoints])
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |