Spécifications
The basic idea of CRO is to simulate coral colonies that develop and compete for space on a reef, ultimately forming an optimal structure. Each coral in the reef represents a potential solution to the optimization problem under consideration.
The reef is modeled as a two-dimensional N×M grid. Each grid cell can either be occupied by a coral or left empty. A coral is a coded solution to an optimization problem. For each coral, a fitness (health) function is determined that corresponds to the objective function of the optimization problem.
The ρ₀ ∈ (0,1) parameter determines the initial proportion of the reef occupied by corals, that is, the ratio of occupied cells to the total number of cells at the beginning of the algorithm. Initialization of the reef is performed as follows:
- The reef size of N×M and the initial filling fraction ρ₀ are specified.
- ⌊ρ₀ × N × M⌋ reef cells are randomly selected to house the starting corals.
- Initial corals are generated randomly within the search area and placed in the selected cells.
After the reef is initialized, an iterative process of reef formation and development begins, consisting of several stages:
Broadcast Spawning. For this type of reproduction, a certain proportion of Fₑ existing corals is selected. The selected corals form pairs and create offspring using crossover operators. Each pair produces a larva using the crossover operator (ordinary averaging).
Brooding. The remaining fraction of corals (1-Fₑ) engage in brooding where each coral produces offspring through mutation. For each coral selected for brooding, a larva is created using a mutation operator. The larva typically represents a small random variation of the encoded solution. Larval settlement. After the larvae are formed, each one tries to take its place in the reef during the reproductive stages. The settlement is carried out according to the following rules:
- The larva randomly chooses a cell (i, j) in the reef.
- If the cell is free, the larva occupies it.
- If the cell is occupied, the larva can displace the existing coral only if its fitness is higher: f(larva) > f(Ξᵢⱼ).
- If displacement does not occur, the larva may try to settle in another place (up to a maximum k number of attempts).
- If after k attempts the larva fails to find a place, it dies.
Asexual reproduction (budding). The best corals in a reef (Fₐ fraction) can reproduce asexually, creating exact copies of themselves (clones). Formally:
- Corals are sorted by the fitness function.
- The best Fₐ × 100% corals are selected for asexual reproduction.
- Each selected coral creates a clone that attempts to settle in the reef according to the same rules as during the larval settlement.
Depredation. At the end of each iteration, the worst corals in the reef may die with Pd probability, making room for new corals in the next iterations.
The reef formation is repeated until the specified stopping criterion is met, such as reaching the maximum number of iterations. After stopping, the best coral in the reef represents the found solution to the optimization problem.