IEnumerator RunOnce() { for (int i = 0; i < 100; i++) { Debug.Log(i); for (int j = 0; j < 10; j++) { geneticAlg.NextGeneration(); if (stop) { yield break; } yield return(null); } } float[] stats = geneticAlg.CalcStatistics(); Debug.Log("Winrate: " + (stats[0] * 100) + " %"); Debug.Log("Winning DNA:"); Debug.Log(string.Join(",", stats.Skip(1).Select(f => f.ToString()).ToArray())); }