1 Introduction

The development of new meta-heuristic algorithms for optimization is a hot topic in Artificial Intelligence in the last decades [1, 2]. The No-Free-Lunch (NFL) theorem for optimization [3] establishes that if an algorithm performs well on a certain class of optimization problems, then its performance on the set of all remaining problems will be degraded. In other words, two algorithms are equivalent when their performance is averaged across all possible optimization problems. NFL opens the door to the design and development of a large amount of different meta-heuristics, that provide excellent performance over certain classes of optimization problems, and in fact, the objective is to develop new meta-heuristics that exploit problem-specific knowledge to achieve a good algorithm’s performance.

Modern meta-heuristics can be classified into nature-inspired approaches, i.e. those techniques based on different natural processes, and non-nature meta-heuristics, based on processes different from natural sources. Among the first set, we can find bio-inspired approaches such as Evolutionary Algorithms (EA), which include a whole family of techniques such as Genetic Algorithms [4], Evolutionary Strategies [5], Evolutionary Programming [6], Differential Evolution [7], among others. These schemes are based on concepts borrow from natural evolution and survival of the fittest individuals in Nature. Likewise, Ant Colonies Optimization [8] is based on the social behavior of ants, whereas Artificial Immune System algorithms [9] is focussed on imitating the behavior of the immune system in animals. Particle Swarm Optimization is another bio-inspired approach [10], based on the behaviour birds flocks or fish schools looking for food, and specially well suited for continuous optimization problems. There have been more research activity on bio-inspired meta-heuristics, with approaches such as Artificial Bee Colony [11, 12], which imitates the bees behavior when locating and bring food to the hive, the Invasive Weed Optimization Algorithm, [13], based on weed growth and their invasive properties, the bat algorithm [14], based on the behaviour of bats and its capability for echolocation of objects, the Hunting Search [15], based on how group of animals hunt or the Cuckoo search approach [16], built upon the reproduction and breeding of the cuckoo bird. The tiniest living organisms have also inspired good search procedures, such as the optimization based on virus infection [17], and on colonies of bacteria [18, 19] or the amoeba algorithm [20], that uses the intelligence of groups of amoebas to explore solutions to complicated problems in networks.

Meta-heuristics classified as nature based (not bio-inspired) have been proposed from the very beginning of Artificial Intelligence. For instance, the well-known Simulated Annealing algorithm [21] is a meta-heuristic based on the process of annealing in metallic materials. It consists of heating a substance and then cooling it down slowly, until a final strong molecular structure is obtained. This process can be artificially simulated to solve optimization problems. There are several variants of this algorithm such as Simulated Quenching [22], etc. Recently, some other nature-based techniques have been proposed, such as the Gravitational Search Algorithm [23], inspired by the law of the gravity, the Colliding Bodies optimization algorithm [24], based on the behaviour of bodies colliding at different speeds or the Ray Optimization algorithm [25], based on particles that follow the Snell’s law for ray of light. The Artificial Chemical Reaction Optimization Algorithm [26], is another nature-based approach which simulates the behaviour of different types of chemical reactions (synthesis, decomposition, redox, etc.) to solve optimization problems. The Electromagnetic-like algorithm [27], can also solve optimization problems based on physics of electrically charged particles, repelling and attracting each other in a multi-dimensional space. A very recent nature-inspired algorithm so-called Water Wave Optimization [28] simulates different phenomena of water waves, such as propagation, refraction, and breaking, to effectively solve optimization problems.

Regarding meta-heuristics which are not based on natural processes, they are usually inspired by alternative concepts. For instance, a successful optimization procedure is the Harmony Search (HS) algorithm [29], which have been successfully applied to numerous optimization problems in the last few years. HS is inspired from the improvisation process of musicians, i.e., the process by which the musicians (who may have never played together before) refine, through variation and check, their individually improvised notes, resulting in an aesthetic harmony, played by the entirety of musicians in the orchestra. Another very successful meta-heuristic is the Variable Neighborhood Search [30], based on performing systematic changes of neighborhood during the search space exploration, to escape from local optima. The Teaching–Learning-Based optimization [31], is another non-nature meta-heuristic, based on the process of teaching–learning produced by different teachers in a class of students. There are some alternative meta-heuristics based on social behavior of humans, such as the Society and Civilization algorithm [32], the Imperialist Competitive Algorithm [33], which makes optimization based on imperial-colonies competition or the Biogeography-Based Optimization algorithm [34], based on the geographical distribution of living organisms.

