Exemple #1
0
        public static SolutionGenome ConstructRandom(IEnumerable <ShapeTemplate> shapeTemplates, int stockLength, EAConfig config)
        {
            var genes = shapeTemplates.Select(s => Gene.ConstructRandom(s, stockLength));

            return(ConstructConfig(genes, stockLength, config));
        }
Exemple #2
0
 public static SolutionGenome ConstructConfig(IEnumerable <Gene> genes, int stockLength, EAConfig config)
 {
     return(new SolutionGenome(
                genes,
                config.ParentSelection.AdaptiveCrossover,
                config.ParentSelection.RateAdjacencyCrossover,
                config.Mutations.Adaptive,
                config.Mutations.RateCreepRandom,
                config.Mutations.RateRotateRandom,
                config.Mutations.RateSlideRandom
                ));
 }