Bees algorithm

Uses your system voice; voice and rate in settings.

Snapshot

≈ 6 min read

Names in other languages

No names in other languages are held for this entry yet.

Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.

In computer science and operations research, the bees algorithm is a population-based search algorithm which was developed by Pham, Ghanbarzadeh et al. in 2005. It mimics the food foraging behaviour of honey bee colonies. In its basic version the algorithm performs a kind of neighbourhood search combined with global search, and can be used for both combinatorial optimization and continuous optimization. The only condition for the application of the bees algorithm is that some measure of distance between the solutions is defined. The effectiveness and specific abilities of the bees algorithm have been proven in a number of studies.

In computer science and operations research, the bees algorithm is a population-based search algorithm which was developed by Pham, Ghanbarzadeh et al. in 2005. It mimics the food foraging behaviour of honey bee colonies. In its basic version the algorithm performs a kind of neighbourhood search combined with global search, and can be used for both combinatorial optimization and continuous optimization. The only condition for the application of the bees algorithm is that some measure of distance between the solutions is defined. The effectiveness and specific abilities of the bees algorithm have been proven in a number of studies. 1 for i = 1, ..., ns i scout[i] = Initialise_scout() ii flower_patch[i] = Initialise_flower_patch(scout[i]) 2 do until stopping_condition = TRUE i Recruitment() ii for i = 1, ..., na 1 flower_patch[i] = Local_search(flower_patch[i]) 2 flower_patch[i] = Site_abandonment(flower_patch[i]) 3 flower_patch[i] = Neighbourhood_shrinking(flower_patch[i]) iii for i = nb, ..., ns 1 flower_patch[i] = Global_search(flower_patch[i])} In the initialisation routine ns scout bees are randomly placed in the search space, and evaluate the fitness of the solutions where they land. For each solution, a neighbourhood (called flower patch) is delimited. In the recruitment procedure, the scouts that visited the nb≤ns fittest solutions (best sites) perform the waggle dance. That is, they recruit foragers to search further the neighbourhoods of the most promising solutions. The scouts that located the very best ne≤nb solutions (elite sites) recruit nre foragers each, whilst the remaining nb-ne scouts recruit nrb≤nre foragers each. Thus, the number of foragers recruited depends on the profitability of the food source. In the local search procedure, the recruited foragers are randomly scattered within the flower patches enclosing the solutions visited by the scouts (local exploitation). If any of the foragers in a flower patch lands on a solution of higher fitness than the solution visited by the scout, that forager becomes the new scout. If no forager finds a solution of higher fitness, the size of the flower patch is shrunk (neighbourhood shrinking procedure). Usually, flower patches are initially defined over a large area, and their size is gradually shrunk by the neighbourhood shrinking procedure. As a result, the scope of the local exploration is progressively focused on the area immediately close to the local fitness best. If no improvement in fitness is recorded in a given flower patch for a pre-set number of search cycles, the local maximum of fitness is considered found, the patch is abandoned (site abandonment), and a new scout is randomly generated. As in biological bee colonies, a small number of scouts keeps exploring the solution space looking for new regions of high fitness (global search). The global search procedure re-initialises the last ns-nb flower patches with randomly generated solutions. At the end of one search cycle, the scout population is again composed of ns scouts: nr scouts produced by the local search procedure (some of which may have been re-initialised by the site abandonment procedure), and ns-nb scouts generated by the global search procedure. The total artificial bee colony size is n=ne•nre+(nb-ne)•nrb+ns (elite sites foragers + remaining best sites foragers + scouts) bees. function GBA %% Set the problem parameters maxIteration = ..; % number of iterations (e.g. 1000-5000) maxParameters = ..; % number of input variables min = [..] ; % an array of the size maxParameters to indicate the minimum value of each input parameter max = [..] ; % an array of the size maxParameters to indicate the maximum value of each input parameter %% Set the grouped bees algorithm (GBA) parameters R_ngh = ..; % patch radius of the neighborhood search for bees in the first group (e.g. 0.001 - 1) n = ..; % number of scout bees (e.g. 4-30) nGroups = ..; % number of groups, excluding the random group %% GBA's automatic parameter settings k = 3 * n / ((nGroups+1)^3 - 1); % GBA's parameter to set the number of scout bees in each group groups = zeros(1,nGroups); % An array to keep the number of scout bees for each group recruited_bees = zeros(1,nGroups); % An array to keep the number of recruited bees for each group a = (((max - min) ./ 2) - R_ngh) ./ (nGroups^2 - 1); % GBA's parameter for setting neighborhood radiuses b = R_ngh - a; % GBA's parameter for setting neighborhood radiuses for i=1:nGroups % For each group groups(i) = floor(k*i^2); % determine the number of scout bees in each group if groups(i) == 0 groups(i) = 1; % there has to be at least one scout bee per each group end recruited_bees = (nGroups+1-i)^2; % set the number of recruited bees for each group ngh(i) = a * i*i + b; % set the radius patch for each group end group_random = n - sum(groups); % assign the remainder bees (if any) to random search group_random = max(group_random,0); % make sure it is not a negative number %% initialize the population matrix population = zeros(n,maxParameters+1); % A population of n bees including all input variables and their fitness for i=1:n population(i,1:maxParameters)= generate_random_solution(maxParameters,min, max); % random initialization of maxParameters variables between max and min population(i,maxParameters+1) = evalulate_fitness(population(i,:)); % fitness evaluation of each solution and saving it at the last index of the population matrix end sorted_population = sortrows(population); % sort the population based on their fitnesses %% Iterations of the grouped bees algorithm for i=1:maxIteration % GBA's main loop beeIndex = 0; % keep track of all bees (i.e, patches) for g=1:nGroups % for each group of scout bees for j = 1 : groups(g) % exploit each patch within each group beeIndex = beeIndex + 1; % increase the counter per each patch for i = 1 : recruited_bees(g) % for each recruited bees of the group solution = bee_waggle_dance(sorted_population(beeIndex,1:maxParameters),ngh(g)); % search the neighborhood around selected patch/solution within the radius of ngh fit = evaluate_fitness(solution); % evaluate the fitness of recently found solution if fit ==See also== Ant colony optimization algorithms Artificial bee colony algorithm Evolutionary computation Lévy flight foraging hypothesis Manufacturing Engineering Centre Mathematical optimization Metaheuristic Particle swarm optimization Swarm intelligence ==References== ==External links== The bees algorithm website Boffins put dancing bees to work – BBC News The bees algorithm workshop

Text derived from https://en.wikipedia.org/w/index.php?oldid=1345258439 under CC BY-SA 4.0; modifications have been made.

Provenance

snapshot enwiki-001345258439 · captured 1774412073.0 · version history

Cite this page as: encyclopegia.org, “Bees algorithm”, snapshot enwiki-001345258439. https://encyclopegia.org/a/bees-algorithm