Title: Pogamut 2 Platform for fast development of cognitive agents inside 3D environment
1Pogamut 2 Platform for fast development of
cognitive agents inside 3D environment
Faculty of mathematics and physics Charles
University at Prague 2nd April 2008
- GameBots messages async listeners
- Navigation
- HealthForager bot
http//artemis.ms.mff.cuni.cz/pogamut
2Lets talk a bit about GameBots
Exports information
Translating text messages to java objects
Simulates the world
Model of the agent
http//artemis.ms.mff.cuni.cz/pogamut
3GameBots2004 1/2
- programmed in UnrealScript, UT2004 extension
- text message protocol
- more / less a direct translations of UTs events
- WAL Id wall Normal x,y,z Location x,y,z
Telnet can be used to check whether the GB is
working.
http//artemis.ms.mff.cuni.cz/pogamut
4GameBots2004 2/2
- 2 types of messages
- synchronous (sent in batches)
- list of visible navpoints / items / etc
- once upon a time 5 Hz usually
- asynchronous
- messages like WAL, FAL, DIE, KIL,
- you may define listeners for messages
Doc webpage menu Documentation, GameBots API
List
http//artemis.ms.mff.cuni.cz/pogamut
5Message listeners 1/2
http//artemis.ms.mff.cuni.cz/pogamut
6Message listeners 2/2
- Consider using synchronized statement inside
listeners (listeners are called from within the
communication thread).
http//artemis.ms.mff.cuni.cz/pogamut
7Navigation 1/5
- Bunch of memory methods
- getKnownAmmos(), Armors(), Weapons(), etc.
- list of all XYZ available in map
- getSeeAmmos(), Healths(), Weapons(), etc.
- list of XYZ the bot currently sees
- getSeeAnyAmmo(),
- return first XYZ GB gave us last batch
- getSeeAmmo(UnrealID)
- check whether the bot sees the specified object
http//artemis.ms.mff.cuni.cz/pogamut
8Navigation 2/5
- Crucial object gameMap
- safeRunToLocation(Triple)
- be brave and try to reimplement this even
better! - returns boolean
- true all is OK, false run-to failed
http//artemis.ms.mff.cuni.cz/pogamut
9Navigation 3/5
AStar has modular implementation AStarGoal
defining the goal, may forbid nodes -
implementation GameMapAStarGoal AStarMap -
defines the graph - specifies the costs -
implementation GameMapAStarMap
http//artemis.ms.mff.cuni.cz/pogamut
10Navigation 4/5
AStar example implementation
http//artemis.ms.mff.cuni.cz/pogamut
11Navigation 5/5
You should try to implement Floyd-Warshal
algorithm inside postPrepareAgent(). You will
have to check a lot of paths and its lengths
often. Remember computer bot programming is all
about running around points. Navigation graph is
map dependent, you may find out that some maps
are more suitable for your bots then others.
http//artemis.ms.mff.cuni.cz/pogamut
12HealthForager bot
Lets create a bot that is running around the
medkits like mad some snippet
http//artemis.ms.mff.cuni.cz/pogamut