示例#1
0
        /// <summary>
        /// Randomly generate chromosome with exact number of levels
        /// </summary>
        /// <param name="levels">Tree leveles</param>
        /// <returns></returns>
        public GPChromosome GenerateChromosome(int levels)
        {
            GPChromosome ch = GPChromosome.NewChromosome();

            ch.expressionTree = GenerateTreeStructure(levels);
            return(ch);
        }
示例#2
0
        /// <summary>
        /// Randomly generate chromosome with exact number of levels
        /// </summary>
        /// <param name="levels">Tree leveles</param>
        /// <returns></returns>
        public GPChromosome GenerateGPChromosome(int levels)
        {
            GPChromosome ch = GPChromosome.NewChromosome();

            ch.Generate(levels);
            return(ch);
        }