This paper reviews the most important concepts of a new evolutionary-type meta-heuristic for optimization recently proposed: the coral reefs optimization (CRO) algorithm [35, 36]. This algorithm is a class of evolutionary approach which simulates some of the biological processes that occur in a real coral reef. In its basic version, the CRO finally results in an evolutionary algorithm in which similarities with Simulated Annealing have been introduced. In fact, the basic version of the CRO is defined as a modification of evolutionary algorithms in exploitation, i.e., it mainly tries to improve the selection part of the algorithm, whereas the exploration is left as an open decision of the practitioner. In fact, traditional crossover was first used as exploration operator for the CRO, and also alternative search patterns such as HS operators [37]. This algorithm’s structure, however, is the seed of much more powerful approaches when the exploration part of the algorithm is intervened. Thus, the CRO with different modifications in its search procedures can be converted in a strong co-evolution algorithm within one population. Thus, the CRO with coral species is a competitive co-evolution algorithm which can tackled effectively optimization problems with variable codification lengths. In the same way, the CRO with substrate layers leads to a competitive co-evolution approach able to combine very different search patterns within just one population. A discussion on the CRO algorithm novelty is provided to close the algorithmic contribution of this review. In this sense, the advanced versions of the CRO with substrate layers and species lead to strong generalization approaches, completely different to other proposals in the meta-heuristics field, so the novelty of the CRO-based approaches is ensured. This paper reviews with detail these and other characteristics of the CRO algorithm and its variants, including the description of a simple CRO modification to adapt it to multi-objective problems, and finally, a discussion of a good number of applications that have been recently solved with this meta-heuristic.

The rest of this article is structured as follows: next section provides a gentle introduction to coral reefs and corals’ structure and reproduction, as a biological reference for the algorithm’s description. Section 3 presents the basic CRO algorithm in detail. Section 4 presents different modifications in the CRO to come up with stronger versions of the algorithm. Specifically a CRO with species for problems with variable encoding length, a CRO with substrate layers as a co-evolution competitive algorithm and a multi-objective CRO version are the CRO modifications introduced. Section 6 reviews the main applications of the CRO meta-heuristics, in different fields such as renewable energy applications, telecommunications problems, logistics, control, etc. Finally, Sect. 7 ends the paper by giving some concluding remarks and future lines of development for the algorithm.

2 Biological concepts about corals and coral reefs

This section describes some important properties of corals and coral reefs, including corals’ structure and reproduction, as a biological reference for the algorithm’s description.

2.1 Corals and reef formation

Corals are invertebrate animals belonging to the phylum-cnidaria group, which also includes jellyfishes, hydras or sea anemones [38, 39]. These animals are characterized by their ability to subsist either as individuals or in colonies of polyps, and many of them past part or their complete live attached to a substrate. Currently more than 2500 different species of corals have been described, appearing new ones every year, both in shallow and deep waters.

An important subclass of corals are reef-building corals, also known as hermatypic or hard corals. Hard corals are usually shallow-water animals that produce a rigid skeleton of calcium carbonate, segregated from their base. A coral reef is formed by a hundred of hard corals, cemented together by the calcium carbonate they have produced during their lives. Periodically, each polyp in the reef lifts off its basal plate of calcium carbonate and secretes a new one, forming a tiny chamber that will contribute to the coral’s skeleton. Thus, living corals grow on top of the skeletons of calcium carbonate of their dead predecessors. A coral colony is composed of a single specie of coral, but a reef’s structure can comprise multiple types of species. In fact, a coral reef can be described as an ecosystem, in which a diverse collection of animals and plants interact with each other, as well as with their environment. In addition to corals, many other animals and plants live in and from the reef, such as algae, sponges, sea stars, crustaceans, mollusca, etc., and all them take an active part in reef development and conservation [40, 41]. Of course, a huge variety of fishes also live in the reef, which provides shelter and food.

In general, hard coral species require free space to settle down and grow. Although a priori the implementation of this settlement procedure might be easy for a potential new member of the reef, in practice free space is an extremely limited resource in the reef environment [42]. As a result, coral species often compete with each other or exhibit aggressive behavior to secure or maintain a given space in the reef substrate [43]. Different strategies used by corals to compete for the space have been described in the literature [43, 44], and include fast-growing (for covering other corals and kill them by lack of light), sweeper tentacles (i.e., detect and damage adjacent coral colonies), mesenterial filaments (namely, enabling external digestion of neighboring colonies), terpenoid compounds (coral chemical warfare), etc.

2.2 Coral reproduction

Corals can reproduce in two completely different modes: sexual or asexual. In fact, an individual polyp may use both modes within its life time [38]. Furthermore, sexual reproduction can be either external or internal, depending on the coral species. The majority of species in large coral reefs use sexual external reproduction, but internal reproduction is also specific of some species in the reef.

2.2.1 Broadcast spawning

The majority of hard corals species use a sexual external reproduction method known as broadcast spawning [45]: it consists in that every coral produces male and/or female gametes that are massively released out to the water. Once the eggs and sperm meet together, larvae (also called planulae) are produced. Planulae float in the water until they find a proper substrate in the reef to attach and start growing a polyp [46]. In the majority of reefs, the phenomenon of coral spawning occurs as a synchronized event. This timing is crucial for successful reproduction, since corals cannot move to force reproductive encounters. There are different natural aspects that affect the timing of the corals’ spawning, such as temperature, day length or temperature change rate.

2.2.2 Brooding

Brooding (internal sexual reproduction) is a method of internal reproduction used by some species of corals. In this reproduction mode, some female polyps contain eggs that are not released to the water, but fertilized by sperm released by other male corals of the same species. The planulae formed are then released later to the water in an advanced stage of development, so it should be easier for these planulae to set onto hard substrate without being attacked or depredated. There has also been described a type of brooding reproduction in hermaphrodite corals [47].

2.2.3 Asexual reproduction

