Pārlūkot izejas kodu

bug fix: sort pheromones with best intensity asc

Bastien Sevajol 11 gadus atpakaļ
vecāks
revīzija
7bf206af6f

+ 1 - 1
intelligine/simulation/pheromone/DirectionPheromone.py Parādīt failu

52
             raise NoPheromone()
52
             raise NoPheromone()
53
 
53
 
54
         shuffle(arround_pheromones_points)
54
         shuffle(arround_pheromones_points)
55
-        arround_pheromones_sorted = sorted(arround_pheromones_points, key=lambda x: x[1][1])
55
+        arround_pheromones_sorted = sorted(arround_pheromones_points, key=lambda x: x[1][1], reverse=True)
56
         max_intensity = arround_pheromones_sorted[0][1][1]
56
         max_intensity = arround_pheromones_sorted[0][1][1]
57
 
57
 
58
         arround_pheromones_max = []
58
         arround_pheromones_max = []