## 3 Fuzzy-Controlled COBRA  
As was mentioned in the previous section, the original COBRA approach has six similar biology-inspired component algorithms, which mimic the collective behavior of their corresponding animal groups, thereby allowing the global optima of real-valued functions to be found. Performance analysis showed that all of them are sufficiently effective for solving optimization problems, and their workability has been established [21; 47]. However, there are various other algorithms which can be used as components for COBRA as well as previously conducted experiments demonstrating that even the biology-inspired algorithms already chosen can be combined in different ways. For example, in [27] five different combinations of the population-based heuristics for the COBRA algorithm were presented, and their efficiency was examined on test problems from the CEC 2013 competition [48]. It was established that three of them show the best results on test functions depending on the number of variables [27]. The described problem was solved by controllers based on fuzzy logic [28]. The fuzzy controller implements a more flexible parameter tuning algorithm, compared to the original approach used in COBRA [29]. The fuzzy controller operates by using special fuzzification, inference and defuzzification schemes [28], which allow generating real-valued outputs. In the mentioned study [29], component algorithms are rated with success values, which were used as the fuzzy-controller inputs, and the amount of population size changes as its outputs. The controller based on fuzzy logic used in this study had 7 inputs, including 6 success rates of component algorithms and the success rate of the whole population, and 6 outputs, including the number of individuals to add or remove from every heuristic component algorithm. The success of every component was determined as the best achieved fitness value of the corresponding component. This choice was made in accordance with the research presented in [29]. The 7-th input variable was determined as the ratio of the number of steps, during which the best-found fitness value (found by all algorithms together) was improved, to the adaptation period, which was a parameter. To obtain the output values, the Mamdani fuzzy inference procedure was used, and the rules had the following form:  
\[R_{q}:\text{IF }x_{1}\text{ is }A_{q1}\ldots\ x_{n}\text{ is }A_{qn}\text{ THEN }y_{1}\text{ is }B_{q1}\ldots\ y_{k}\text{ is }B_{qk}, \tag{1}\]  
where \(R_{q}\) is the \(q\)-th fuzzy rule, \(x=(x_{1},\ldots,x_{n})\) is the set of input values in \(n\)-dimensional space (\(n=7\) in this case), \(y=(y_{1},\ldots,y_{k})\) is the set of outputs (\(k=6\)), \(A_{qi}\) is the fuzzy set for the \(i\)-th input variable, \(B_{qj}\) is the fuzzy set for the \(j\)-th output variable. The rule base consisted of 21 fuzzy rules and was structured as follows: the rules were each three rules were organized to describe the case when one of the components achieved better fitness values than the others (as there are six components, a total of 18 rules were set); the last 3 rules used the total success rate for all components (variable 7) to determine if solutions should be added or removed from all components, thus regulating the amount of available computational resources [29]. Part of the described rules base is presented in Table 1.  
The input variables were set to be in \([0,1]\), and the fixed triangular fuzzy terms were used for this case. The fourth fuzzy term \(A_{4}\) was added, \"larger than 0\" (opposite to \(A_{1}\)) in addition to three classical terms \(A_{1}\), \(A_{2}\) and \(A_{3}\) and the \"Don't Care\" (\(DC\)) condition. The \(A_{4}\) and '\(DC\) are needed to simplify the rules and decrease their number [29]. The output variables were also set using 3 triangular fuzzy terms.