Finally, asexual reproduction is described. Basically, new polyps can bud off from parent polyps to expand or begin new coral colonies [48], in a process known as budding. Budding occurs when the coral has grown enough to produce this reproduction. An alternative asexual reproduction of corals is fragmentation, which is a process similar to budding, but it is caused by external phenomena (e.g., storms or boats’ grounding), and usually a larger part of the coral is divided in comparison to budding [49]. Individuals broken off the reef as fragments should be able to keep growing and finally establishing a new colony far way from the parent one if conditions are favorable. It is important to note that both budding and fragmentation processes produce polyps that are genetically identical to the parent polyp or colony.

2.3 Reef longevity and causes of death

It is well known that hard coral colonies can live for several centuries, though currently they are one of the most threatened species in the world. In fact, corals and coral reefs must face different important hazards during their life. In larva state, corals are massively depredated by fishes and other predators. Of course, the huge number of larvae produced in broadcast spawning reproduction ensures that enough polyps will settle in favorable ground and start forming a colony. On the other hand, coral polyps encounter many types of predators including sea stars, parrot-fishes or butterfly-fishes. Nowadays human activities (e.g., over-fishing and industrial processes that increase ocean pollution) and climate change (which produce the increase of the oceans’ temperature, among other effects) are the main factors contributing to the current massive loss of living corals [50, 51].

3 The basic coral reefs optimization algorithm

Having these basis on the corals’ reproduction and reefs formation in mind, the CRO algorithm tackles optimization problems by modeling and simulating all the distinct processes explained in the above Sect. 2. Let \(\mathcal {R}\) be a model of reef, consisting of a \(N \times M\) square grid. We assume that each square (ij) of \(\mathcal {R}\) is able to allocate a coral (or colony of corals) \({\varXi }_{i,j}\), representing different solutions to our problem, using a given encoding for the problem at hand. The CRO algorithm is first initialized at random by assigning some squares in \(\mathcal {R}\) to be occupied by corals (i.e., solutions to the problem) and some other squares in the grid to be empty, i.e., holes in the reef where new corals can freely settle and grow. The rate between free/occupied squares in \(\mathcal {R}\) at the beginning of the algorithm is a parameter of the CRO algorithm denoted as \(\rho \), and note that \(0<\rho _0<1\).

After the reef initialization described above, a second phase of reproduction and reef formation is carried out. First, a simulation of the corals’ reproduction in the reef is done by sequentially applying different operators. Different operators for modeling sexual reproduction (broadcast spawning and brooding), asexual reproduction (budding), and polyps depredation are defined:

  1. 1.

    Broadcast spawning (external sexual reproduction): the modeling of coral reproduction by broadcast spawning consists of the following steps:

    1. 1(a)

      In a given step k of the CRO algorithm, select uniformly at random a fraction of the existing corals \(\rho _k\) in the reef to be broadcast spawners. The fraction of broadcast spawners with respect to the overall amount of existing corals in the reef will be denoted as \(F_b\). Corals that are not selected to be broadcast spawners (i.e. \(1-F_b\)) will reproduce by brooding later on in the algorithm.

    2. 1(b)

      Select couples out of the pool of broadcast spawner corals in step k. Each of such couples will form a coral larva by means of a given crossover mechanism or any other exploration strategy. Note that once two corals have been selected to be the parents of a larva, they are not chosen anymore in step k (i.e., two corals are parents only once in a given step). These couple selection can be done uniformly at random or by resorting to any fitness proportionate selection approach (e.g., roulette wheel).

  2. 2.

    Brooding (internal sexual reproduction): at each step k of the reef formation phase in the CRO algorithm, the fraction of corals that will reproduce by brooding is \(1-F_b\). The brooding modeling consists of the formation of a coral larva by means of any kind of mutation mechanism, to simulate of the brooding-reproductive coral (self-fertilization considering hermaphrodite corals).

  3. 3.

    Larvae setting: once all the larvae are formed at step k either through broadcast spawning (1) or by brooding (2), they will try to set and grow in the reef. First, the health function (fitness) of each coral larva is computed. Second, each larva will randomly try to set in a square (ij) of the reef. If the square is empty (free space in the reef), the coral grows therein no matter the value of its health function. By contrast, if a coral is already occupying the square at hand, the new larva will set only if its health function is better than that of the existing coral. We define a number \(\kappa \) of attempts for a larva to set in the reef: after \(\kappa \) unsuccessful tries, it is considered as depredated by the animals in the reef.

  4. 4.

    Asexual reproduction: the modeling of asexual reproduction (budding or fragmentation) is the CRO is carried out in the following way: the overall set of existing corals in the reef are sorted as a function of their level of health value (given by \(f({\varXi }_{ij})\)). Then a small a fraction \(F_a\) duplicate themselves and are mutated to obtain variability. These new corals try to settle in a different part of the reef by following the setting process described in Step 3.

  5. 5.

    Depredation in polyp phase: corals may die during the reef formation phase of the CRO algorithm. At the end of each reproduction step k, a small number of corals in the reef can be depredated, thus liberating space in the reef for next coral generation. The depredation operator is applied with a very small probability \(P_d\) at each step k, and exclusively to a fraction \(F_d\) of the worse health corals in \(\mathcal {R}\).

