예제 #1
0
        /// <summary>
        /// Reproduction process
        /// </summary>
        private void Reproduce()
        {
            RandomSelector <Species> selector = new RandomSelector <Species>();

            foreach (Species s in AllSpecies)
            {
                selector.Add(s, s.Score);
            }

            foreach (Client c in AllClients)
            {
                if (c.Species == null)
                {
                    Species s = selector.Random();
                    c.Genome = s.Breed();
                    s.ForcePut(c);
                }
            }
        }