def spawn_trial_bots(num_bots): botIDlist = [] defaultClassifier = get_classifier() for x in range(num_bots): pythonDbHandler.storeClassifier(defaultClassifier) maximum = pythonDbHandler.getLargestBotID() for x in range(num_bots): botIDlist.append(maximum) maximum -= 1 print 'Initial botIDlist: ', botIDlist return botIDlist
def shutdown(self): print 'SHUTTING DOWN AND STORING' if self.botID: pythonDbHandler.storeClassifier(self.classifier, self.botID)
def shutdown(self): """Use this function to teardown your bot after the game is over, or perform an analysis of the data accumulated during the game.""" print 'SHUTTING DOWN AND STORING' pythonDbHandler.storeClassifier(self.actionClassifier, self.botID)
def replace_pop1_with_pop2(self, offspring): for bot_id, classifier in offspring: pythonDbHandler.storeClassifier(classifier, botID = bot_id)
def replace_pop1_with_pop2(self, offspring): for bot_id, classifier in offspring: pythonDbHandler.storeClassifier(classifier, botID=bot_id)