[Pogamut-list] Bots standing around doing nothing

jakub.gemrot pogamut-forum at diana.ms.mff.cuni.cz
Thu Nov 25 08:24:57 CET 2010


Re: Bots standing around doing nothing

Author: jakub.gemrot

Hi!

Have you tried to run JVM with extra memory? That would mean you have to start your main class manually, which is a bit tedious to do, but can be done.

Regarding listeners - I haven't touched that topic (inside the code yet). When I was writing the world view, I could not decide whether it is a good thing to remove all the listeners whenever the world view is shut down or not, so i decided not to drop them. It might be possible that you're flooding the system with listeners, but that does not explain why you're bots are suffocating because you're listening to PlayerKilled message which is not sent that often. Nevertheless, you might want to review your code regarding listeners and attach them only if they do not exist.

Alternative way is to work with EventReact / EventReactOnce / ObjectEventReact / ObjectEventReactOnce classes which you can create inside the "prepareBot" once and then you have option to disable() / enable() them whenever you like.

Last way that you might try is to use annotations for listeners.

But either way I personally do not think this is the source of the problem.

I think all this leads to making some workaround... I'm suggesting to:

1) create code for saving/loading genomes / population of your bots
2) perform only N iterations of your GA in your main method
3) create a bat file that will run always a new JVM (with extra memory, something like 1GB) which would continue where the last JVM has finished

But, if you may share code of your project, I can offer you to test it at our side (which is usually the best thing to do as we can observe it and discuss the strange Pogamut behavior issue in our team).

Best regards,
Jakub

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





More information about the Pogamut-list mailing list