コード例 #1
0
ファイル: EvaluationInfo.cs プロジェクト: tansey/grid-games
 /// <summary>
 /// Construct and allocate the specified amount of memory for fitness history. Use
 /// zero if you don't require fitness history - but note that no arithmetic mean will be available.
 /// </summary>
 public EvaluationInfo(int fitnessHistoryLength)
 {
     _fitnessHistoryLength = fitnessHistoryLength;
     if(0 != fitnessHistoryLength) {
         _fitnessHistory = new DoubleCircularBufferWithStats(fitnessHistoryLength);
     }
 }
コード例 #2
0
 /// <summary>
 /// Construct a NEAT statistics object based on a specified set of NEAT parameters.
 /// </summary>
 public NeatAlgorithmStats(NeatEvolutionAlgorithmParameters eaParams)
 {
     _bestFitnessMA = new DoubleCircularBufferWithStats(eaParams.BestFitnessMovingAverageHistoryLength);
     _meanSpecieChampFitnessMA = new DoubleCircularBufferWithStats(eaParams.MeanSpecieChampFitnessMovingAverageHistoryLength);
     _complexityMA = new DoubleCircularBufferWithStats(eaParams.ComplexityMovingAverageHistoryLength);
 }