Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

SET 1

Q1. What is the basic principle of the Artificial Bee Colony Algorithm?
Answer-: The artificial bee colony works on the principle of a normal bee colony. There is a
population of food positions and the artificial bees modify these food positions over time. The
algorithm makes use of a set of computational agents known as honeybees to find the optimal
solution. The honey bees in Artificial Bee Colony may be labeled into 3 groups: employed bees,
onlooker bees, and scout bees.
At first scout bees look for random food sources . After this employed bees try and exploit
these food sources for nectar and then return to the onlooker bees to convey the amount and
quality of nectar specific feed source has. The onlooker bees collect all these information and
choose the best food Source . These steps continues till the best source is found. Each solution in
the search space consists of a set of optimization parameters which represent a food source
position. The number of employed bees is equal to the number of food sources. The quality of a
food source is called its “fitness value” and it is associated with its position.
In the algorithm, the employed bees could be responsible for investigating their food sources
(the usage of fitness values) and sharing the information to recruit the onlooker bees. The
number of the employed bees or the onlooker bees is same to the number of solutions in the
population (SN). Each solution (food source) x(i=1,2,…,SN) is a D-dimensional vector. The
onlooker bees will make a decision to choose a food source primarily based totally in this
information. A food source with a higher quality may have a larger probability of being selected
with the aid of using onlooker bees. This process of a bee swarm seeking, advertising, and
ultimately deciding on the great regarded food source is the process used to find the optimal
solution.
Q2.What do you optimize in an Artificial Bee Colony Algorithm?
Answer-: In Artificial Bee Colony Algorithm we basically optimize the search for a better food
source i.e. food source with abundant and good quality nectar. After exploiting a food source in
the first iteration, the Scout bees look for new food sources near the previous one in hope of
getting a better food source. With each iteration the bees are able to reach better sources keeping
their past experiences in mind.
There are two essential factors that determine the development of an ABC population are
variation and selection. The variation process. explores diverse sections of the search space. The
selecting procedure guarantees that the past experiences are utilised.
The ABC algorithm is divided into 4 phases: the initialization phase, the employed bees phase,
the scout and the onlooker bees phase.
In the initialisation of the population, ABC generates a uniformly distributed population of
solutions where each solution is a dimensional vector. The number of dimensions depends on the
number of variables in the optimization problem for a particular food source in the population.
The employed bees change and modify the current solution based on the information from the
individual experiences and the fitness value of the new solution. If the fitness value of the new
food source is higher than that of the old food source, the bee updates the position with the new
one and discards the old one. The position is updated using the dimensional vectors defined
earlier in the initial phase with the size of steps needed to get the updated positions.
With the spectator bees in the hive, the employed bees communicate the fitness information
(nectar) of the updated solutions (food sources) as well as their location information. Onlooker
bees evaluate the given data and choose a solution based on its fitness likelihood. As with the
employed bee, the observer bee modifies its memory location and assesses the suitability of the
prospective source. The bee memorises the new location and forgets the old one if the fitness is
higher than the previous one.
Q3.Where can you apply Artificial Bee Colony Algorithm?
Answer-: The Artificial Bee Colony Algorithm is immune to increasing problem complexity and
initial parameter values. Artificial Bee Colony Algorithm has an early convergence error that
results in the loss of Artificial Bee Colony's exploration and development capabilities. We now
understand how the artificial bee colony algorithm works, how it resembles a bee colony, and
how to use it in an optimization problem. The Artificial Bee Colony Algorithm is divided into
four phases: initialization phase, employed bees phase, scout phase and onlooker bees phase.
When initializing the population, Artificial Bee Colony produces a uniformly distributed
population of solutions. where each solution is a dimensional vector. The number of dimensions
depends on the number of variables in the optimization problem for a particular food source
within the population.
The employed bees change their current solution based on information from their individual
experience and the fitness value of the new solution. If the new food source's fitness value is
higher than that of the old food source, the bees will update their position with the new one and
discard the old one. The position is updated using the previously defined dimension vector in the
initial stage at the step size required to obtain the updated position.
Q4. Demonstrate a road map how can you solve the Traveling salesman problem using the
Artificial Bee Colony Algorithm?
Answer-: To solve the Travelling salesman problem the Artificial Bee Colony Algorithm is
used mostly.
STAGE 1: In this, an initial population is chosen by selecting random starting values from the
search space, the sequence vector associated with each individual is calculated, sequence vector
is a member of the set of x, where x is the total number of cities.
STAGE 2: After getting the initial population and associating it with initial sequence vector,
fitness value of each individual is calculated. This problem can be solved by using Artificial Bee
Colony approach where the different bees perform different task.
STAGE 3: These individuals are visited by employed bees and onlooker bees of Bee colony.
Employed and onlooker bee operator are used for local search to avoid local max problem. In
employed and onlooker bee phase new vector is generated. Then the cost of this offspring is
calculated. Using the sequence and its cost from the cost matrix the fitness value of One problem
ran into, though, is that if multiple worker roles begin firing events, every time a solution is
found, the system will likely grind to a halt trying to cope with a gazillion messages (not to
mention a potentially unpleasantly high bill), whereas every single solution is not taken into
consideration. So it is notified about some improvements, not necessarily every single one.
Ability to“throttle” the flow of events coming from the solver, to receive, the best one in every
60 seconds.
TSP can be modeled as an undirected weighted graph, such that cities are the graph's
vertices, paths are the graph's edges, and a path's distance is the edge's length. A TSP tour
becomes a Hamiltonian cycle if and only if every edge has the same distance. Often, the model is
a complete graph (i.e., an edge connects each pair of vertices). If no path exists between two
cities, adding an arbitrarily long edge will complete the graph without affecting the optimal tour.
SET 2
Q1. What is the basic principle involved in genetic algorithm?
Answer-: Genetic Algorithm is a search based optimization technique based on the principles of
natural selection and genetics. In genetic algorithm it is followed that they generate and maintain
a population of individual represented by chromosomes. There individuals are mixed among
themselves to create a new set of advanced individuals. This process is repeated till the best
individual is created.
Initial Population: This process begins with a group of individuals called a Population. Each
individual is a solution to the problem they want to solve. Individuals are characterized by a set
of parameters (variables) called genes. Genes are joined into a string to form chromosomes
(solutions). In a genetic algorithm, an individual's gene set is represented by a string. Binary
values are usually used (strings of 1's and 0's). We say that chromosomes encode genes.
Fitness Function: A fitness function determines an individual’s fitness (the ability to compete
with others). This will give you a fitness score for each individual. An individual's likelihood of
being selected for reproduction is based on its fitness score.
Selection: The idea of the selection stage is to select the most suitable individuals and pass their
genes on to the next generation. Based on the fitness score he will be selected two pairs of
individuals (parents). Individuals with higher fitness are more likely to be selected for
reproduction.
Reproduction : Generation of offspring happen in 2 ways :
I. Crossover: Crossover is the most important phase in genetic algorithms. Crossovers are
randomly chosen within the gene of each pair of mating parents. There are three major
types of crossover : 1.Single point crossover 2.Two point crossover 3.Uniform
crossover
II. Mutation: Certain newly formed offspring have a low probability of mutating part of the
gene. This means that some bits in a bitstring can be flipped.
Q2. How the Darwin theory of evolution is incorporated in genetic algorithm?
Answer-: In genetic algorithm, we have a population of total solution to the given problem.
These solution then undergoes recombination and mutation, producing new children and the
process is repeated over various generation. Each individual is assigned a fitness value and the
fitter the individual are given a higher chance to crossover and yield more “fitter” individual.
This is inline with the Darwinian Theory of "Survival of fittest" or theory of evolution.

