I implemented a self made or at least adapted ant based algorithm to solve a mathematical problem. Each ant walks a route which represents a possible solution. The shortest path is the best solution. It takes advantage of swarm intelligence.
No, BFS is ment to explore all nodes abd edges systematicaly, while ant algorithms may never explore a whole bunsh of nodes. They do they search not systematically but by walking paths randomly at the beginning and spreading pheromons while doing so. Finding shorter paths will result in a higher pheromon level remaining and thus direct next ants to these shorter paths instead of longer ones.
You wouldn’t know, what they will do before executing the program and they will propably find shorter paths if you use 1000 ants instead of 100.
In my results I drew a graph the highlights the ant’s paths by thicknes. I drew such a graph after (for example) 10, 100 and 1000 ants. You could see, that the first ants took a path randomly and after 100 iterations, some of the shorter edges became a bit thicker than others. At the end, only the shortest edges where drawn with high thickness while the longest one where rarely used if at all
I implemented a self made or at least adapted ant based algorithm to solve a mathematical problem. Each ant walks a route which represents a possible solution. The shortest path is the best solution. It takes advantage of swarm intelligence.
Similar to BFS?
No, BFS is ment to explore all nodes abd edges systematicaly, while ant algorithms may never explore a whole bunsh of nodes. They do they search not systematically but by walking paths randomly at the beginning and spreading pheromons while doing so. Finding shorter paths will result in a higher pheromon level remaining and thus direct next ants to these shorter paths instead of longer ones.
You wouldn’t know, what they will do before executing the program and they will propably find shorter paths if you use 1000 ants instead of 100.
In my results I drew a graph the highlights the ant’s paths by thicknes. I drew such a graph after (for example) 10, 100 and 1000 ants. You could see, that the first ants took a path randomly and after 100 iterations, some of the shorter edges became a bit thicker than others. At the end, only the shortest edges where drawn with high thickness while the longest one where rarely used if at all