소스 검색

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