/// <summary> /// Create a new instance of <see cref="NeatExperiment{T}"/> for experiments with acyclic neural networks, and a set of /// default settings. /// </summary> /// <param name="name">Experiment name.</param> /// <param name="evalScheme">Experiment evaluation scheme object.</param> /// <param name="activationFnName">Name of the neuron activation function to use in evolved networks.</param> /// <returns>A new instance of <see cref="NeatExperiment{T}"/>.</returns> public static NeatExperiment <T> CreateAcyclic( string name, IBlackBoxEvaluationScheme <T> evalScheme, string activationFnName) { return(new NeatExperiment <T>(name, evalScheme, activationFnName, true, 0)); }
/// <summary> /// Create a new instance of <see cref="NeatExperiment{T}"/> for experiments with cyclic neural networks, and a set of /// default settings. /// </summary> /// <param name="name">Experiment name.</param> /// <param name="evalScheme">Experiment evaluation scheme object.</param> /// <param name="activationFnName">Name of the neuron activation function to use in evolved networks.</param> /// <param name="cyclesPerActivation">Defines how many timesteps to run the neural net per call to Activate().</param> /// <returns>A new instance of <see cref="NeatExperiment{T}"/>.</returns> public static NeatExperiment <T> CreateCyclic( string name, IBlackBoxEvaluationScheme <T> evalScheme, string activationFnName, int cyclesPerActivation) { return(new NeatExperiment <T>(name, evalScheme, activationFnName, false, cyclesPerActivation)); }
/// <summary> /// Constructs with the provided name and evaluation scheme, and default settings. /// </summary> /// <param name="name">Experiment name.</param> /// <param name="evalScheme">Experiment evaluation scheme object.</param> public NeatExperiment( string name, IBlackBoxEvaluationScheme <T> evalScheme) { this.Name = name ?? throw new ArgumentNullException(nameof(name)); this.EvaluationScheme = evalScheme ?? throw new ArgumentNullException(nameof(evalScheme)); // Assign a set of default settings. this.NeatEvolutionAlgorithmSettings = new NeatEvolutionAlgorithmSettings(); this.ReproductionAsexualSettings = new NeatReproductionAsexualSettings(); this.ReproductionSexualSettings = new NeatReproductionSexualSettings(); this.PopulationSize = 400; this.InitialInterconnectionsProportion = 0.05; this.ConnectionWeightScale = 5.0; // Assign a default complexity regulation strategy. this.ComplexityRegulationStrategy = new NullComplexityRegulationStrategy(); }
/// <summary> /// Constructs with the provided name and evaluation scheme, and default settings. /// </summary> /// <param name="evalScheme">Experiment evaluation scheme object.</param> /// <param name="factoryId">Experiment Factory ID (optional).</param> /// <param name="id">Experiment ID.</param> public NeatExperiment( IBlackBoxEvaluationScheme <T> evalScheme, string factoryId, string id) { this.EvaluationScheme = evalScheme ?? throw new ArgumentNullException(nameof(evalScheme)); this.Id = id ?? throw new ArgumentNullException(nameof(id)); this.FactoryId = factoryId ?? throw new ArgumentNullException(nameof(factoryId)); // Use the id as a default name; however this can be overwritten/set after construction. this.Name = id; // Assign a set of default settings. this.NeatEvolutionAlgorithmSettings = new NeatEvolutionAlgorithmSettings(); this.ReproductionAsexualSettings = new NeatReproductionAsexualSettings(); this.ReproductionSexualSettings = new NeatReproductionSexualSettings(); this.PopulationSize = 400; this.InitialInterconnectionsProportion = 0.05; this.ConnectionWeightScale = 5.0; // Assign a default complexity regulation strategy. this.ComplexityRegulationStrategy = new NullComplexityRegulationStrategy(); }
/// <summary> /// Constructs with the provided name and evaluation scheme, and default settings. /// </summary> /// <param name="evalScheme">Experiment evaluation scheme object.</param> /// <param name="factoryId">Experiment Factory ID (optional).</param> public NeatExperiment( IBlackBoxEvaluationScheme <T> evalScheme, string factoryId) : this(evalScheme, factoryId, factoryId) { }