public void logDNA(T3 dna, float fitness)
    {
        spawn();
        m_evolution.addDNA(dna, fitness);

        data.Add(fitness);

        float sum = 0;

        if (data.Count == 20)
        {
            foreach (float x in data)
            {
                sum += x;
            }

            DataCollector.recordData("" + (sum / 50f));
            data = new List <float>();
        }
    }
 //Logs DNA and fitness in evolution controller
 public void logDNA(MindBodyDNDNA <ResourceFightDNCreature> dna, float fitness)
 {
     m_evolution.addDNA(dna, fitness);
 }