Browse Source

Fix bug: when choose direction of most intensity pheromone: must be reverse the sort

Bastien Sevajol 9 years ago
parent
commit
ef3bb40a17
1 changed files with 1 additions and 1 deletions
  1. 1 1
      intelligine/simulation/pheromone/DirectionPheromone.py

+ 1 - 1
intelligine/simulation/pheromone/DirectionPheromone.py View File

@@ -98,7 +98,7 @@ class DirectionPheromone():
98 98
             raise NoPheromone()
99 99
 
100 100
         shuffle(arround_pheromones_points)
101
-        arround_pheromones_sorted = sorted(arround_pheromones_points, key=lambda x: x[1][1])
101
+        arround_pheromones_sorted = sorted(arround_pheromones_points, key=lambda x: x[1][1], reverse=True)
102 102
         go_to_point = arround_pheromones_sorted[0][0]
103 103
 
104 104
         direction_degrees = get_degree_from_north(reference_point, go_to_point)