public void MakeLearningProcess(int SpecimenCount, float mutChance, float selectPercent, bool overrideLearningProcess = false) { if (overrideLearningProcess || HiddenLayersSettings == null || NeuronTypesSettings == null) { neuronDefinitionsPanelScript.GetNeuronDefinitions(out HiddenLayersSettings, out NeuronTypesSettings); HiddenLayersSettings.Insert(0, 6); } PercentToSelect = selectPercent; MutationChance = mutChance; config.PercentToSelect = selectPercent; config.MutationChance = mutChance; config.SetParentChoosingMethod(parentChoosingMethod); config.RandOptions.Sigma = sigma; if (overrideLearningProcess || learningProcess == null) { learningProcess = new LearningProcess( SpecimenCount, config, HiddenLayersSettings, NeuronTypesSettings ); } else { Debug.Log("Istniał Learning Process"); //learningProcess.PopulationCount = Specimen.Length; } learningProcess.LearningAlgorithm.Config = config; }
void Awake() { config = new GeneticAlgorithmConfig(); config.RandOptions = new RandomizerOptions(-1, 1); config.PercentToSelect = PercentToSelect; config.MutationChance = MutationChance; //config.ParentChances = Chances; config.SetParentChoosingMethod(parentChoosingMethod); Application.runInBackground = true; }
public Classification() { GeneticAlgorithmConfig config = new GeneticAlgorithmConfig(); config.RandOptions = new RandomizerOptions(-1, 1, 0.2); config.PercentToSelect = 0.5; config.MutationChance = 0.2; config.SetParentChoosingMethod(ParentChoosingMethod.PositionLinear); process = new LearningProcess(populationCount, config, new List <int> { 2, 4, 2 }, new List <Type>() { typeof(TanHNeuron), typeof(StepNeuron) }); }
public Perceptron() { GeneticAlgorithmConfig config = new GeneticAlgorithmConfig(); config.RandOptions = new RandomizerOptions(-1, 1, 0.05); config.PercentToSelect = 0.4; config.MutationChance = 0.005; config.SetParentChoosingMethod(ParentChoosingMethod.Geom); process = new LearningProcess(populationCount, config, new List <int> { 3, 100, 2 }, new List <Type>() { typeof(IdentityNeuron), typeof(IdentityNeuron) }); }