Final
Final
Final
A thesis report submitted in partial fulfillment of the requirements for the degree of Bachelor of Technology in Computer Science
By Shubham Sethi Roll No.: 0804510056 & Chitra Zangid Roll No.:0804513008
Under the guidance of Mr. Bipin Kumar Tripathi & Mrs. Vandana Dixit Kaushik
Certificate
This is to certify that the work in this Thesis Report entitled An Overview of Swarm Intelligence and Ant Colony Optimization Heuristics submitted by Shubham Sethi (0804510056) and Chitra Zangid (0804513008) has been
carried out under my supervision in partial fulfillment of the requirements for the degree of Bachelor of Technology in Computer Science during session 2011-2012 in the Department of Computer Science and Engineering,
Harcourt Butler Technological Institute, and this work has not been submitted elsewhere.
Acknowledgements
No thesis is created entirely by an individual, many people have helped to create this thesis and each of their contribution has been valuable. My deepest gratitude goes to my thesis supervisor, Mr.Bipin Kumar Tripathi, Assoc. Prof., Department of CSE, for his guidance, support, motivation and encouragement through out the period this work was carried out. His readiness for consultation at all times, his educative comments, his concern and assistance even with practical things have been invaluable.
I am grateful to Mr Narendra Kohli, Assistant Prof. and Head, Dept. of CSE for his excellent support during my work. I would also like to thank all professors and lecturers, and members of the department of Computer Science and Engineering for their generous help in various ways for the completion of this thesis. A vote of thanks to my fellow students for their friendly cooperation.
Abstract
We describe an artificial ant colony capable of solving the traveling salesman problem (TSP). Ants of the artificial colony are able to generate successively shorter feasible tours by using information accumulated in the form of a pheromone trail deposited on the edges of the TSP graph. Computer simulations demonstrate that the artificial ant colony is capable of generating good solutions to both symmetric and asymmetric instances of the TSP. The method is an example, like simulated annealing, neural networks, and evolutionary computation, of the successful use of a natural metaphor to design an optimization algorithm. colony optimization (ACO) is a recent family member of the meta-heuristic algorithms and can be used to solve complex optimization problems with few modifications by adding problem-dependent heuristics. ACO is a biological inspiration simulating the ability of real ant colony of finding the shortest path between the nest and food source. It is one of the successful applications of swarm intelligence which is the field of artificial intelligence that study the intelligent behavior of groups rather than of individuals such as the behavior of natural system of social insects like ants, bees, wasps, and termites. Swarm intelligence uses stigmergy which is a form of indirect communication through the environment. The class of complex optimization problems called combinatorial optimization problems are ound in many areas of research and development. Traveling Salesman Problem (TSP), Quadratic Assignment Problem (QAP), Vehicle Routing Problem (VRP), Graph Coloring Problem (GCP), Sequential Ordering Problem (SOP), Job Scheduling Problem (JSP) and Network Routing Problem (NRP) are some examples of these problems. Combinatorial optimization problems arise when the task is to find the best out of many possible solutions to a given problem, provided that a clear notion of solution quality exists.
1. Introduction
Ant Colony Optimization (ACO) is a paradigm for designing metaheuristic algorithms for combinatorial optimization problems. The first algorithm which can be classified within this framework was presented in 1991 [21, 13] and, since then, many diverse variants of the basic principle have been reported in the literature. The essential trait of ACO algorithms is the combination of a priori information about the structure of a promising solution with a posteriori information about the structure of previously obtained good solutions. Metaheuristic algorithms are algorithms which, in order to escape from local optima, drive some basic heuristic: either a constructive heuristic starting from a null solution and adding elements to build a good complete one, or a local search heuristic starting from a complete solution and iteratively modifying some of its elements in order to achieve a better one. The metaheuristic part permits the low level heuristic to obtain solutions better than those it could have achieved alone, even if iterated. Usually, the controlling mechanism is achieved either by constraining or by randomizing the set of local neighbor solutions to consider in local search (as is the case of simulated annealing or tabu search ), or by combining elements taken by different solutions (as is the case of evolution strategies and genetic or bionomic algorithms). The characteristic of ACO algorithms is their explicit use of elements of previous solutions. In fact, they drive a constructive low-level solution, as GRASP does, but including it in a population framework and randomizing the construction in a Monte Carlo way. A Monte Carlo combination of different solution elements is suggested also by Genetic Algorithms , but in the case of ACO the probability distribution is explicitly defined by previously obtained solution components. The particular way of defining components and associated probabilities is problem specific,
6
and can be designed in different ways, facing a trade-off between the specificity of the information used for the conditioning and the number of solutions which need to be constructed before effectively biasing the probability distribution to favor the emergence of good solutions. Different applications have favored either the use of conditioning at the level of decision variables, thus requiring a huge number of iterations before getting a precise distribution, or the computational efficiency, thus using very coarse conditioning information. The chapter is structured as follows. Section 2 describes the common elements of the heuristics following the ACO paradigm and outlines some of the variants proposed. Section 3 presents the application of ACO algorithms to a number of different combinatorial optimization problems and it ends with a wider overview of the problem attacked by means of ACO up to now. Section 4 outlines the most significant theoretical results so far published about convergence properties of ACO variants.
2. Swarm Intelligence:
2.1Meaning Of Swarn:
A large no. of insects or small organism, specially when in motion. Swarm Intelligence (SI) is the property of a system whereby the collective behaviors of (unsophisticated) agents interacting locally with their environment cause coherent functional global patterns to emerge. SI provides a basis with which it is possible to explore collective (or distributed) problem solving without centralized control or the provision of a global model.Leverage the power of complex adaptive systems to solve difficult nonlinear stochastic problems
Distributed, no central control or data source. Limited communication. No (explicit) model of the environment. Perception of environment (sensing). Ability to react to environment changes. Social interactions (locally shared knowledge) provides the basis for unguided problem solving. Achieving a collective performance which could not normally be achieved by an individual acting alone.
3. Ants in nature
Individual ants are behaviourally very unsophisticated insects. They have a very limited memory and exhibit individual behaviour that appears to have a large random component. Acting as a collective however, ants manage to perform a variety of complicated tasks with great reliability and consistency. These behaviours emerge from the interactions between large numbers of individual ants and their environment. In many cases, the principle of stigmergyis used. Stigmergy is a form of indirect communication through the environment. Like other insects, ants typically produce specific actions in response to specific local environmental stimuli, rather than as part of the execution of some central plan. If an ant's action changes the local environment in a way that affects one of these specific stimuli, this will influence the subsequent actions of ants at that location. The environmental change may take either of two distinct forms. In the first, the physical characteristics may be changed as a result of carrying out some task-related action, such as digging a hole, or adding a ball of mud to a growing structure. The subsequent perception of the changed environment may cause the next ant to enlarge the hole, or deposit its ball of mud on top of the previous ball. In this type of stigmergy, the
cumulative effects of these local task-related changes can guide the growth of a complex structure. This type of influence has been called sematectonic (Wilson, 1975). In the second form, the environment is changed by depositing something which makes no direct contribution to the task, but is used solely to influence subsequent behaviour which is task related. This sign-based stigmergy has been highly developed by ants and other exclusively social insects, which use a variety of highly specific volatile hormones, or pheromones, to provide a sophisticated signaling system.
5. Pheromone
In the natural world, ants (initially) wander randomly, and upon finding food return to their colony while laying down pheromone trails. If other ants find such a path, they are likely not to keep travelling at random, but to instead
follow the trail, returning and reinforcing it if they eventually find food (see Ant communication). Over time, however, the pheromone trail starts to evaporate, thus reducing its attractive strength. The more time it takes for an ant to travel down the path and back again, the more time the pheromones have to evaporate. A short path, by comparison, gets marched over more frequently, and thus the pheromone density becomes higher on shorter paths than longer ones. Pheromone evaporation also has the advantage of avoiding the convergence to a locally optimal solution. If there were no evaporation at all, the paths chosen by the first ants would tend to be excessively attractive to the following ones. In that case, the exploration of the solution space would be constrained. Thus, when one ant finds a good (i.e., short) path from the colony to a food source, other ants are more likely to follow that path, and positive feedback eventually leads all the ants following a single path. The idea of the ant colony algorithm is to mimic this behavior with "simulated ants" walking around the graph representing the problem to solve. The original idea comes from observing the exploitation of food resources among ants, in which ants individually limited cognitive abilities have collectively been able to find the shortest path between a food source and the nest.
10
The first ant finds the food source (F), via any way (a), then returns to the nest (N),leaving behind a trail pheromone .
Ants indiscriminately follow four possible ways, but the strengthening of the runway makes it more attractive as the shortest route. Ants take the shortest route, long portions of other ways lose their trail pheromones. The basic philosophy of the algorithm involves the movement of a colony of ants through the different states of the problem influenced by two local decision policies, viz., trails and attractiveness. Thereby, each such ant incrementally constructs a solution to the problem. When an ant completes a solution, or during the construction phase, the ant evaluates the solution and modifies the trail value on the components used in its solution. This pheromone information will direct the search of the future ants. Furthermore, the algorithm also includes two more mechanisms, viz., trail evaporation and daemon actions. Trail evaporation reduces all trail values over time thereby avoiding any possibilities of getting stuck in local optima. The daemon actions are used to bias the search process from a non-local perspective.
underlying idea, loosely inspired by the behavior of real ants, is that of a parallel search over several constructive computational threads based on local problem data and on a dynamic memory structure containing information on the quality of previously obtained result. The collective behavior emerging from the interaction of the different search threads has proved effective in solving combinatorial optimization (CO) problems. Following , we use the following notation. A combinatorial optimization problem is a problem defined over a set C = c1, ... , cn of basic components. A subset S of components represents a solution of the problem; F 2C is the subset of feasible solutions, thus a solution S is feasible if and only if S F. A cost function z is defined over the solution domain, z : 2C R, the objective being to find a minimum cost feasible solution S*, i.e., to find S*: S* F and z(S*) z(S), "SF. Given this, the functioning of an ACO algorithm can be summarized as follows. A set of computational concurrent and asynchronous agents (a colony of ants) moves through states of the problem corresponding to partial solutions of the problem to solve. They move by applying a stochastic local decision policy based on two parameters, called trails and attractiveness. By moving, each ant incrementally constructs a solution to the problem. When an ant completes a solution, or during the construction phase, the ant evaluates the solution and modifies the trail value on the components used in its solution. This pheromone information will direct the search of the future ants. Furthermore, an ACO algorithm includes two more mechanisms : trail evaporation and, optionally, daemon actions. Trail evaporation decreases all trail values over time, in order to avoid unlimited accumulation of trails over some component. Daemon actions can be used to implement centralized actions which cannot be performed by single ants, such as the invocation of a local
12
optimization procedure, or the update of global information to be used to decide whether to bias the search process from a non-local perspective.
6.1Improvements to algo
Here are some of most popular variations of ACO Algorithms Elitist ant system: The global best solution deposits pheromone on every iteration along with all the other ants. Max-Min ant system (MMAS): Added Maximum and Minimum pheromone amounts [max,min] Only global best or iteration best tour deposited pheromone. All edges are initialized to max and reinitialized to max when nearing stagnation. Ant Colony System:It has been presented above.
Rank-based ant system (ASrank):All solutions are ranked according to their length. The amount of pheromone deposited is then weighted for each solution, such that solutions with shorter paths deposit more pheromone than the solutions with longer paths. Continuous orthogonal ant colony (COAC): The pheromone deposit mechanism of COAC is to enable ants to search for solutions collaboratively and effectively. By using an orthogonal design method, ants in the feasible domain can explore their chosen regions rapidly and efficiently, with enhanced global search capability and accuracy. The orthogonal design method and the adaptive radius adjustment method can also be extended to other optimization algorithms for delivering wider advantages in solving practical problems.
13
In a series of experiments on a colony of ants with a choice between two unequal length paths leading to a source of food, biologists have observed that ants tended to use the shortest route. A model explaining this behavio is as behavior follows: blitz") colony. An ant (called "blitz") runs more or less at random around the colony If it discovers a food source, it returns more or less directly to the nest, leaving in its path a trail of pheromone. . These pheromones are attractive, nearby ants will be inclined to follow, more or less directly, the track.Returning to the colony, these ants will strengthen the Returning route. If there are two routes to reach the same food source then, in a given amount of time, the shorter one will be traveled by more ants than the long route. by The short route will be increasingly enhanced, and therefore become more e attractive.The long route will eventually disappear because pheromones are The volatile. Eventually, all the ants have determined and therefore "chosen" the shortest route.Ants use the environment as a medium of communication. They exchange information indirectly by depositing pheromones, all detailing the
14
status of their "work". The information exchanged has a local scope, only an ant located where the pheromones were left has a notion of them. This system is called "Stigmergy" and occurs in many social animal societies (it has been studied in the case of the construction of pillars in the nests of termites). The mechanism to solve a problem too complex to be addressed by single ants is a good example of a self-organized system. This system is based on positive feedback (the deposit of pheromone attracts other ants that will strengthen it themselves) and negative (dissipation of the route by evaporation prevents the system from thrashing). Theoretically, if the quantity of pheromone remained the same over time on all edges, no route would be chosen. However, because of feedback, a slight variation on an edge will be amplified and thus allow the choice of an edge. The algorithm will move from an unstable state in which no edge is stronger than another, to a stable state where the route is composed of the strongest edges.
8. Applications
Ant colony optimization algorithms have been applied to many combinatorial optimization problems, ranging from quadratic assignment to protein folding or routing vehicles and a lot of derived methods have been adapted to dynamic problems in real variables, stochastic problems, multi-targets and parallel implementations. It has also been used to produce near-optimal solutions to the travelling salesman problem. They have an advantage over simulated annealing and genetic algorithm approaches of similar problems when the graph may change dynamically; the ant colony algorithm can be run continuously and adapt to changes in real time. This is of interest in network routing and urban transportation systems. As a very good example, ant colony optimization algorithms have been used to produce near-optimal solutions to the travelling salesman problem. The first
15
ACO algorithm was called the Ant system and it was aimed to solve the travelling salesman problem, in which the goal is to find the shortest round-trip to link a series of cities.
Single machine total tardiness problem (SMTTP) Single machine total weighted tardiness problem (SMTWTP) Resource-constrained project scheduling problem (RCPSP) Group-shop scheduling problem (GSP) Single-machine total tardiness problem with sequence dependent setup times (SMTTPDST) Multistage Flowshop Scheduling Problem (MFSP) with sequence dependent setup/changeover times
16
8.5 Others
Classification Connection-oriented network routing. Connectionless network routing. Data mining. Discounted cash flows in project scheduling Distributed Information Retrieval.Grid Workflow Scheduling Problem. Image processing. Intelligent testing system. System identification. Protein Folding. Power Electronic Circuit Design.
17
18
emptied at the beginning of each new tour, and is updated after each time step by adding the new visited city).
There are many different ways to translate the above principles into a computational system apt to solve the TSP. In our ant colony system (ACS) an artificial ant k in city r chooses the city s to move to among those which do not belong to its working memory Mk by applying the following probabilistic formula:
19
Local updating is intended to avoid a very strong edge being chosen by all the ants: Everytime an edge is chosen by an ant its amount of pheromone is changed by applying the local trail updating formula: (r,s)(1 ) (r,s) + 0, where 0 is a parameter. Local trail updating is also motivated by trail evaporation in real ants. Interestingly, we can interpret the ant colony as a reinforcement learning system, in which reinforcements modify the strength (i.e., pheromone trail) of connections between cities. In fact, the above formulas (1) and (2) dictate that an ant can either, with probability q0, exploit the experience accumulated by the ant colony in the form of pheromone trail (pheromone trail will tend to grow on those edges which belong to short tours, making them more desirable), or, with probability (1-q0), apply a biased exploration (exploration is biased towards short and high trail edges) of new paths by choosing the city to move to randomly, with a probability distribution that is a function of both the accumulated pheromone trail, the heuristic function, and the working memory Mk. It is interesting to note that ACS employs a novel type of exploration strategy. First, there is the stochastic component S of formula (1): here the exploration of new paths is biased towards short and high trail edges. (Formula (1), which we
20
call pseudo-random-proportional action choice rule, is strongly reminiscent of the pseudo-random action choice rule often used in reinforcement learning; see for example Q-learning (Watkins and Dayan, 1992)). Second, local trail updating tends to encourage exploration since each path taken has its pheromone value reduced by the local updating formula.
=
21
where
1 = f age
Since the new values sum to 1, they can again be interpreted as probabilities. Note that a probability can be reduced only by the operation of normalization following an increase in another cell in the table; since the reduction is achieved by multiplying by a factor less than one, the probability can approach zero if the other cell or cells are increased many times, but will never reach it. For a given value of Dp the absolute and relative increase in probability is much greater for initially small probabilities than for those which are larger. This has the effect of weighting information from ants coming from nodes which are not on the currently referred route, a feature which may assist in the rapid solution of the shortcut problem.
22
It temporarily reduces the flow rate of ants from the congested node to its neighbours, thereby preventing those ants from affecting the pheromone tables which are routing ants to the congested node, and allowing the probabilities for alternative choices to increase rapidly. Since the ants are older than they otherwise would have been when they finally reach the neighbouring nodes, they have less effect on the pheromone tables.
23
Relationship between calls, node utilisation, pheromone tables and ants. An arrow indicates the direction of influence.
11. Conclusions
Ant Colony Optimization has been and continues to be a fruitful paradigm for designing effective combinatorial optimization solution algorithms. After more tha ten years of studies, both its application effectiveness and its theoretical groundings have been demonstrated, making ACO one of the most successful paradigm in the metaheuristic area. This overview tries to propose the reader both introductory elements and pointers to recent results, obtained in the different directions pursued by current research on ACO. No doubt new results will both improve those outlined here and widen the area of applicability of the ACO paradigm.
12. References
[1] B. Barn, M Almirn, E. Chaparro. Ant Distributed System for Solving the Traveling Salesman Problem. pp. 779-789. Vol. 215 th Informatic Latinoamerican Conference-CLEI,. Paraguay (1999). [2] S. Bak, J. Cobb, E. Leiss. Load Balancing Routing via Randomization. pp. 999-1010. Vol. 215 th Informatic Latino american Conference-CLEI. Paraguay (1999). [3] M. Dorigo, V. Maniezzo, A. Colorni. The Ant System: Optimization by a colony of cooperating agents. pp. 1-13. Vol. 26-Part B. IEEE Transactions
24
on Systems, Man, and Cybernetics,. Number 1 (1996). [4] M. Dorigo, G. Di Caro. AntNet. Distributed Stigmergetic Control for Communications Networks. pp. 317-365 Journal of Artificial Intelligence Research. Number 9 (1998). [5] [Schoonderwoerd et al 97] R. Schoonderwoerd, O. Holland, J. Bruten. Ant-like agents for load balancing in telecommunications networks. Hewlett-Packard Laboratories, Bristol-England (1997).
25