[Pogamut-list] Recovering from Fatal Errors

jakub.gemrot pogamut-forum at diana.ms.mff.cuni.cz
Thu Jan 27 15:42:49 CET 2011


Re: Recovering from Fatal Errors

Author: jakub.gemrot

Hi!

This is a tought question...

Well the first post you have is refering to general fault of UT2004 that reacts with shutting down itself. This naturally leads to closing all sockets your bots might have and results
in exceptions in the second post.

Basically... there is no easy work around for that. Exception always tears down the whole server. Nevertheless every IUT2004BotController has method botShutdown(); that is (should be) guaranteed
to be called even in the case of failure, allowing you to save your work / note that your bots have been stopped / react as you wish to react after that...

I would address it this way:

1) create some globally accessible variable (or perhaps passed via parameters) that will contain some means to report that your bot has been stopped/killed.
2) upon recieving such report I would wait a bit whether it will affect all bots (lets say 5 seconds)
3) after that I would decide whether the fact that bots have stopped is OK / Failure
4) OK -> proceed with next evolution iteration
5) Failure -> restart evolution

I do not know whether it makes any sense to you? It's a bit cryptic :)

Best,
Jakub

-- 
Reply Link: <http://diana.ms.mff.cuni.cz/main/tiki-view_forum_thread.php?forumId=4&comments_reply_threadId=4&comments_parentId=557&post_reply=1#form>





More information about the Pogamut-list mailing list