private void UpdateOutput() { //FileOutput.WritePreyMeanOverallDistancesFromPredToFile(Utilities.MeanDistancePreyFromPredPerGen); FileOutput.WritePreyMeanOverallDistancesToFile(Utilities.MeanDistancePreyFromPreyPerGen); Utilities.MeanDistancePreyFromPredPerGen = 0f; Utilities.MeanDistancePreyFromPreyPerGen = 0f; }
public void PrintOutput(int genNo) { List <float> weights = new List <float>(); weights.Add(TimeAlive); seekLatAv /= weightsCount; weights.Add(seekLatAv); seekSightAv /= weightsCount; weights.Add(seekSightAv); alightSightAv /= weightsCount; weights.Add(alightSightAv); alightLatAv /= weightsCount; weights.Add(alightLatAv); cohesionSightAv /= weightsCount; weights.Add(cohesionSightAv); cohesionLatAv /= weightsCount; weights.Add(cohesionLatAv); seperationSightAv /= weightsCount; weights.Add(seperationSightAv); seperationLatAv /= weightsCount; weights.Add(seperationLatAv); wanderAv /= weightsCount; weights.Add(wanderAv); weights.Add(genNo); velocityAv /= velocityCount; weights.Add(velocityAv); //meanDistance /= distanceCount; //weights.Add(meanDistance); FileOutput.WriteWeightsToFile(weights); weights.Clear(); if (distancePredCount > 0) { Utilities.MeanDistancePreyFromPredPerGen += meanDistanceFromPred /= distancePredCount; } if (distancePreyCount > 0) { Utilities.MeanDistancePreyFromPreyPerGen += meanDistanceFromPrey /= distancePreyCount; } }