Firstly thanks a lot for the code! It was quite helpful.
In the pheromone update step, it is written as
self.pheromone[move] += 1.0 / self.distances[move]
but according to the formula it should be
self.pheromone[move] += 1.0 / dist
It is the inverse of the total path distance of that route taken by the ant which is the dist.
Firstly thanks a lot for the code! It was quite helpful.
In the pheromone update step, it is written as
self.pheromone[move] += 1.0 / self.distances[move]but according to the formula it should be
self.pheromone[move] += 1.0 / distIt is the inverse of the total path distance of that route taken by the ant which is the
dist.