Class Ant
java.lang.Object
org.episteme.core.mathematics.optimization.swarm.Ant
Represents an Ant in Ant Colony Optimization (ACO).
Typically used for finding paths in a graph.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()getTour()doublebooleanhasVisited(int node) intselectNextNode(int current, double[][] pheromones, double[][] distances, double alpha, double beta) Probabilistically select the next node based on pheromones and distance.voidvisitNode(int node, double distance)
-
Constructor Details
-
Ant
public Ant(int numNodes)
-
-
Method Details
-
visitNode
public void visitNode(int node, double distance) -
hasVisited
public boolean hasVisited(int node) -
getTour
-
getTourLength
public double getTourLength() -
clear
public void clear() -
selectNextNode
public int selectNextNode(int current, double[][] pheromones, double[][] distances, double alpha, double beta) Probabilistically select the next node based on pheromones and distance.
-