Skip to main content

Module abc

Module abc 

Source
Expand description

Artificial Bee Colony.

Canonical ABC fused into a single Strategy::ask / tell round per generation. Each generation produces 2 · pop_size candidate solutions:

  1. Employed phase (pop_size candidates). For every bee i, pick a neighbour k ≠ i, pick a random dimension j, and perturb: v_ij = x_ij + φ·(x_ij − x_kj) with φ ∈ U[−1, 1].
  2. Onlooker phase (pop_size candidates). Draw a target t via tournament selection (fitness-biased), then perturb exactly as in the employed phase.

tell scores the 2N candidates, greedy-accepts the best improvement per target bee, and increments the target’s trial counter when no candidate improved it. Scout bees — those with trial > limit — are replaced by fresh uniform samples on device.

§First-generation protocol

ask detects the first call by checking whether fitness is empty and, if so, returns the current colony unchanged (no perturbation). tell detects the same condition and uses the received fitness to seed AbcState::fitness and best_genome before returning. Any caller that bypasses EvolutionaryHarness must therefore call ask → evaluate → tell twice before the employed/onlooker phases are active.

§References

  • Karaboga (2005), An idea based on honey bee swarm for numerical optimization (Erciyes Univ. Tech. Report TR06).

Structs§

AbcConfig
Static configuration for ArtificialBeeColony.
AbcState
Generation state for ArtificialBeeColony.
ArtificialBeeColony
Artificial Bee Colony strategy.