예제 #1
0
        /// <summary>
        /// Copy constructor.
        /// </summary>
        /// <param name="copyFrom"></param>
        public NeatParameters(NeatParameters copyFrom)
        {
            //joel
            noveltySearch    = copyFrom.noveltySearch;
            noveltyHistogram = copyFrom.noveltyHistogram;
            noveltyFixed     = copyFrom.noveltyFixed;
            noveltyFloat     = copyFrom.noveltyFloat;
            histogramBins    = copyFrom.histogramBins;

            populationSize = copyFrom.populationSize;

            pOffspringAsexual   = copyFrom.pOffspringAsexual;
            pOffspringSexual    = copyFrom.pOffspringSexual;
            pInterspeciesMating = copyFrom.pInterspeciesMating;

            pDisjointExcessGenesRecombined = copyFrom.pDisjointExcessGenesRecombined;

            pMutateConnectionWeights  = copyFrom.pMutateConnectionWeights;
            pMutateAddNode            = copyFrom.pMutateAddNode;
            pMutateAddModule          = copyFrom.pMutateAddModule;
            pMutateAddConnection      = copyFrom.pMutateAddConnection;
            pMutateDeleteConnection   = copyFrom.pMutateDeleteConnection;
            pMutateDeleteSimpleNeuron = copyFrom.pMutateDeleteSimpleNeuron;

            // Copy the list.
            ConnectionMutationParameterGroupList = new ConnectionMutationParameterGroupList(copyFrom.ConnectionMutationParameterGroupList);

            compatibilityThreshold        = copyFrom.compatibilityThreshold;
            compatibilityDisjointCoeff    = copyFrom.compatibilityDisjointCoeff;
            compatibilityExcessCoeff      = copyFrom.compatibilityExcessCoeff;
            compatibilityWeightDeltaCoeff = copyFrom.compatibilityWeightDeltaCoeff;

            elitismProportion   = copyFrom.elitismProportion;
            selectionProportion = copyFrom.selectionProportion;

            targetSpeciesCountMin = copyFrom.targetSpeciesCountMin;
            targetSpeciesCountMax = copyFrom.targetSpeciesCountMax;

            pruningPhaseBeginComplexityThreshold         = copyFrom.pruningPhaseBeginComplexityThreshold;
            pruningPhaseBeginFitnessStagnationThreshold  = copyFrom.pruningPhaseBeginFitnessStagnationThreshold;
            pruningPhaseEndComplexityStagnationThreshold = copyFrom.pruningPhaseEndComplexityStagnationThreshold;

            speciesDropoffAge = copyFrom.speciesDropoffAge;

            connectionWeightRange = copyFrom.connectionWeightRange;
        }
예제 #2
0
 /// <summary>
 /// Compare this IGenome with the provided one. They are compatibile if their calculated difference
 /// is below the current threshold specified by NeatParameters.compatibilityThreshold
 /// </summary>
 /// <param name="comparisonGenome"></param>
 /// <param name="neatParameters"></param>
 /// <returns></returns>
 abstract public bool IsCompatibleWithGenome(IGenome comparisonGenome, NeatParameters neatParameters);