Figure 1 illustrates the flowchart diagram of the CRO algorithm, with the different CRO phases (reef initialization and reef formation), along with all the operators described above.

Fig. 1
figure 1

Flowchart diagram of the original CRO algorithm

4 Advanced CRO models

The basic CRO can be improved to obtain stronger versions of the meta-heuristic, based on alternative processes that occur in coral reefs. We describe here three different modifications of the CRO algorithm, which improves the performance of this approach in specific applications. First, we describe the CRO with species, which helps tackle optimization problems with variable length encodings. It is also useful for managing different encodings of problems within the same population, obtaining a competitive co-evolution algorithm. The second CRO version we present here is the CRO with substrates layer. It has been useful to obtain a competitive co-evolution algorithm in which different models are applied to the same problems. These model can be either exploration models, repairing mechanisms, etc., and the only pre-requisite is that the objective function to evaluate corals in the reef must be the same for the different models considered. Finally, we show how the CRO can be easily modified to obtain a multi-objective version of the algorithm.

4.1 CRO with species for encodings of variable length

The first modification of the CRO consists in considering different coral species within a single coral community. The objective of this modification is that each coral species represents a different model (or its hyper-parameters) out of T possible models. In this context, model is generic, so it can represent either a different encoding for the problem, a different way of calculate the objective function, etc. Specifically, the CRO with species is a new powerful way of managing optimization problems with variable encodings. In this case, each species will represent a different encoding length, and the idea is that only corals of the same species can reproduce in the broadcast spawning operator. Note however, that all the models compete together in the larvae setting, since the objective function in all cases should be the same for all the species.

The CRO with species was first introduced in [52] as a methodology to deal with a Model Selection Problem, in an application of total energy consumption prediction in Spain. In [52] each species represents a different way of calculating the total energy consumption (a different model), and the idea was to obtain a competitive co-evolution approach that obtained the best possible model in addition to alternative parameters such as the best prediction variables to feed the prediction model. Note that the CRO with species can be used to evolve a competition of different regressions for a given problem, for example neural networks, support vector machines, etc., in which the CRO encodes the parameters of each regressor. Since the concept of species is open, it can be used to compare different encodings for a given problem (binary, integer, real, structures, etc.), in which each species corresponds to a given encoding.

Algorithm 1 shows an outline of the CRO containing multiple species. Note that the competition among species will produce emerging behavior, so the best model (species) eventually will dominate, and will occupy the majority of spaces in the reef.

figure a

4.2 CRO with substrate layers

The second important modification of the CRO is the CRO with substrate layers (CRO-SL). It is based on the fact that there are many more interactions in real reef ecosystems which can be also modeled and incorporated to the CRO approach to improve it. For example, different studies have shown that successful recruitment in coral reefs (i.e., successful settlement and subsequent survival of larvae) depends on the type of substrate on which they fall after the reproduction process [53]. This specific characteristic of the coral reefs was first included in the CRO in [52], to solve different instances of the Model Type Selection Problem for energy applications. In [52], different substrate layers were defined in the CRO, in such a way that each layer represents a different model to evaluate the energy demand estimation in Spain, from macro-economic variables.

As in the case of the CRO with species, the CRO with substrates layer is, a much more general approach: it can be defined as an algorithm for competitive co-evolution, where each substrate layer represents different processes (different models, operators, parameters, constraints, repairing functions, etc.). The inclusion of substrate layers in the CRO can be done in a straightforward manner: we redefine the artificial reef considered in the CRO in such a way that each cell of the reef \(\mathcal {R}\) is now defined by 3 indexes (ijt), where i and j stand for the cell location in the grid, and index \(t \in T\) defines the substrate layer, by indicating which structure (model, operator, parameter, etc.) is associated with the cell (ij). Each coral in the reef is then processed in a different way depending on the specific substrate layer in which it falls after the reproduction process. Note that this modification of the basic algorithm does not imply any change in the corals’ encoding (all the corals in the algorithm are encoded in the same way).

The CRO-SL has been applied in [54] to obtain a competitive co-evolution algorithm in which each substrate is assigned to a different implementation of an exploration procedure. Thus, each coral will be processed in a different way in the reproduction step of the algorithm depending on the substrate it occupies. Figure 2 shows an example of the CRO-SL, with different substrate layers. Each one is assigned to a different exploration process, Harmony Search based, Differential Evolution, 1-point crossover or Gaussian mutation (alternative assignment and different exploration processes can be used in the substrate layer of the CRO-SL approach).

Fig. 2
figure 2

Example of CRO-SL and comparison with the original reef in the CRO; a reef considered in the original CRO, b reef in the CRO-SL, where four substrate layers associated with the broadcast spawning process. Each substrate layer represents now a different exploration process to carry out in that substrate

The CRO-SL is a general procedure to co-evolve different models, operators, parameter values, etc., with the only requisite that there is only one health function defined in the algorithm. In other words, each substrate can include a different processing of problem’s constraints, exploration or exploitation procedures etc.

4.3 Multi-objective CRO

