protected void Travel(IAnt ant, IGraph input) { while (true) { var allPossibleVertecies = input.GetSibilings(ant.VisitedVetecies.Last()); foreach (var currentNode in ant.VisitedVetecies) { if (allPossibleVertecies.ContainsKey(currentNode)) { allPossibleVertecies.Remove(currentNode); } } var probes = allPossibleVertecies.Keys.ToDictionary(vertex => vertex, vertex => Prober.GetProb(allPossibleVertecies[vertex])); if (probes.Count == 0) { ant.VisitedVetecies.Add(ant.VisitedVetecies.First()); return; } ant.VisitedVetecies.Add(Rules[ant.GetType()].Proccess(probes)); } }