Sfoglia il codice sorgente

bug fix: sort pheromones with best intensity asc

Bastien Sevajol 11 anni fa
parent
commit
7bf206af6f
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      intelligine/simulation/pheromone/DirectionPheromone.py

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

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 = []