Why Are Ant And Bee Colony Algorithms Important Algorithms?
The Purpose of Using Algorithms Is to Find A Solution To The Problems We Face Daily.
On the other hand, algorithms should provide us with an optimized solution so that their application does not cause additional problems.
Accordingly, optimizing the written algorithms to increase their performance is necessary.
Ant colony algorithms and bee algorithms are essential and popular algorithms in the world of software and especially artificial intelligence. Algorithms that we are going to talk about briefly.
Particle Swarm Optimization
Before going to the introduction of the mentioned two algorithms, let us provide a brief explanation of particle swarm optimization. The “Particle swarm optimization” method is a global optimization method that can deal with problems whose solution is a point or surface in n-dimensional space. In such a space, assumptions are made, an initial speed is assigned to them, and communication channels between particles are considered.
Over time, particles accelerate towards particles with a higher fitness criterion and in the same communication group. These particles are then moved through the response space, and the results are calculated based on a “merit criterion” after each time interval. Although each method works well in a range of problems, this method has successfully solved continuous optimization problems.
Ant colony algorithm
Ant colony optimization (ACO) is a solution to find the shortest path and is an optimization problem that is sometimes difficult or time-consuming to solve. In graph theory, the problem of finding the shortest route is the problem of finding a path between two vertices (or nodes) in such a way that the total weight of its component edges is minimized.
For example, you can consider the problem of finding the fastest way to go from one place to another on the map; In this case, the vertices represent the locations, and the edges represent the parts of the path, which are weighted according to the time required to travel them.
The problem of the traveling salesman is one of the most critical and exciting examples of the world of artificial intelligence in this field. In this ant colony algorithm method, artificial ants move on the graph of the problem and leave marks on the chart, like real ants that leave marks on their movement path, making the next artificial ants able to provide better solutions to the problem.
Also, in this method, it is possible to find the best path in a diagram by using computational-numerical problems based on the science of probabilities.
The ant colony algorithm is inspired by studies and observations of an ant colony.
These studies have shown that ants are social insects that live in colonies, and their behavior is more towards the territory’s survival than a part of it. Finding the shortest path by ants has exciting features; first, it is highly generalizable and self-organizing.
Meanwhile, there is no central control mechanism. The second feature is its high power. The system consists of many factors that alone are unimportant, so even the loss of an important factor does not significantly affect the system’s performance.
The third feature is that the process is adaptive. Since the behavior of none of the ants is fixed and some ants still choose the longer route, the system can adapt itself to changes in the environment, and the last feature is that this process is scalable and can be as large as desired.
These features have inspired the design of algorithms that are used in problems that require these features.
The first algorithm introduced based on this was the ABC algorithm. Then implemented, other algorithms named AntHocNet, PERA, ARA, and AntNet based on the above algorithm.
One of the most critical and exciting behaviors of ants is their behavior to find food and especially how to find the shortest path between food sources and nests. This type of behavior of ants has a kind of collective intelligence that has recently attracted the attention of scientists. In the real world, ants first go around randomly to find food. Then they return to the nest and leave a trail of pheromones.
Such traces turn white after rain and are visible. When other ants find this path, they sometimes stop roaming and follow it. Then, if they get food, they return home and leave another mark next to the previous one; in other words, they strengthen the last path. The pheromone evaporates over time, which is helpful in three ways:
Since an ant for a long time travels and reinforces shorter paths more, anyway between home and food faster (better) is supported more, and the one farther is less. It makes the track less attractive for subsequent ants. If the pheromone did not evaporate, the paths that travel multiple times would become so over-attractive that they would significantly limit random foraging.
The trail remains when the food at the end of an attractive path runs out.
Therefore, when an ant finds a short (good) path from home to food, the rest of the ants will most likely follow the same path. Eventually, all ants will follow the same direction by continuously strengthening that path and evaporating other traces.
The goal of the ant’s algorithmic behavior is imitated by artificial ants that are moving on the graph. The problem is finding the shortest path; the solution is these artificial ants.
One of the applications of this algorithm is to reach an almost optimal solution to the traveling salesman problem. So that all kinds of ant algorithms have been prepared to solve this problem.
Because this numerical method has an advantage over analytical and genetic approaches in cases where the graph constantly changes with time; and it is an algorithm with the ability to repeat; therefore, with time, it can change the answer live, which is essential in the routing of computer networks and urban transportation system.
ACO is a complete and suitable algorithm for solving the TSP problem. By doing a dynamic programming algorithm for this problem, the time is obtained from the exponential order, which is also unsuitable. Of course, other algorithms have also been presented, but none have good performance.
What are the advantages of the ant colony algorithm?
Pheromone evaporation and collision-probability allow ants to find the shortest path. These two features create flexibility in solving any optimization problem. For example, in the graph of cities of the traveling salesman problem, if one of the edges (or nodes) is removed, the algorithm can quickly find the optimal path according to the new conditions.
In this way, if the edge (or node) is removed, the algorithm is no longer necessary to solve the problem from the beginning. However, we still have the best path from the place where the problem is translated to the site where the edge (or node) is removed; from now on, the ants can, After a short time, find the optimal (shortest) path.
The most critical applications of the above algorithm for intra-city and inter-city routing, routing for computer network routing, use on the web, use of ACO in optimizing water distribution networks, edge detection of images, and the like.
Bee algorithm
In computer science and operations research, the honey bee algorithm is a population-based search algorithm developed in 2005 by Dr. Pham and Dr. Afshin Qanbarzadeh. This algorithm mimics the food searching behavior of honey bees.
In its initial version, this algorithm performs a type of local search along with global tracking and can be used for combinatorial optimization and continuous optimization. Several studies have proven the bee algorithm’s effectiveness and specific capabilities. The only condition for operating the honey bee algorithm is that some topological distance measurements are defined between the solutions.
A colony of honey bees can disperse over long distances (more than 14 km) and in different directions simultaneously to harvest nectar or pollen from multiple food sources. These sentinel bees randomly move around the area surrounding the hive and assess incoming food sources’ profitability (net energy efficiency). A small part of this colony is constantly searching the environment for new patches of flowers.
When they return to the hive, the watchers store the harvested food.
Those bees that find a highly profitable food source move to an area in the pack called the “dance floor” and perform a ritual called the “move dance.”
During this dance, the beekeeper talks about the place he discovered to the idle bystanders who will join in exploiting the flowers after the dance. The watcher goes to the place he found to collect more food. Since the dance length is proportional to the watcher’s score of the food source, more probes are recruited to harvest the flower patches with the best score.
As long as these locations are considered profitable, the Watchers advertise these rich food sources upon their return. Recruited prospectors may also perform this dance, increasing recruitment to find valuable flowers.
Thanks to the autocatalytic process, this bee colony can quickly switch focus to searching for profitable flowers.
Recruited prospectors may also perform this dance, increasing recruitment to find valuable flowers. Thanks to the autocatalytic process, this bee colony can quickly switch focus to searching for profitable flowers. Recruited prospectors may also perform this dance, increasing recruitment to find valuable flowers. Thanks to the autocatalytic process, this bee colony can quickly switch focus to searching for profitable flowers.
The honey bee algorithm mimics the foraging strategy of the honey bee to find the best solution to the optimization problem. Each candidate solution is a food source (flower), and a population (colony) of n agents (bees) is used to search the solution space.
Each time the artificial bee visits a flower (reaches a solution), it evaluates its benefit (compatibility). The honey bee algorithm consists of the initial procedure of installing a basic search cycle that is repeated for a given number of times T or until a consistent and acceptable solution is found. Each search cycle consists of five methods: recruitment, local search, neighborhood shrinking, site abandonment, and general search.
The bees algorithm has found many applications in engineering, among which the optimization of clustering floor/systems, manufacturing, bioengineering control, other optimization problems, and multi-objective optimization should be mentioned.
last word
In general, algorithms are mainly used to find the shortest path. For example, the problem of finding the shortest route is used to find ways between real places such as thoroughfares in Internet maps such as Google Maps.
Let’s consider an unreal virtual machine graphically, where vertices represent states and edges represent transitions from one state to another. The shortest path algorithm can be used to find an optimal sequence of choices to reach a particular state. Also, this algorithm can achieve a lower time limit required to get a specific form.
For example, suppose the vertices represent the states of a puzzle like a Rubik’s cube, and each of the directional edges represents a movement or rotation. In that case, the shortest path algorithms can be used so that these algorithms lead to a solution with the least number of moves.
Sometimes in the structure of communication networks or telecommunication networks, this problem is referred to as the problem of finding the least delayed path, which is often closely related to the problem of finding the most comprehensive way. This problem is also used in robotics, transportation, and VLSI circuit design.