Initialisation ,   , and find and from an initial population.
Main procedure
(1) For to (outer loop)
(2) Generate a binary population according to and assign as the second part of every solution in . The population is
.
(3) Perform function evaluations .
(4) Find the new best solution b from based on the objective function in (1).
(5) Update with using (5).
(6) Set to in cases that it is out of the interval.
(7) For to (inner loop)
  (8) Generate a binary population according to and assign as the first part of every solution in . The population
  is .
  (9) Perform function evaluations
  (10) Find the new worst solution w from based on the objective function in (3).
  (11) Update with using (5).
  (12) Set to in cases that it is out of the interval.
(13) Next
(14) Next
Algorithm 2: Population-based incremental learning for antioptimisation.