The last modification of the CRO presented in this paper is an adaptation to multi-objective problems, firstly introduced in [55, 56]. In fact, it is a very easy task starting from the basic CRO approach, and only the larvae setting process of the algorithm must be modified: once all the larvae from broadcast spawning and brooding have been produced, they start the setting process one by one, trying to establish themselves into the reef. When an existing coral occupies a given position in the reef that is tried by a larva, a fight for the space occurs. In the multi-objective version of the CRO (MO-CRO), this fight for the space is based on domination of solutions. Let us call \({\varXi }_A\) to the coral currently occupying a given location on the reef, and \({\varXi }_B\) the larva challenging for the space. In the MO-CRO, \({\varXi }_B\) wins the fight (and occupies the place of \({\varXi }_A\)) if and only if \({\varXi }_A \prec {\varXi }_B\), where \(\prec \) stands for the dominance operation see [56]. In any other case, \({\varXi }_A\) wins, and the challenging larva either tries another place in the reef, or dies, depending on its current \(\kappa \) value. Note that in case of equivalency between solutions (\({\varXi }_A \equiv {\varXi }_B\)), the current solution in the reef is maintained. A second adaptation is needed to provide diversity to the reef: In the MO-CRO, a fix number \(\mu \) of corals with the same value in all objective functions is allowed in the population. After the larvae setting process, the number of corals in the reef with the same value in all objectives is obtained, let us call it \(\beta \), and if \(\mu < \beta \), \((\beta -\mu )\) randomly chosen corals are depredated. This adaptation will be known as Extreme Depredation Operator (EDO). The pseudo-code of Algorithm 2 describes the MO-CRO process.

figure b

5 Discussion: CRO novelty

This section closes the algorithmic contribution of this review. A first reference to novelty issues related to new meta-heuristic proposals recently raised in the literature is provided. A discussion on the contributions of the CRO, why it was proposed and its novelty is then carried out.

5.1 New metaphors and algorithm’s novelty

In the last years, the number of new meta-heuristics proposals for optimization has been massive. In the field of bio-inspired meta-heuristics, a huge number of supposed novel approaches based on very different metaphors have appeared. The question that arises is whether these approaches are really novel, and whether they contribute to the state of the art optimization algorithms. In [57] a criticism on this issue has been presented. The main criticism in that paper is that some algorithms are just very similar version of existing approaches, with a different name and different metaphor to be based on. Previous works raising criticisms for specific algorithms such as HS had appeared before [58, 59], though they have been recently rebutted [60]. The main conclusion in [57] that “new metaphors should be avoided if they cannot demonstrate a contribution to the field”. It seems a quite reasonable conclusion, so the point is to define what is “contribution to the field” in meta-heuristics. It does not mean to attack any new metaphor or procedure in which new searching mechanism is based on, but to ensure that the mechanism is truly new and can lead to completely new developments in the area.

5.2 Discussion on the CRO novelty

With the points discussed in the previous subsection in mind, it makes necessary to stress the points which support the CRO proposal and its novelty. First of all, from the beginning, the CRO algorithm was defined as a class of EA. The fact that it is based on the processes that occur in reefs is important, since they have lead to completely novel versions of the CRO (described above). In its more basic version, the CRO is an EA with a different selection mechanism, with similarities to the Simulated Annealing algorithm. In fact, in its basic version, the CRO exploration of the search space relies on a crossover mechanism, in the same manner as in an EA, and the algorithm is only defined in exploitation. Since the CRO can be defined in terms of different exploration patterns or mechanisms, this finally leads to the definition of the CRO with Substrate Layer, the co-evolution version of the approach to hybridize different searching mechanisms within a single population (see Sect. 4.2). The possibility of defining species in the CRO (to obtain the CRO with species), tackling this way encodings of different length in a single population, is also a novel version of this algorithm. The CRO with species and the CRO-SL are general approaches to evolve different models for a given problem (different objective functions, encodings or even constraints), in a competitive co-evolution framework. To the best of the author’s knowledge, there are not similar proposals in the meta-heuristics field, so the novelty of the CRO-based approaches is ensured, and the work consists of evaluating whether these proposals are competitive against alternative ones in this research area.

6 A review of applications of the CRO algorithm

The CRO approach is a recently proposed approach, since it was first described in a journal paper in 2014 [35]. Due to the small fraction of time that has passed since its release, the number of applications of this algorithm is not huge. In addition, they are mainly focussed on specific lines, such as energy and telecommunications engineering, though in the last year some other lines in logistics, gaming or computer science have appeared.

6.1 Applications of the CRO in energy problems

There are many different problems in energy which can be stated as optimization problems. The first one we discuss here is the optimal layout of turbines in wind farms. This problem consists of choosing the best location of wind turbines in wind farms, in terms of different optimization criteria and fulfilling a number of constraints [61]. The CRO has been applied to a specific problem of turbines layout in the case of offshore wind farms (wind farms situated in the sea) in [62]. The basic CRO algorithm showed advantages against other meta-heuristics in this problem, specifically Evolutionary Approaches, Differential Evolution and Harmony Search algorithms. The case studies to test the CRO were real data from a site for offshore wind farm location in the North sea (Wikinger, Germany). Figure 3a shows the Wikinger area where the wind farm is located, and the possible points to install the wind turbines. A design with 20 turbines was considered, using as objective function the maximization of the Annual Energy Production (AEP) in the wind farm. Figure 3b shows the layouts obtained with an evolutionary algorithm (AEP 84.256) and Fig. 3c the result with the CRO (with an AEP of 84.352).

