A biomimetic algorithm is any algorithm that attempts to mimic a natural process in order to solve a problem. Consider, for instance, the following problem.
The Travelling Salesperson Problem:
Consider a salesperon who must visit n number of cities. Each city is connected by a single road, and to save time this salesperson can only visit each city once, and must start and end in the same city. How can the salesperson find the shortest route?
Theres a few answers to this question. The most obvious solution is to calculate every possible route and then calculate the distance of all those routes, and finding the shortest route from that. Whilst 100% accurate, this solution has a time complexity of n!, which obviously is highly inefficient.
Another solution is the known as the lazy approach. In this approach, the salesperson will travel to the nearest city that they haven't travelled to yet. This solution is much faster, having a time complexity of n, but finds a highly unoptimized route.
So how do we find the shortest route? The answer may lie in ants.
Ant Colony Optimization:
An ant optimization algorithm is a path finding biomimetic algorithm that attempts to mimic the real life path finding behaviour of ants in order to solve problems such as the travelling salesperson problem. Te rough process is as follows:
1) Generate x number of "ants" and make them go from their current city to a random available city until they run out of available cities, and then return to the initial city. 2) Calculate the length of the route they took, and lay a "pheromone trail" along their route that has a strength inversely proportional to the length of the route. 3) Repeat step 1, but add weight to the random choices from the pheromone trail. To put it simply, the ants are more likely to follow roads found on shorter paths. Also, after each iteration reduce the value of the pheromone trail with each iteration. 4) Repeat these steps until a breakpoint is reached, usually a certain number of iterations without a change in the shortest travelled route.