Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 16

Ant Colony Optimization (ACO)

Dr. Eng. Syafaruddin, S.T, M.Eng


syafaruddin@unhas.ac.id

• PSO modeled on the choreography of


relatively small swarms where all individuals
have the same behavior and characteristics.
• ACO considers swarms that consist of large
numbers of individuals, where individuals
typically have different morphological
structures and tasks – but all contributing to a
common goal.
• Ant colony optimization (ACO): merupakan
kelompok algoritma untuk tujuan optimisasi yang
diinspirasikan melalui pheromone-based strategies of
ant foraging.
• Asal-muasal ACO algorithms yaitu untuk menentukan
route tersingkat yang selalu perlu dicari dalam
traveling salesman problems.
• Dalam ACO ini, dianggap beberapa semut berjalan
melintasi jalur yang menghubungkan antar nodes
dengan meneteskan semacam virtual pheromones.
Facts about the living organism
• It is roughly estimated that the earth is populated by 108 living organisms,
of which only 2% are social insects [Dorigo 1999]. That is, only 2% of all
insects live in swarms where social interaction is the most important
aspect to ensure survival.
• These insects include all ant and termite species, and some bees and
wasps species.
• Of these social insects, 50% are ants. Ant colonies consist of from 30 to
millions of individuals.

How modeling the behavior of


ants can be used to solve real-world problems
The "Invisible Manager" (Stigmergy)
Operation within an ant colony involves several different tasks, performed by
different ant groups.
reproduction - the task of the queen
defense - done by soldier ants
food collection - the task of specialized worker ants
brood care - the task of specialized worker ants
nest brooming (including cemetery maintenance) - the task of
specialized worker ants
nest building and maintenance - the task of specialized
worker ants.

Distribution and execution of tasks are


based on anatomical differences and
Command center stigmergy.
(magic)!? E.g: Anatomical differences, such as size
and larger jaw structures, distinguish
between army ants and food collectors.
Characteristics of Natural Stigmergy

• The lack of central coordination.


• Communication and coordination among individuals in a
colony are based on local modifications of the environment.
• Positive feedback, which is a reinforcement of actions (e.g.
the trail-following behavior to collect food).

Algorithmic modeling of ant colonies is based on


the concept of artificial stigmergy,:
“to find a mathematical model which accurately describes the stigmergetic
characteristics of the corresponding ant individuals”

Task: Food Collection


Perilaku semut di alam:
• Ants have the ability to always find the
The Pheromone
shortest path between their nest and
the food source.
• Initially, paths are chosen randomly. It
was then observed that, with time,
more and more ants follow the shorter
path. In nature, however, if more ants choose a longer path
during the initial search.

• This behavior  the dropping of


pheromones by each ant.
• During their search for food, and on
return from the food source to the
nest, each ant drops a pheromone
deposit on the path. To select a path to
follow, ants follow that path with the •The pheromone deposits evaporate
largest pheromone concentration. with time  The strength of the
• The shortest path will have stronger pheromone deposits on the longer
pheromone deposits, since ants return path will decrease more quickly than
on that path from the food source for the shorter path.
quicker
Terjemahan:
• Semut-semut yang berjalan dalam jalur terpendek semakin
dapat menemukan jalan kembali ke sarangnya dan
mengdeposit lebih banyak pheromones dalam jangka waktu
tertentu.
• Konsekuensinya, jalur tadi akan semakin menarik banyak
semut dalam konteks positive feedback loop, meskipun
sebenarnya di alam, lebih banyak semut memilih jalur yang
lebih panjang dalam proses awal pencarian.
• Untuk mengatasi persoalan ini, ACO mengasumsikan bahwa
virtual pheromones mengalami evaporasi sehingga
mengakibatkan penurunan probabilitas terpilihnya jalur yang
panjang tadi
ACO Algorithm
• Mula-mula, semut secara random terdistribusi pada nodes dalam sebuah graph.
• Setiap artificial ant kemudian memilih route dari lokasi awal berdasarkan aturan
probabilistik dengan mempertimbangkan panjang rute dan jumlah pheromone di
rute tersebut.
• Jalur-jalur yang terhubung ke nodes dan telah pernah dikunjungi sebelumnya tidak
akan dimasukkan lagi dalam pemilihan jalur yang probabilitik tadi.
• Setelah semua semut menjalani semua tournya, semut ini akan kembali mencari
jejaknya sembari menaruh pheromone dengan jumlah yang berbanding terbalik
dengan panjang route
• Sebelum kembali melakukan pencarian ulang dari lokasi yang random, pheromone
pada semua jalur mengalami evaporasi dengan kuantitas yang kecil
• Proses evaporasi ini dikombinasikan dengan pemilihan probabilistik rute,
memastikan semut akan berkumpul (konvergen) pada jalur terpendek, meskipun
beberapa diantaranya masih tetap memilih pada jalur yang lebih panjang
ACO Algorithm
A virtual ant arriving from node A considers which
edge to choose next on the basis of pheromone
levels tij and visibilities hij (inverse of distance
1/lij). The edge to node A is not considered
because that node has already been visited.

Algoritma secara formal:


The number of ants M is usually equal to the
number of nodes N in the graph. A small
amount of virtual pheromones is deposited on
all edges at the beginning of the search. The
probability that ant k chooses the edge from
node i to node j 
ACO Algorithm
…cont

• The constants a, b weight the importance of the two factors.


• If a = 0, ants choose solely on the basis of the shortest distance;
conversely,
• if b = 0, ants choose solely on the basis of the pheromone
amount.
• The divider in the fraction sums up the pheromone and visibility
values for all edges H that are available at the node where the
ant sits as long as they belong to the set Jk of nodes that the ant
k has not yet visited.
• As soon as the ant visits a node, this is deleted from the list Jk.
ACO Algorithm
…cont
Once all ants have completed a tour of the graph, each
ant k retraces its own path and deposits an amount of
pheromone on traveled edges according to eq.

where Lk is the total length of the path found by ant k and Q is a constant, which is set to
be the length of the shortest path estimated with a simple heuristic method.

The amount of pheromones on each edge after all M ants


have retraced their own path is equal to
Before starting all ants again in a new search for the
shortest path, pheromone levels evaporate according to

where 0 ≤ ρ < 1 is the coefficient of pheromone evaporation

This concludes one iteration of the algorithm. The process is repeated for
several hundred iterations until a satisfactorily short path has been found
Several important parameters in
ACO Algorithm
• The most important of these parameters include the forgetting factor to
model pheromone evaporation and the number of ants used.
• Too many ants increase computational complexity, and result in fast
convergence to suboptimal trails. On the other hand, too few ants limit
the synergetic effects of cooperation.
• A good balance between parameters a and b should be achieved:
if b = 0, only pheromone information is used, which may lead to suboptimal
paths;
if a = 0, no pheromone information is used, and the approach corresponds to
a stochastic greedy search.
Successful applications:
Conclusion
• While the standard ACO works only for
discrete optimization problems, ACO can be
applied to continuous problems by discretizing
the search space into discrete regions 
Enlarging the application of ACO

You might also like