/// <summary>
/// Calculate the network depth for the specified genome.
/// </summary>
/// <param name="genome">The genome to calculate.</param>
private void CalculateNetDepth(NEATGenome genome)
{
int maxSoFar = 0;
for (int nd = 0; nd < genome.Neurons.Genes.Count; ++nd)
{
foreach (SplitDepth split in splits)
{
if ((genome.GetSplitY(nd) == split.Value) &&
(split.Depth > maxSoFar))
{
maxSoFar = split.Depth;
}
}
}
genome.NetworkDepth = maxSoFar + 2;
}