/// <summary> /// 5% chance for the destination position to change /// </summary> private void UpdateDestinationPosition() { if (StaticUtils.Random.Next(0, 100) > 95) { DestinationPosition.MoveDirection(GeneDirection.GetRandomDirection()); } }
/// <summary> /// Get a fitness score for the genome (euclidean distance) /// </summary> /// <param name="genome"></param> /// <returns></returns> public float GetFitness(Genome genome) { return(DestinationPosition.GetDistance(genome.CurrentPosition)); }