Пример #1
0
    public void CopulateBestCreatures()
    {
        List <Genome> genomes = new List <Genome>();

        for (int i = 0; i < sexed; i++)
        {
            Genome g1 = history.bestGenomes[Random.Range(0, history.bestGenomes.Count - 1)];
            Genome g2 = history.bestGenomes[Random.Range(0, history.bestGenomes.Count - 1)];

            Genome g3 = g1.Clone();

            genomes.Add(Genome.Copulate(g1, g2));
        }

        history.bestGenomes.AddRange(genomes);
    }