Genetic Algorithm (GA) is developed in 1975 by Prof. John Holland was inspired by
Darwin’s theory of evolutions which states that the survival of an organism is affected by rule
“the strongest species that survives”. Darwin also stated that the survival of an organism can be
maintained through the process of reproduction, crossover and mutation. A chromosome is
composed from genes and its value can be either numerical, binary, symbols or characters
depending on the problem want to be solved. A chromosome is composed from genes and its
value can be either numerical, binary, symbols or characters depending on the problem want to
be solved. The number of chromosomes which will undergo crossover and mutation is controlled
by crossover rate and mutation rate value. The chromosome which has higher fitness value will
have greater probability of being selected again in the next generation. After several generations,
the chromosome value will converges to a certain value which is the best solution for the
problem.

Genetic Algorithm is a heuristic search method used in artificial intelligence and computing.
It is used for finding optimized solutions to search problems based on the theory of natural
selection and evolutionary biology. Genetic algorithms are excellent for searching through large
and complex data sets. They are considered capable of finding reasonable solutions to complex
issues as they are highly capable of solving unconstrained and constrained optimization issues.

The populations of individuals (beetle) are maintained within search space. Each individual
represent a solution in search space for given problem. Each individual is coded as a finite length
vector of components. These variable components are analogous to Genes. Thus a chromosome is
composed of several genes (variable components). A Fitness Score is given to each individual who
shows the ability of an individual to “compete”. The individual having optimal fitness score (or
near optimal) are sought. The Genetic Algorithms maintains the population of n individuals along
with their fitness scores. The individuals having better fitness scores are given more chance to
reproduce than others. The individuals with better fitness scores are selected who mate and produce
better offspring by combining chromosomes of parents.

According to Darwin’s evolution theory the best ones should survive and create new
offspring. The population size is static so the room has to be created for new arrivals. So, some
individuals die and get replaced by new arrivals eventually creating new generation when all the
mating opportunity of the old population is exhausted. It is hoped that over successive generations
better solutions will arrive while least fit die. Each new generation has on average more “better
genes” than the individual (solution) of previous generations. Thus each new generation have
better “partial solutions” than previous generations. Once the offsprings produced having no
significant difference than offspring produced by previous populations, the population is
converged. The algorithm is said to be converged to a set of solutions for the problem. The key
points are as follows: From an initial population of solutions, they are ranked according to their
fitness, the worst ones are eliminated and the best ones are used to produce new solutions. In this
manner, the new solutions are used and produced.

Below figure shows the general process of Genetic Algorithm. The algorithm is started
with a set of solutions (represented by chromosomes) called population. Solutions from one
population are taken and used to form a new population. This is motivated by a hope, that the
new population will be better than the old one. Solutions which are selected to form new
solutions (offspring) are selected according to their fitness the more suitable they are the more
chances they have to reproduce.

You might also like