public Boolean TrainNavigationController() { List <Position> items_pickedup; if (loopcount == 0) { // Initial step view.ShowInit(map, agents.Bots); Console.WriteLine("-- Arena map --"); Console.WriteLine("Start Navigation training... "); if (loopcount % 100 == 0) { Console.WriteLine("> Iteration " + loopcount); } agents.Execute_Navigation(map, config, true, stat_nav, loopcount, out items_pickedup); // Modify map if items were picked up for (int i = 0; i < items_pickedup.Count; i++) { ItemManagement(map, items, items_pickedup[i]); } //view.Show(map, agents.Bots); //Console.ForegroundColor = ConsoleColor.Black; loopcount++; } else if (loopcount == config.iterationlimit) { // End of iterations stat_nav.WriteStat_Navigation(outputfolder, "stat_nav.csv", "visual_nav.csv", config.botnum); loopcount++; } else { // Step in training if (loopcount % 1000 == 0) { Console.WriteLine("> Iteration " + loopcount); } agents.Execute_Navigation(map, config, false, stat_nav, loopcount, out items_pickedup); // Modify map if items were picked up for (int i = 0; i < items_pickedup.Count; i++) { ItemManagement(map, items, items_pickedup[i]); } // Check items' respawn cycle ItemRespawnCheck(map, items); //view.Show(map, agents.Bots); //Console.ForegroundColor = ConsoleColor.Black; loopcount++; } return(loopcount > config.iterationlimit); }