Proper Server Termination
When doing evolution with Pogamut, if I launch a server and some bug causes it to crash, I don't want to count that evaluation. My current code launches a server, and has the bot being evaluated keep track of how long it has been evaluated for. When it has been evaluated for long enough, it sets a flag to indicate that evaluation was successful, and then it kills itself and the server.
This seems to work well enough, except that killing bots and servers is always a messy process. I'm hoping to do things in a cleaner way. I think that if instead of having the bots track evaluation time, I were to simply specify a time limit for the deathmatch, then the server might terminate more cleanly.
My only concern is that I won't be able to tell if evaluation was successful. If the server crashes early, or if any of the bots crash during evaluation, then I don't want to count that evaluation. What is the best way to know that a deathmatch server ran all the way up to the time limit and then terminated with all bots still connected?
This seems to work well enough, except that killing bots and servers is always a messy process. I'm hoping to do things in a cleaner way. I think that if instead of having the bots track evaluation time, I were to simply specify a time limit for the deathmatch, then the server might terminate more cleanly.
My only concern is that I won't be able to tell if evaluation was successful. If the server crashes early, or if any of the bots crash during evaluation, then I don't want to count that evaluation. What is the best way to know that a deathmatch server ran all the way up to the time limit and then terminated with all bots still connected?
