View Javadoc

1   package cz.cuni.amis.pogamut.ut2004.bot.sposh;
2   
3   import java.util.Random;
4   import java.util.logging.Level;
5   
6   import cz.cuni.amis.pogamut.base.agent.navigation.IPathPlanner;
7   import cz.cuni.amis.pogamut.base.communication.command.IAct;
8   import cz.cuni.amis.pogamut.base.communication.worldview.listener.annotation.AnnotationListenerRegistrator;
9   import cz.cuni.amis.pogamut.base.communication.worldview.listener.annotation.EventListener;
10  import cz.cuni.amis.pogamut.base.communication.worldview.listener.annotation.ObjectClassEventListener;
11  import cz.cuni.amis.pogamut.base.communication.worldview.listener.annotation.ObjectClassListener;
12  import cz.cuni.amis.pogamut.base.communication.worldview.listener.annotation.ObjectEventListener;
13  import cz.cuni.amis.pogamut.base.communication.worldview.listener.annotation.ObjectListener;
14  import cz.cuni.amis.pogamut.base.utils.logging.LogCategory;
15  import cz.cuni.amis.pogamut.base.utils.math.DistanceUtils;
16  import cz.cuni.amis.pogamut.base3d.worldview.IVisionWorldView;
17  import cz.cuni.amis.pogamut.base3d.worldview.object.ILocated;
18  import cz.cuni.amis.pogamut.sposh.JavaBehaviour;
19  import cz.cuni.amis.pogamut.ut2004.agent.module.sensomotoric.AgentConfig;
20  import cz.cuni.amis.pogamut.ut2004.agent.module.sensomotoric.Raycasting;
21  import cz.cuni.amis.pogamut.ut2004.agent.module.sensomotoric.Weaponry;
22  import cz.cuni.amis.pogamut.ut2004.agent.module.sensor.AgentInfo;
23  import cz.cuni.amis.pogamut.ut2004.agent.module.sensor.AgentStats;
24  import cz.cuni.amis.pogamut.ut2004.agent.module.sensor.Game;
25  import cz.cuni.amis.pogamut.ut2004.agent.module.sensor.ItemDescriptors;
26  import cz.cuni.amis.pogamut.ut2004.agent.module.sensor.Items;
27  import cz.cuni.amis.pogamut.ut2004.agent.module.sensor.NavigationGraphBuilder;
28  import cz.cuni.amis.pogamut.ut2004.agent.module.sensor.Players;
29  import cz.cuni.amis.pogamut.ut2004.agent.module.sensor.Senses;
30  import cz.cuni.amis.pogamut.ut2004.agent.module.sensor.WeaponPrefs;
31  import cz.cuni.amis.pogamut.ut2004.agent.navigation.UT2004AStarPathPlanner;
32  import cz.cuni.amis.pogamut.ut2004.agent.navigation.UT2004GetBackToNavGraph;
33  import cz.cuni.amis.pogamut.ut2004.agent.navigation.UT2004Navigation;
34  import cz.cuni.amis.pogamut.ut2004.agent.navigation.UT2004PathExecutor;
35  import cz.cuni.amis.pogamut.ut2004.agent.navigation.UT2004RunStraight;
36  import cz.cuni.amis.pogamut.ut2004.agent.navigation.floydwarshall.FloydWarshallMap;
37  import cz.cuni.amis.pogamut.ut2004.agent.navigation.loquenavigator.KefikRunner;
38  import cz.cuni.amis.pogamut.ut2004.agent.navigation.loquenavigator.LoqueNavigator;
39  import cz.cuni.amis.pogamut.ut2004.bot.IUT2004BotController;
40  import cz.cuni.amis.pogamut.ut2004.bot.command.AdvancedLocomotion;
41  import cz.cuni.amis.pogamut.ut2004.bot.command.CompleteBotCommandsWrapper;
42  import cz.cuni.amis.pogamut.ut2004.bot.command.ImprovedShooting;
43  import cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004Bot;
44  import cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotController;
45  import cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotModuleController;
46  import cz.cuni.amis.pogamut.ut2004.communication.messages.ItemType;
47  import cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands.GetPath;
48  import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.AutoTraceRay;
49  import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.BotKilled;
50  import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.ConfigChange;
51  import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo;
52  import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.InitedMessage;
53  import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.NavPoint;
54  import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.PathList;
55  import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Self;
56  import cz.cuni.amis.pogamut.ut2004.communication.translator.itemdescriptor.ItemDescriptor;
57  
58  
59  //
60  // 3rd change
61  //
62  
63  public class UT2004Behaviour<BOT extends UT2004Bot> extends JavaBehaviour<BOT> {
64  	
65  	/**
66  	 * Random number generator that is usually useful to have during decision making.
67  	 */
68  	protected Random random = new Random(System.currentTimeMillis());
69  	
70  	/**
71       * User log - it's log-level is initially set to {@link Level#ALL}.
72       * @deprecated use {@link UT2004BotController#log} instead
73       */
74      protected LogCategory user = null;
75      
76      /**
77       * Alias for user's log.
78       */
79      protected LogCategory log = null;
80  	
81  	/**
82  	 * Memory module specialized on general info about the game - game type, time limit, frag limit, etc.
83  	 * <p><p>
84  	 * May be used since {@link SposhBotLogic#botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.ConfigChange, cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.InitedMessage)}
85       * is called.
86       * <p><p>
87       * Initialized inside {@link UT2004Behaviour#initializeModules(UT2004Bot)}.
88  	 */
89  	protected Game game;
90  	
91  	/**
92  	 * Memory module specialized on general info about the agent whereabouts - location, rotation, health, current weapon, who is enemy/friend, etc.
93  	 * <p><p>
94  	 * May be used since first {@link Self} message is received, i.e, since the first {@link SposhBotLogic#botFirstSpawn(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, ConfigChange, InitedMessage, Self)} 
95       * is called.
96       * <p><p>
97       * Initialized inside {@link UT2004Behaviour#initializeModules(UT2004Bot)}.
98  	 */
99  	protected AgentInfo info;
100 	
101 	/**
102 	 * Memory module specialized on whereabouts of other players - who is visible, enemy / friend, whether bot can see anybody, etc.
103 	 * <p><p>
104 	 * May be used since {@link SposhBotLogic#botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.ConfigChange, cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.InitedMessage)}
105      * is called.
106      * <p><p>
107      * Initialized inside {@link UT2004Behaviour#initializeModules(UT2004Bot)}.
108 	 */
109 	protected Players players;
110 	
111 	/**
112 	 * Sensory module that provides mapping between {@link ItemType} and {@link ItemDescriptor} providing
113      * an easy way to obtain item descriptors for various items in UT2004.
114      * <p><p>
115      * May be used since {@link SposhBotLogic#botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.ConfigChange, cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.InitedMessage)}
116      * is called.
117      * <p><p>
118      * Initialized inside {@link UT2004Behaviour#initializeModules(UT2004Bot)}.
119 	 */
120 	protected ItemDescriptors descriptors;
121 	
122 	/**
123 	 * Memory module specialized on items on the map - which are visible and which are probably spawned.
124 	 * <p><p>
125 	 * May be used since {@link SposhBotLogic#botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.ConfigChange, cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.InitedMessage)}
126      * is called.
127      * <p><p>
128      * Initialized inside {@link UT2004Behaviour#initializeModules(UT2004Bot)}.
129 	 */
130 	protected Items items;
131 	
132 	/**
133 	 * Memory module specialized on agent's senses - whether the bot has been recently killed, collide with level's geometry, etc.
134 	 * <p><p>
135 	 * May be used since {@link SposhBotLogic#botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.ConfigChange, cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.InitedMessage)}
136      * is called.
137      * <p><p>
138      * Initialized inside {@link UT2004Behaviour#initializeModules(UT2004Bot)}.
139 	 */
140 	protected Senses senses;
141 	
142 	/**
143 	 * Memory module specialized on info about the bot's weapon and ammo inventory - it can tell you which weapons are loaded, melee/ranged, etc.
144 	 * <p><p>
145 	 * May be used since {@link SposhBotLogic#botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.ConfigChange, cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.InitedMessage)}
146      * is called.
147      * <p><p>
148      * Initialized inside {@link UT2004Behaviour#initializeModules(UT2004Bot)}.
149 	 */
150 	protected Weaponry weaponry;
151 	
152 	/**
153 	 * Memory module specialized on the agent's configuration inside UT2004 - name, vision time, manual spawn, cheats (if enabled at GB2004).
154 	 * <p><p>
155 	 * May be used since {@link SposhBotLogic#botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, ConfigChange, cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.InitedMessage)}
156      * is called.
157      * <p><p>
158      * Initialized inside {@link UT2004Behaviour#initializeModules(UT2004Bot)}.
159 	 */
160 	protected AgentConfig config;
161 	
162 	/**
163 	 * Support for creating rays used for raycasting (see {@link AutoTraceRay} that is being utilized).
164 	 * <p><p>
165 	 * May be used since {@link SposhBotLogic#botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.ConfigChange, cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.InitedMessage)}
166      * is called.
167 	 */
168 	protected Raycasting raycasting;
169 	
170 	/**
171 	 * Creates and wraps all available commands that can be issued to the virtual body of the bot inside UT2004.
172      * <p><p>
173      * May be used since since the first {@link SposhBotLogic#botFirstSpawn(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, ConfigChange, InitedMessage, Self)} 
174      * is called.
175      * <p><p>
176      * Initialized inside {@link UT2004Behaviour#initializeModules(UT2004Bot)}.
177 	 */
178 	protected CompleteBotCommandsWrapper body;
179 	
180 	/**
181 	 * Shortcut for <i>body.getImprovedShooting()</i> that allows you to shoot at opponent.
182 	 * <p><p>
183 	 * Note: more weapon-handling methods are available through {@link UT2004Behaviour#weaponry}.
184 	 * <p><p>
185 	 * May be used since since the first {@link SposhBotLogic#botFirstSpawn(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, ConfigChange, InitedMessage, Self)} 
186      * is called.
187      * <p><p>
188 	 * Initialized inside {@link UT2004Behaviour#initializeModules(UT2004Bot)}.
189 	 */
190 	protected ImprovedShooting shoot;
191 	
192 	/**
193 	 * Shortcut for <i>body.getAdvancedLocomotion()</i> that allows you to manually steer the movement through the environment.
194 	 * <p><p>
195 	 * Note: navigation is done via {@link UT2004Behaviour#pathExecutor} that needs {@link PathHandle} from the {@link UT2004Behaviour#pathPlanner}.
196 	 * <p><p>
197 	 * May be used since since the first {@link SposhBotLogic#botFirstSpawn(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, ConfigChange, InitedMessage, Self)} 
198      * is called.
199      * <p><p>
200 	 * Initialized inside {@link UT2004Behaviour#initializeModules(UT2004Bot)}.
201 	 */
202 	protected AdvancedLocomotion move;
203 	
204 	/**
205      * Executor is used for following a path in the environment.
206      * <p><p>
207      * May be used since since the first {@link IUT2004BotController#botFirstSpawn(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, ConfigChange, InitedMessage, Self)}
208      * is called.
209      * <p><p>
210      * Initialized inside {@link UT2004BotModuleControllerNew#initializePathFinding(UT2004Bot)}.
211      */
212 	protected UT2004PathExecutor<ILocated> pathExecutor = null;
213 
214     /**
215      * Planner used to compute the path (consisting of navigation points) inside the map.
216      * <p><p>
217      * May be used since since the first {@link IUT2004BotController#botFirstSpawn(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, ConfigChange, InitedMessage, Self)}
218      * is called.
219      * <p><p>
220      * Initialized inside {@link UT2004BotModuleControllerNew#initializePathFinding(UT2004Bot)}.
221      */
222     protected IPathPlanner<ILocated> pathPlanner = null;
223     
224     /**
225      * Weapon preferences for your bot. See {@link WeaponPrefs} class javadoc. It allows you to define preferences for
226      * weapons to be used at given distance (together with their firing mode).
227      */
228     protected WeaponPrefs weaponPrefs;
229     
230     /**
231      * Navigation graph builder that may be used to manually extend the navigation graph of the UT2004.
232      * <p><p>
233      * May be used since {@link IUT2004BotController#botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, ConfigChange, InitedMessage)} 
234      * is called.
235      * <p><p>
236      * Initialized inside {@link UT2004BotModuleController#initializeModules(UT2004Bot)}.
237      */
238     protected NavigationGraphBuilder navBuilder;
239     
240     /**
241      * Module that is providing various statistics about the bot. You may also used it to output these stats (in CSV format)
242      * into some file using {@link AgentStats#startOutput(String)} or {@link AgentStats#startOutput(String, boolean)}.
243      */
244     protected AgentStats stats;
245 
246     /**
247      * Path-planner ({@link IPathPlanner} using {@link NavPoint}s), you may use it to find paths inside the environment wihtout
248      * waiting for round-trip of {@link GetPath} command and {@link PathList}s response from UT2004. It is much faster than 
249      * {@link UT2004BotModuleController#pathPlanner} but you need to pass {@link NavPoint} instances to planner instead of
250      * {@link ILocated} ... to find the nearest {@link NavPoint} instance, {@link DistanceUtils} is a handy, check especially
251      * {@link DistanceUtils#getNearest(java.util.Collection, ILocated)}.
252      */
253 	protected FloydWarshallMap fwMap;
254 	
255 	/**
256 	 * Navigation helper that is able to get your bot back to the nearest navigation graph so you can use {@link UT2004BotModuleController#navigation} 
257 	 * without fear of catastrophe.
258 	 * May be used since {@link IUT2004BotController#botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, ConfigChange, InitedMessage)} 
259      * is called.
260      * <p><p>
261      * Initialized inside {@link UT2004BotModuleController#initializePathFinding(UT2004Bot)}.
262 	 */
263 	protected UT2004GetBackToNavGraph getBackToNavGraph;
264 	
265 	/**
266 	 * Navigation helper that can run-straight to some point with stuck detectors.
267 	 * <p><p>
268 	 * May be used since {@link IUT2004BotController#botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, ConfigChange, InitedMessage)} 
269      * is called.
270      * <p><p>
271      * Initialized inside {@link UT2004BotModuleController#initializePathFinding(UT2004Bot)}.
272 	 */
273 	protected UT2004RunStraight runStraight;
274 	
275 	/**
276 	 * Command module that is internally using {@link UT2004PathExecutor} for path-following and {@link FloydWarshallMap}
277 	 * for path planning resulting in unified class that can solely handle navigation of the bot within the environment.
278 	 * <p><p> 
279 	 * In contrast to {@link UT2004PathExecutor} methods
280 	 * of this module may be recalled every {@link UT2004BotModuleController#logic()} iteration even with 
281 	 * the same argument (which is not true for {@link UT2004PathExecutor#followPath(cz.cuni.amis.pogamut.base.agent.navigation.IPathFuture)}.
282 	 * <p><p>
283 	 * Note that this class is actually initialized with instances of {@link UT2004BotModuleController#pathExecutor} and {@link UT2004BotModuleController#fwMap}
284 	 * so you must take care if using add/remove stuck detectors or reinitilize this property to your liking (you can do that in {@link UT2004BotModuleController#botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, ConfigChange, InitedMessage)} 
285 	 * method.
286 	 * <p><p>
287 	 * May be used since first {@link UT2004BotModuleController#logic()} is called.
288      * <p><p>
289      * Initialized inside {@link UT2004BotModuleController#initializePathFinding(UT2004Bot)}.
290 	 */
291 	protected UT2004Navigation navigation;
292     
293     /**
294      * Listener registrator that probes declared methods for the presence of {@link EventListener}, {@link ObjectClassEventListener},
295      * {@link ObjectClassListener}, {@link ObjectEventListener} and {@link ObjectListener} annotations and automatically registers
296      * them as listeners on a specific events.
297      * <p><p>
298      * Note that this registrator is usable for 'this' object only! It will work only for 'this' object.
299      */
300     protected AnnotationListenerRegistrator listenerRegistrator;
301     
302     /**
303      * Shortcut for the {@link UT2004BotModuleController#getWorldView()}.
304      */
305     protected IVisionWorldView world;
306     
307     /**
308      * Shortcut for the {@link UT2004BotModuleController#getAct()}.
309      */
310     protected IAct act;
311 
312 	public UT2004Behaviour(String name, BOT bot) {
313 		super(name, bot);
314         log = bot.getLogger().getCategory(UT2004BotController.USER_LOG_CATEGORY_ID);
315         log.setLevel(Level.ALL);
316         user = log;
317 	}
318 
319 	/**
320 	 * Called after the construction of the {@link UT2004Behaviour} before the GameBots2004 greets the bot even before
321 	 * {@link UT2004Behaviour#prepareBehaviour(UT2004Bot)} method.
322 	 * <p><p>
323 	 * <b>NOTE:</b> This is Pogamut's developers reserved method - do not override it and if you do, always use 'super' 
324 	 * to call parent's initializeBehaviour.
325      */
326 	protected void initializeBehaviour(BOT bot) {
327 		initializeModules(bot);
328 		initializePathFinding(bot);
329 		initializeListeners(bot);
330 	}
331 	
332 	/**
333      * Initializes {@link UT2004Behaviour#listenerRegistrator} and calls {@link AnnotationListenerRegistrator#addListeners()} method
334      * to probe all declared methods for event-annotation presence.
335      * @param bot
336      */
337 	protected void initializeListeners(BOT bot) {
338 		listenerRegistrator = new AnnotationListenerRegistrator(this, getWorldView(), bot.getLogger().getCategory("Listeners"));
339 		listenerRegistrator.addListeners();
340 	}
341 
342 	/**
343 	 * Initializes path-finding modules: {@link UT2004BotModuleControllerNew#pathPlanner} and {@link UT2004BotModuleControllerNew#pathExecutor}.
344 	 * If you need different path planner / path executor - override this method and initialize your own modules.
345 	 * @param bot
346 	 */
347 	protected void initializePathFinding(BOT bot) {
348 		pathPlanner  = new UT2004AStarPathPlanner(bot);
349 		fwMap        = new FloydWarshallMap(bot);
350 		pathExecutor = 
351         	new UT2004PathExecutor<ILocated>(
352         		bot, 
353         		new LoqueNavigator<ILocated>(bot, 
354         			new KefikRunner(bot, info, move, bot.getLog()), 
355         		bot.getLog())
356         	);   
357 		getBackToNavGraph = new UT2004GetBackToNavGraph(bot, info, move);
358 		navigation = new UT2004Navigation(bot, pathExecutor, fwMap, getBackToNavGraph, runStraight);
359 	}
360 
361 	/**
362 	 * Initializes memory/command modules of the bot.
363 	 * 
364 	 * @param bot
365 	 */
366 	protected void initializeModules(BOT bot) {
367 		world       = getWorldView();
368 		act         = getAct();
369 		game        = new Game(bot);
370 		info        = new AgentInfo(bot, game);
371 		players     = new Players(bot);
372 		descriptors = new ItemDescriptors(bot);
373 		senses      = new Senses(bot, info, players);
374 		weaponry    = new Weaponry(bot, descriptors);
375 		items       = new Items(bot, info, game, weaponry, null);
376 		config      = new AgentConfig(bot);
377 		raycasting  = new Raycasting(bot);
378 		body        = new CompleteBotCommandsWrapper(bot, weaponry, null);		
379 		shoot       = body.getImprovedShooting();
380 		move        = body.getLocomotion();
381 		weaponPrefs = new WeaponPrefs(weaponry, bot);
382 		stats       = new AgentStats(bot);
383 		navBuilder  = new NavigationGraphBuilder(bot);
384 	}
385 	
386 	/**
387 	 * Called after the behaviour construction to initialize user's data structures.
388 	 * @param bot
389 	 */
390 	protected void prepareBehaviour(BOT bot) {		
391 	}	
392 	
393 	/**
394      * This method is called whenever {@link InitedMessage} is received. Various agent modules are usable since this
395      * method is called.
396      * 
397      * @param gameInfo
398      * @param config
399      * @param init
400      * @param self
401      */
402     public void botInitialized(GameInfo info, ConfigChange config, InitedMessage init) {
403     }
404 
405     /**
406      * This method is called only once whenever first batch of information what the bot can see is received.
407      * <i><i>
408      * It is sort of "first-logic-method" where you may issue commands for the first time and handle everything
409      * else in bot's logic then. It eliminates the need to have 'boolean firstLogic' field inside your bot.
410      * <p><p>
411      * Note that this method has advantage over the {@link IUT2004BotController#botInitialized(GameInfo, ConfigChange, InitedMessage)}
412      * that you already have {@link Self} object.
413      * 
414      * @param gameInfo
415      * @param config
416      * @param init
417      * @param self
418      */
419     public void botSpawned(GameInfo gameInfo, ConfigChange config, InitedMessage init, Self self) {
420     }
421     
422     /**
423 	 * Called after {@link UT2004Behaviour#botSpawned(GameInfo, ConfigChange, InitedMessage, Self)} as a hook for Pogamut's core developers
424 	 * to finalize initialization of various modules.
425 	 * <p><p>
426 	 * <b>NOTE:</b> This is Pogamut's developers reserved method - do not override it and if you do, always use 'super' 
427 	 * to call parent's finishControllerInitialization.
428      */
429     public void finishBehaviourInitialization() {
430     	if (navBuilder.isUsed()) {
431 			log.info("Navigation graph has been altered by 'navBuilder', triggering recomputation of Floyd-Warshall path matrix...");
432 			Level oldLevel = fwMap.getLog().getLevel();
433 			fwMap.getLog().setLevel(Level.FINER);
434 			fwMap.refreshPathMatrix();
435 			fwMap.getLog().setLevel(oldLevel);
436 		}
437     }
438     
439     /**
440      * This method is called before the SPOSH iteration is invoked. You may clear previous-state variables here.
441      */
442     public void logicIteration() {    	
443     }
444     
445     /**
446      * Called whenever the bot gets killed inside the game.
447      * 
448      * @param event
449      */
450 	public void botKilled(BotKilled event) {		
451 	}
452 	
453 	public IVisionWorldView getWorldView() {
454 		return bot.getWorldView();
455 	}
456 	
457 	public IAct getAct() {
458 		return bot.getAct();
459 	}
460 
461 	public UT2004GetBackToNavGraph getGetBackToNavGraph() {
462 		return getBackToNavGraph;
463 	}
464 	
465 }