Beispiel #1
0
Datei: GA.cs Projekt: Overx/AI
        public void Load(string fileName)
        {
            IRepository <GAParams> repository = new GARepository(fileName);
            var value = repository.GetAll();

            if (value.Count() > 0)
            {
                GAParams = value.ToList()[0];
                Console.WriteLine("Loaded Genetic Algorithm: Crossover " + GAParams.CrossoverRate + ", Mutation Rate " + GAParams.MutationRate + ", Pop Size " + GAParams.PopulationSize + ", Gen Size " + GAParams.Generations + ", Current Gen " + GAParams.CurrentGeneration);
            }
        }
Beispiel #2
0
 public void Load(string fileName)
 {
     IRepository<GAParams> repository = new GARepository(fileName);
     var value = repository.GetAll();
     if (value.Count() > 0)
     {
         GAParams = value.ToList()[0];
         Console.WriteLine("Loaded Genetic Algorithm: Crossover " + GAParams.CrossoverRate + ", Mutation Rate " + GAParams.MutationRate + ", Pop Size " + GAParams.PopulationSize + ", Gen Size " + GAParams.Generations + ", Current Gen " + GAParams.CurrentGeneration);
     }
 }