Fig. 3
figure 3

Wikinger wind farm (North sea); a wind farm contour and possible location points, b best solution obtained with an evolutionary algorithm, c best solution obtained with the CRO approach

Wind speed prediction is another problem where the CRO has been successfully applied [63]. In this case, the CRO has been used as part of a feature selection of the best variables to feed a neural network (Extreme Learning Machine (ELM) [64]) to carry out the prediction. Results in a real wind farm in Oregon (USA) showed the good performance of the approach, better than the case in which no feature selection method is applied. The CRO-ELM method showed to be better than the feature selection with a classical evolutionary algorithm. In [37] a similar problem has been tackled with a modification in the CRO algorithm. In this case, the exploration of the algorithm is carried out by means of a Harmony Search pattern as broadcast spawning, instead of using a classical crossover. The inclusion of this search pattern seemed to improve the performance of the CRO-ELM in this problem of wind speed prediction.

In a similar approach, the CRO algorithm has been applied to solar radiation prediction in [65]. In this case, the approach is slightly different from the application in wind speed prediction, since now the number of predictive variables (inputs) is small, and there is not a real need for feature selection. On the contrary, the CRO has been applied to slightly modify the ELM weights, in such a way that the ELM prediction is improved. Results in real data from the radiometric observatory of Murcia (Spain) showed that the hybridization of the ELM with the CRO was able to improve the performance of the former in this problem of solar radiation prediction.

