/// <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); }
/// <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); }