Beispiel #1
0
        private Best FindBest(List <SearchNode> nodes)
        {
            var best = new Best(_width);

            foreach (var node in nodes)
            {
                var value = _heuristic.Evaluate(node.State);
                best.Add(node, value);
            }
            return(best);
        }
Beispiel #2
0
 public void AddPoints(Population population)
 {
     Best.Add(new Point(Best.Count, population.CalculateBestDistance()));
     Worst.Add(new Point(Worst.Count, population.CalculateWorstDistance()));
     Average.Add(new Point(Average.Count, population.CalculateAverageDistance()));
 }