Преглед изворни кода

bug fix: sort pheromones with best intensity asc

Bastien Sevajol пре 9 година
родитељ
комит
7bf206af6f
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      intelligine/simulation/pheromone/DirectionPheromone.py

+ 1 - 1
intelligine/simulation/pheromone/DirectionPheromone.py Прегледај датотеку

@@ -52,7 +52,7 @@ class DirectionPheromone():
52 52
             raise NoPheromone()
53 53
 
54 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 56
         max_intensity = arround_pheromones_sorted[0][1][1]
57 57
 
58 58
         arround_pheromones_max = []