Esempio n. 1
0
        public void GetBest(out double[] values, out double fitness)
        {
            Player g = ((Player)m_thisGeneration[m_populationSize - 1]);

            values = new double[g.Length];
            g.GetValues(ref values);
            fitness = (double)g.Fitness;
        }
Esempio n. 2
0
 public void GetNthGenome(int n, out double[] values, out double fitness)
 {
     if (n < 0 || n > m_populationSize - 1)
     {
         throw new ArgumentOutOfRangeException("n too large, or too small");
     }
     project.Player g = ((Player)m_thisGeneration[n]);
     values = new double[g.Length];
     g.GetValues(ref values);
     fitness = (double)g.Fitness;
 }