コード例 #1
0
ファイル: GA.cs プロジェクト: 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);
            }
        }
コード例 #2
0
ファイル: GA.cs プロジェクト: amennelet/AI-Programmer
 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);
     }
 }