public void FixedUpdate() { if (sims_done == simsInfo.Count && bestFinished) { if (evolEngine.generation < evolEngine.numGenerations) { // Perform an evolutionary algorithm step evolEngine.Step(); // Init grids and start simulations again init(); sims_done = 0; } else { gameOverText.text = "Number of Generations reached. Fitness of Best Solution : " + evolEngine.Best.Fitness; if (!allFinished) { Debug.Log("Best individual: " + evolEngine.Best.ToString()); evolEngine.FinalLog(); allFinished = true; } if (BatchmodeConfig.batchmode) { Application.Quit(); } //Play best solution initBestSim(); } } }