public GenomeFactory( INeuralNetworkFactory neuralNetworkFactory, IEvolutionSettings <TSimulation> evolutionSettings) { this.neuralNetworkFactory = neuralNetworkFactory; this.evolutionSettings = evolutionSettings; }
public Genome( INeuralNetwork neuralNetwork, IEvolutionSettings <TSimulation> evolutionSettings) { this.evolutionSettings = evolutionSettings; Simulation = evolutionSettings.SimulationFactoryMethod(); NeuralNetwork = neuralNetwork; }
public Generation( IEvolutionSettings <TSimulation> evolutionSettings, IGenomeFactory <TSimulation> genomeFactory) { genomes = new HashSet <IGenome <TSimulation> >(); bestGenomes = new LinkedList <IGenome <TSimulation> >(); this.evolutionSettings = evolutionSettings; this.genomeFactory = genomeFactory; }
public static void AddFluffySpoonNeuroEvolution <TSimulation>( this IServiceCollection services, IEvolutionSettings <TSimulation> settings ) where TSimulation : ISimulation { services.AddSingleton(settings); services.AddSingleton <INeuralNetworkSettings>(settings); services.AddScoped(typeof(IGeneration <>), typeof(Generation <>)); services.AddScoped(typeof(IGenomeFactory <>), typeof(GenomeFactory <>)); services.AddScoped(typeof(INeuralNetworkFactory), typeof(AccordNeuralNetworkFactory)); }