## 5 Soft Computing Techniques
### Fuzzy Logic (FL)  
In this research, another artificial intelligence model that was developed is based on Fuzzy Logic (FL). FL model requires special rules to control data behavior. To obtain these rules and membership functions, the Matlab built-in function \"genfis2\" was used. This function uses provided input and output data in separate matrices as input arguments. It also requires radii to be selected for input and output arguments, which specifies the center of cluster range of influence for each of the dimensions used in the data set. The data was then used to estimate the amount of membership functions and rules for the antecedents and consequents. The extracted rules were stored in a special FIS format variable, that later could be used to obtain predicted output for certain input variables. Similar to Section 5.1, different input rock characteristics were used as inputs for the fuzzy logic model and 70% of data was used for training, and the remaining 30% was used for testing to estimate the CLI. The FL model was also performed for seven different combinations of rock properties, and the output of the models is discussed in this paper. The generated FIS file contains membership functions that define to what degree a certain  
Figure 16: Relations between the actual and estimated CLI by ANN model 7 for testing. Figure 15: Relations between the actual and estimated CLI by ANN model 7 for training. input belongs to a given set. The following figures are a representation of the fuzzy logic model created by the \"genfis2\" command, where input parameters are density and UCS with the output of CLI. These membership functions are based on gbellmf (generalized bell-shaped membership function), which is a function with a specific shape suitable for this analysis. This function was chosen automatically by the genfis2 command. The \"anfis\" function in MATLAB software uses the adaptive neuro-fuzzy inference system (ANFIS) to tune the FIS file obtained from \"genfis2\" and its use was recommended in the literature [69]. This approach is especially useful in engineering fields where traditional methods fail or are too difficult to use [70]. The ANFIS technique is effective for nonlinear system interpretation [71]. The \"Anfis\" command in the MATLAB environment provided some improvement in the modeling results as shown by higher correlation factors and MSE. The results of the FL analysis of CLI are presented in the next section of this paper. The final visualization of rules for the FIS file after the \"anfis\" tuning command is used can be seen in Figure 17 with two input cases for the dataset. Given that the MATLAB [54] fuzzy logic designer tool is not capable of extracting rules that control the behavior of data, it had to be carried out with the built-in command \"genfis2\". To do so, input and output data were defined from the dataset, and then by using \"dividerand\" that sets what fraction of data can be used in training, testing, and validation; it randomly selects which samples of the dataset go to which part. The \"genfis2\" function is used on that randomly chosen 70% of data to be trained, then the \"evalfs\" command is used to check the model by predicting results on training and testing samples. It is performed inside of the loop where the variable \"i\" defines the radius of the cluster from 0.1 to 1 with 0.05 steps. Cluster radii is a scalar value, which is multiplied by the width of the data space. The \"mse\" code determines the MSE of models, while \"mseALtraining\" collects these MSE measurements for finding optimal. After developing the rules and model structure for 80 tunneling cases to estimate the CLI as a function of rock properties, models run until they produce reliable and accurate results. To achieve the desired performance, seven different alternative input combinations were used and the results of the models were examined to find the best model among them. The initial steps involve evaluating the influence of each rock variable using the FL surface map as shown in Figures 18-21.