Another application of the CRO approach in energy is focused on a problem of total energy demand estimation at nation’s level [52]. The problem consists of estimating (within a time-horizon prediction of 1 year) the energy that will be consumed in a country using macro-economic variables. This problem had been previously tackled using different meta-heuristics [6668], but the application of the CRO brought novelties, both in the problem’s resolution, and also in terms of meta-heuristics design. In [52] the concepts of CRO with species and substrates were introduced to tackle this problem of energy demand estimation, concepts that have been developed later on to obtain new co-evolution approaches. This problem can be stated as estimating the total energy demand in a country (Spain in this case) with a time horizon of 1 year: \(f=E^{k+1}(\mathbf{x_k})\), where the predictive variables for time k are matched with the energy demand for time \(k+1\). Data from 1980 to 2011 are available, with a total of \(m=14\) predictive variables described in Table 1. A maximum number of \(m' = 4\) features were allowed in all the models, so a feature selection mechanism that uses a binary encoding is applied. A set of \(T=6\) different models for the calculation of the energy demand estimation are taken into account, and the parameters of each model (\(w_x\)) are also encoded in the coral’s encoding:

  1. 1.

    Linear model (lin):

    $$\begin{aligned} s_{1,\mathbf{w}}= w_1 + w_2 \cdot x_1 + w_3 \cdot x_2 + w_4 \cdot x_3 + w_5 \cdot x_4 \end{aligned}$$
    (1)
  2. 2.

    Exponential model (exp):

    $$\begin{aligned} s_{2,\mathbf{w}} = w_1 + w_2 \cdot x_1^{w_3} + w_4 \cdot x_2^{w_5} + w_6 \cdot x_3^{w_7} + w_8 \cdot x_4^{w_9}\nonumber \\ \end{aligned}$$
    (2)
  3. 3.

    Logarithmic model (log):

    $$\begin{aligned} s_{3,\mathbf{w}} = \mathrm{e}^{\left( w_1 + w_2 \cdot |ln(x_1)|^{w_3} + w_4 \cdot |ln(x_2)|^{w_5} + w_6 \cdot |ln(x_3)|^{w_7} + w_8 \cdot |ln(x_4)|^{w_9}\right) }\nonumber \\ \end{aligned}$$
    (3)
  4. 4.

    Quadratic model, version A (qua):

    $$\begin{aligned} s_{4,\mathbf{w}}= & {} w_1 + w_2 \cdot x_1 + w_3 \cdot x_2 + w_4 \cdot x_3 + w_5 \cdot x_4 \nonumber \\&+\, w_6 \cdot x_1 \cdot x_2 + w_7 \cdot x_1 \cdot x_3 \nonumber \\&+\,w_8 \cdot x_1 \cdot x_4 +w_9 \cdot x_2 \cdot x_3 + w_{10} \cdot x_2 \cdot x_4 \nonumber \\&+\, w_{11} \cdot x_3 \cdot x_4 + w_{12} \cdot x_1^2 + w_{13} \cdot x_2^2 \nonumber \\&+\, w_{14} \cdot x_3^2 + w_{15} \cdot x_4^2 \end{aligned}$$
    (4)
  5. 5.

    Quadratic model, version B (qub):

    $$\begin{aligned} s_{5,\mathbf{w}}= & {} w_1 + w_2 \cdot x_1^{w_3} + w_4 \cdot x_2^{w_5} \nonumber \\&+\, w_6 \cdot x_3^{w_7} + w_8 \cdot x_4^{w_9}+ w_{10} \cdot x_1 \cdot x_2\nonumber \\&+\, w_{11} \cdot x_1 \cdot x_3 + w_{12} \cdot x_1 \cdot x_4 \nonumber \\&+\, w_{13} \cdot x_2 \cdot x_3+ w_{14} \cdot x_2 \cdot x_4 + w_{15} \cdot x_3 \cdot x_4\nonumber \\ \end{aligned}$$
    (5)
  6. 6.

    Mix model (mix):

    $$\begin{aligned} s_{6,\mathbf{w}} = w_1 + w_2 \cdot \mathrm{e}^{\left( w_3 + w_4 \cdot x_1 + w_5 \cdot x_2 + w_6 \cdot x_3 + w_7 \cdot x_4\right) }. \end{aligned}$$
    (6)

With these prediction models, an error function is needed to measure the quality of the prediction, for example the Mean Square Error, defined, for a given model h as:

$$\begin{aligned} \epsilon _{\mathrm{MSE}}=\frac{1}{N} \sum _{j=1}^{N} ( E^{k+1}(\mathbf{x_k})- s_{h,\mathbf{w}})^2, \end{aligned}$$
(7)
Table 1 Variables considered in the problem of energy demand estimation at a nation level

Note that the use of different models complicate the problem, since each model implies a different encoding, with different length (for example model \(s_{1,\mathbf{w}}\) induces an encoding of length 19 (14 binary variables plus 5 from \(\mathbf{w}\)), and model \(s_{5,\mathbf{w}}\) encoding length is 29 (14 binary + 15 from \(\mathbf{w}\))). In this case, the use of the CRO with species described in Sect. 4.1 and CRO with Substrate Layer (Sect. 4.2) can solve the problem. In the CRO with species, each species stands for a given model s, and the encoding of the corals in the reef is the following:

$$\begin{aligned} {\varXi }^t_{i,j}=\left[ t | \mathbf{I} | \mathbf{w}\right] , \end{aligned}$$
(8)

where t stands for the species number (model to calculate the energy estimation), \(\mathbf{I}\) is the binary part for feature selection and \(\mathbf{w}\) stands for the model’s parameters. On the other hand, in the CRO-SL, the encoding is as follows:

$$\begin{aligned} {\varXi }_{i,j}=\left[ \mathbf{I} | \mathbf{w}\right] , \end{aligned}$$
(9)

where \(\mathbf{I}\) is the binary part for feature selection, and \(\mathbf{w}\) stands for the parameter of the models. The length of \(\mathbf{w}\) is equal to the maximum length required by the largest model considered (all corals in the reef have the same encoding, and the substrate layer stands for the different models considered in the problem, i.e., now each substrate represents a different model, and each coral is evaluated with a different objective function to estimate the energy demand depending on the substrate it falls).

As previously mentioned, in [52] the specific case of energy demand estimation in Spain from macro-economic variables has been tackled. The CRO with species and CRO-SL have been used, obtaining good results, slightly better in the case of the CRO-SL as can be seen in [52]. From the algorithms’ point of view, the convergence of both approaches is different. Figure 4 shows the differences in convergence of the CRO with species and CRO-SL in this problem. As can be seen, in the CRO with species Fig. 4a, the worse species perish with the algorithm’s generations, and finally only the best species (energy model in this case) remains in the reef. The effect of fitness increasing is due to the best individual of a given species is killed by another individual (from a different species). This can also be seen if we represent the number of corals belonging to each species in the reef (Fig. 5). As can be seen, the number of corals belonging to each species is variable in the reef evolution. On the other hand, Fig. 4b shows the evolution of the CRO-SL, and as can be seen, in this case all the substrates remain equal until the end of the evolution, so there is not the effect of species extinction as in the CRO with species.

Fig. 4
figure 4

Evolution comparison between the CRO with species and with substrates in the problem of energy prediction from macro-economic variables in Spain; a CRO with species, b CRO with substrates

Fig. 5
figure 5

Evolution of the number of corals within generations (CRO with species) in the problem of energy prediction from macro-economic variables in Spain

Finally, in [69] the CRO-SL algorithm has been successfully applied to a problem of battery scheduling in a micro-grid with renewable generation (wind and photovoltaic generations) and variable prices of electricity. The CRO-SL approach was compared with a deterministic use of the battery, in which the battery is charged is charged with the maximum possible power every period of time in which the generation is larger than the load’s demand, and in the periods of time in which the load’s demand is larger than the generation, the battery is discharged with the maximum possible power. Five substrates were defined in this application for the CRO-SL: Harmony Search (HS), Differential Evolution (DE), two-points crossover (2Px), multi-point crossover (MPx) and Gaussian mutation (GM). The CRO-SL approach was able to clearly improve the deterministic use of the battery in all the tested cases (different weeks periods in different seasons of the year). Figure 6 show the results obtained by the CRO-SL in comparison with those by the deterministic use of the battery, for a winter week in the micro-grid considered. Note that the use of the CRO-SL for battery scheduling instead of its deterministic use produces an important reduction of the electricity consumption from the main grid, specially in time instants where the electricity price is high. Figure 7 shows the relative importance of each substrate in the CRO-SL in this problem, in terms of the percentage of times in which a given substrate provides the best larva (new solution) in each generation. It seems that the crossover operators are useful in this application, and also the DE substrate contributes to the evolution, whereas the GM provides little contribution and the HS substrate does not provide a good exploration of the search space in this case.

Fig. 6
figure 6

Comparison of the results obtained using the proposed CRO-SL (blue line) and the deterministic approach (red line) for a winter week in the micro-grid considered; a consumption from the main grid, b battery power scheduling and c % state of charge (SOC) in the battery (color figure online)

Fig. 7
figure 7

Comparison of the effect of the different substrates of the CRO-SL in the winter week considered [percentage of times in which a given substrate gives the best larva (new solution) in each generation]

6.2 Applications of the CRO in telecommunications problems

The second line of applications in which the CRO have been most applied are Telecommunication related problems. In [70] the CRO is introduced to tackle the problem of optimal distribution of different services over available technologies in mobile communications systems, to obtain an optimized-cost network deployment. Different services within all the spectrum of mobile communications technologies (2G-GSM, 3G-UMTS, 3G-HSPA and 4G-LTE) have been considered. The CRO obtained improvements in terms of the network deployment cost, improving the results of classical evolutionary algorithm and a Teaching-Based-Learning meta-heuristic approach. In [71] another problem of optimal network deployment for 2G-GSM systems is tackled with the CRO algorithm with grouping encoding. In this case, the optimal location of Base Stations (BSs) is carried out, in terms of three design objectives: maximization of the network coverage, minimization of the installation cost, and minimization of the electromagnetic pollution caused by the installation of new BSs. A CRO with a specific grouping encoding [72] was proposed for this problem, obtaining a solid algorithms which is able to manage different solutions involving a different number of BSs in the same population. The good performance of the grouping CRO in this problem was tested in comparison with alternative grouping versions of evolutionary algorithms, Harmony Search and Particle Swarm Optimization algorithms. In [73], a different version of this problem was also tackled with the grouping CRO approach. In this case, a capacity constraint in BSs was considered, in such a way the number of users in each BS is restricted. The CRO obtained again very good performance in this version of the problem. In [74] the coverage optimization problem in a directional sensor network was formulated as a multi-objective optimization problem. The problem’s definition takes into account the coverage rate of the network, the number of working sensor nodes and the network’s connectivity. A novel Tchebycheff decomposition method is introduced in this paper, in such a way that it is possible to decompose the multi-objective problem into a single-objective problem. A novel learning automata-based CRO (LA-CRO) is then introduced to solve the problem, in such a way that the LA-CRO obtains the best set of parameters for this problem. The LA-CRO approach was tested in several computational tests on this problems, showing a good performance. The last work we review on this section is an optimization problem on cloud computing [75]. In this paper a cloud resource allocation problem with the CRO is tackled. In this case, the CRO is used to model cloud elasticity in a cloud-data center, and on the classic Game Theory to optimize the resource reallocation schema with respect to cloud provider’s optimization objectives and customer requirements.

6.3 Other applications of the CRO algorithm

Recently, alternative applications of the CRO algorithms have been successfully introduced in different research areas. For example, in [76] a hybrid Differential Evolution CRO algorithm (DECRO) has been proposed for the optimal training of Extreme Learning Machine Networks. Experimental results in different sets have shown that DECRO-ELM can reduce the prediction time of original ELM, and obtain better performance for training ELM than both DE and CRO on their own. In [77] the CRO performance in clustering-related problems has been studied. Specifically, the CRO has been adjusted to provide a good clustering partition for different datasets. Three new modifications of the CRO algorithm and an index to be used as objective function for the problems have also been introduced in [77]. A comparison of the different CRO version with a hybrid genetic algorithm for clustering is carried out to show the performance of the CRO in these problems. In [78] the CRO is used to combine multiple partitions generated by different clustering algorithms into a single clustering solution. The CRO was shown to be able to improve the solution of a classic genetic algorithm for this task. In [79] a novel version of the CRO for the capacitated vehicle routing problem is introduced. The modification of the CRO algorithm consists of using and initial solution for the problem based on the probabilistic Clarke–Wright savings algorithm [80], and then improve the obtained solution with the CRO mechanism. The proposed approach has been tested in 14 well-known capacitated vehicle routing benchmark instances, and compared it with other existing algorithms in the literature, obtaining competitive results. In [81] a discussion on the CRO suitability for the dynamic cell formation problem is carried out. Finally, in [82] an application of the CRO to the optimal parameters’ identification of a permanent magnet synchronous motor is presented. The CRO has been compared against a Particle Swarm Optimization algorithm with least squares, outperforming this approach in obtaining the best set of parameters for the motor.

7 Conclusions

In this paper, we have discussed the main characteristics of a recently proposed meta-heuristic, the Coral Reefs Optimization algorithm (CRO). The basics of this evolutionary-type approach have been described, detailing the different operators applied to simulate the processes that occur in a real coral reef, which finally conform the algorithm. Different improvements to the basic version of the algorithm have been also presented, including a CRO version with species, that can be applied to optimization problems with variable length encodings, a CRO with substrate layers, which provides a strong algorithm in which different models can be evolved, and finally a multi-objective version of the CRO, which can be obtained by applying very few changes to the basic CRO algorithm. We have closed the paper with a discussion of the most important applications of the CRO to engineering problems.