CreateSimplifyingParameters() public method

Creates a set of parameters based on the current set and that are suitable for the simplifying phase of the evolution algorithm when running with complexity regulation enabled.
public CreateSimplifyingParameters ( ) : NeatEvolutionAlgorithmParameters
return NeatEvolutionAlgorithmParameters
コード例 #1
0
        /// <summary>
        /// Constructs with the default NeatEvolutionAlgorithmParameters and speciation strategy
        /// (KMeansClusteringStrategy with ManhattanDistanceMetric).
        /// </summary>
        public NeatEvolutionAlgorithm()
        {
            _eaParams = new NeatEvolutionAlgorithmParameters();
            _eaParamsComplexifying = _eaParams;
            _eaParamsSimplifying   = _eaParams.CreateSimplifyingParameters();
            _stats = new NeatAlgorithmStats(_eaParams);
            _speciationStrategy = new KMeansClusteringStrategy <TGenome>(new ManhattanDistanceMetric());

            _complexityRegulationMode     = ComplexityRegulationMode.Complexifying;
            _complexityRegulationStrategy = new NullComplexityRegulationStrategy();
        }
コード例 #2
0
        /// <summary>
        /// Constructs with the provided NeatEvolutionAlgorithmParameters and ISpeciationStrategy.
        /// </summary>
        public NeatEvolutionAlgorithm(NeatEvolutionAlgorithmParameters eaParams,
                                      ISpeciationStrategy <TGenome> speciationStrategy,
                                      IComplexityRegulationStrategy complexityRegulationStrategy)
        {
            _eaParams = eaParams;
            _eaParamsComplexifying = _eaParams;
            _eaParamsSimplifying   = _eaParams.CreateSimplifyingParameters();
            _stats = new NeatAlgorithmStats(_eaParams);
            _speciationStrategy = speciationStrategy;

            _complexityRegulationMode     = ComplexityRegulationMode.Complexifying;
            _complexityRegulationStrategy = complexityRegulationStrategy;
        }
コード例 #3
0
        /// <summary>
        /// Constructs with the default NeatEvolutionAlgorithmParameters and speciation strategy
        /// (KMeansClusteringStrategy with ManhattanDistanceMetric).
        /// </summary>

        /*
         * public NeatEvolutionAlgorithm()
         * {
         *  _eaParams = new NeatEvolutionAlgorithmParameters();
         *  _eaParamsComplexifying = _eaParams;
         *  _eaParamsSimplifying = _eaParams.CreateSimplifyingParameters();
         *  _stats = new NeatAlgorithmStats(_eaParams);
         *  _speciationStrategy = new KMeansClusteringStrategy<TGenome>(new ManhattanDistanceMetric());
         *
         *  _complexityRegulationMode = ComplexityRegulationMode.Complexifying;
         *  _complexityRegulationStrategy = new NullComplexityRegulationStrategy();
         * }
         */

        /// <summary>
        /// Constructs with the provided NeatEvolutionAlgorithmParameters and ISpeciationStrategy.
        /// </summary>

/*
 *      public NeatEvolutionAlgorithm(NeatEvolutionAlgorithmParameters eaParams,
 *                                    ISpeciationStrategy<TGenome> speciationStrategy,
 *                                    IComplexityRegulationStrategy complexityRegulationStrategy)
 *      {
 *          _eaParams = eaParams;
 *          _eaParamsComplexifying = _eaParams;
 *          _eaParamsSimplifying = _eaParams.CreateSimplifyingParameters();
 *          _stats = new NeatAlgorithmStats(_eaParams);
 *          _speciationStrategy = speciationStrategy;
 *
 *          _complexityRegulationMode = ComplexityRegulationMode.Complexifying;
 *          _complexityRegulationStrategy = complexityRegulationStrategy;
 *      }
 */
        public void Construct(NeatEvolutionAlgorithmParameters eaParams,
                              ISpeciationStrategy <TGenome> speciationStrategy,
                              IComplexityRegulationStrategy complexityRegulationStrategy,
                              IGenomeListEvaluator <TGenome> initialGenomeListEvaluator)
        {
            _eaParams = eaParams;
            _eaParamsComplexifying = _eaParams;
            _eaParamsSimplifying   = _eaParams.CreateSimplifyingParameters();
            _stats = new NeatAlgorithmStats(_eaParams);
            _speciationStrategy = speciationStrategy;

            _complexityRegulationMode     = ComplexityRegulationMode.Complexifying;
            _complexityRegulationStrategy = complexityRegulationStrategy;

            _initialGenomeListEvaluator = initialGenomeListEvaluator;
        }