AOSMA-MLP: A Novel Method for Hybrid Metaheuristics Artificial Neural Networks and a New Approach for Prediction of Geothermal Reservoir Temperature

Featured Application: The proposed models can help uncover the usage areas of geothermal waters by determining the reservoir temperatures in advance. Thus, they can be used as a decision support system to make the most appropriate selection


Introduction
Today, driven by increased urbanization and improvements in living standards, the energy consumed in homes and living spaces is on the rise.Buildings are now responsible for about 40% of energy consumption and nearly 36% of greenhouse gas emissions in the European Union (EU).A significant portion of this energy is used for heating and cooling [1,2].Consequently, there has been a notable increase in the demand for fossil fuels, raising concerns about energy supply security, environmental pollution, and greenhouse gas emissions in recent years [3].These concerns can be alleviated by employing renewable energy sources with low carbon emissions, such as biomass, solar, and geothermal energy [2,4,5].Among these energy sources, geothermal energy, independent of weather conditions, has significant potential.Due to its positive attributes, geothermal energy has become increasingly important for heating, cooling, and other energy applications [2,[6][7][8][9].Moreover, geothermal energy is recognized as a renewable energy source crucial for eco-nomic development, reducing environmental pollution and greenhouse gases, and ensuring energy security [3,10,11].
Geothermal energy, stored beneath the Earth's crust and at its depths, originates from the natural internal heat of the planet.It has various applications, ranging from direct use to electricity production, depending on the reservoir temperature (RT).These applications include the heating and cooling of buildings, electricity generation in power plants, agricultural applications, and uses in balneology.While some applications require low-to medium-temperature fluids, others necessitate medium-to high-temperature fluids for heating, cooling, and electric power generation [3,12].As such, the value of RTs is crucial for determining the usability of geothermal water [12].
Hydrogeochemical analyses of geothermal waters provide insights into their formation mechanisms, enabling predictions about RTs [13].Extensive research is vital prior to drilling in geothermal resource areas to determine the most suitable locations, which can help reduce the costs associated with geothermal drilling and enhance the utilization of geothermal resources.Identifying RTs of geothermal waters necessitates complex geological surveys and analyses, which are time-consuming, costly, and complex [14][15][16][17][18][19][20][21][22].
Machine learning techniques, successfully applied in various fields, offer a promising approach to address these challenges by predicting RTs.RTs have been predicted using methods like linear regression, linear support vector machine, and deep neural networks [12].Additionally, there are studies on predicting geothermal heat flow and deep RTs using methods like gradient-assisted R-regression trees and artificial neural networks (ANNs) [23,24].
ANNs are extensively used in regression problems, with various models such as feed-forward networks (FNNs) [25] and radial basic function (RBF) [26] networks found in the literature.The multilayer perceptron (MLP), a type of FNN, is particularly popular [27].While classic optimization algorithms are commonly used, they may encounter issues like becoming stuck at local minima, premature convergence, and suboptimal performance.To overcome these issues, using metaheuristic optimization algorithms during the MLP training phase is suggested [28][29][30].
Among the proposed methods, whale optimization (WOA-MLP) [31], the ant lion optimizer (ALO-MLP) [32], and the slime mould algorithm (SMA-MLP) [33] are widely cited in the literature.However, because SMA has limitations in the exploration and exploitation phase due to its reliance on two random search agents, the adaptive opposition SMA (AOSMA) was introduced to mitigate these disadvantages [34].
This study seeks to accurately estimate the reservoir temperatures (RTs) of geothermal resources by leveraging hydrogeochemical data through a novel methodology.The primary goal is to mitigate the financial, temporal, and labor-intensive demands traditionally associated with geothermal projects.This is achieved by devising a new expert system designed to supplant the necessity for protracted fieldwork and the reliance on specialized personnel and equipment.Central to this research is the innovative application of the adaptive opposition-based slime mould algorithm (AOSMA) during the multilayer perceptron (MLP) training phase-a first in this context.This newly proposed method aims to adeptly predict RTs.Furthermore, it undergoes a comparative analysis against the one-step secant backpropagation artificial neural network (ANN), a first-order optimization technique, as well as other methodologies trained with distinct metaheuristic optimization algorithms, including whale optimization algorithm-MLP (WOA-MLP), ant lion optimizer-MLP (ALO-MLP), and slime mould algorithm-MLP (SMA-MLP).

Data Acquisition
In this study, we utilized a dataset comprising 161 data points, previously assembled by researchers within our team.This dataset, initially used to predict the application areas of reservoir temperatures (RTs) through classification approaches, is the foundation for our current investigation [17].Herein, we propose a hybrid machine learning approach, the adaptive opposition-based slime mould algorithm-multilayer perceptron (AOSMA-MLP), applied to tackle this real-world problem by predicting the numerical values of RTs-a task commonly addressed with regression techniques in machine learning literature.
To facilitate a comprehensive understanding of the present study, it is pertinent to briefly revisit some critical aspects of the dataset, detailed in our prior research [17].Figure 1 illustrates the modeling's input and output parameters, encompassing seven inputs and one output.The selection of ions as input parameters is primarily influenced by their availability in the fluid, given that geothermal fluids, deriving their components from either a degassing magma heat source or the surrounding rock, often contain high concentrations of these ions.Notably, the Na+ and K+ ion concentrations are essential for understanding water-rock interactions at elevated temperatures.Moreover, an increased B content typically signifies deep feeding and a high-temperature deep reservoir.Cl − is a major anion that enhances the salinity of geothermal fluids.The silica concentration, affected by temperature, is another crucial parameter.In a geothermal system, SiO 2 's solubility decreases with falling temperature.Additionally, silica is vital for estimating reservoir temperatures in thermal springs, and its precipitation can influence the operational process.The dissolved ion content in geothermal fluids, indicative of the temperature and reservoir geology of an area, varies with temperature.Low-temperature fluids contain fewer dissolved solids than their high-temperature counterparts, making electrical conductivity (EC) an important measure for assessing dissolved particles in geothermal fluids [12].
Appl.Sci.2024, 14, x FOR PEER REVIEW 3 of 19 of reservoir temperatures (RTs) through classification approaches, is the foundation for our current investigation [17].Herein, we propose a hybrid machine learning approach, the adaptive opposition-based slime mould algorithm-multilayer perceptron (AOSMA-MLP), applied to tackle this real-world problem by predicting the numerical values of RTs-a task commonly addressed with regression techniques in machine learning literature.
To facilitate a comprehensive understanding of the present study, it is pertinent to briefly revisit some critical aspects of the dataset, detailed in our prior research [17].Figure 1 illustrates the modeling's input and output parameters, encompassing seven inputs and one output.The selection of ions as input parameters is primarily influenced by their availability in the fluid, given that geothermal fluids, deriving their components from either a degassing magma heat source or the surrounding rock, often contain high concentrations of these ions.Notably, the Na+ and K+ ion concentrations are essential for understanding water-rock interactions at elevated temperatures.Moreover, an increased B content typically signifies deep feeding and a high-temperature deep reservoir.Cl − is a major anion that enhances the salinity of geothermal fluids.The silica concentration, affected by temperature, is another crucial parameter.In a geothermal system, SiO2's solubility decreases with falling temperature.Additionally, silica is vital for estimating reservoir temperatures in thermal springs, and its precipitation can influence the operational process.The dissolved ion content in geothermal fluids, indicative of the temperature and reservoir geology of an area, varies with temperature.Low-temperature fluids contain fewer dissolved solids than their high-temperature counterparts, making electrical conductivity (EC) an important measure for assessing dissolved particles in geothermal fluids [12].This section meticulously details the compilation of a comprehensive dataset utilized in the current study, drawing from various sources focusing on the hydrogeochemical properties and reservoir temperatures (RTs) of geothermal resources across Turkey, particularly within Anatolia.Following is a concise rephrasing to clarify and streamline the information: The dataset used in this study amalgamates hydrogeochemical data and RTs from several geothermal resources across Western, Central, and Eastern Anatolia, Turkey.It integrates the following.This section meticulously details the compilation of a comprehensive dataset utilized in the current study, drawing from various sources focusing on the hydrogeochemical properties and reservoir temperatures (RTs) of geothermal resources across Turkey, particularly within Anatolia.Following is a concise rephrasing to clarify and streamline the information: The dataset used in this study amalgamates hydrogeochemical data and RTs from several geothermal resources across Western, Central, and Eastern Anatolia, Turkey.It integrates the following.
Western Anatolia: a collection of 83 datasets from [12], detailing hydrogeochemical properties and RTs of geothermal resources.Central Anatolia (Çamlıdere): hydrogeochemical data and RTs sourced from 12 different locations, as reported by [35].Eastern Anatolia: a selection of 42 datasets from [36], specifically focusing on hot water sources from various cities and locations.Central Anatolia (Nevşehir, Kozaklı): nine datasets from research documented in [37], excluding data from point 4 for consistency.Central Anatolia (Terme and Karakurt, Kırşehir): this study contributed seven datasets, excluding cold spring data but including hydrogeochemical and RT data [38].Central Anatolia (Seydişehir, Kavak, Konya): eight datasets derived from literature [39], omitting cold spring data but incorporating measurements from April.Each dataset has been meticulously selected to ensure a robust analysis, excluding cold springs, to maintain focus on the geothermal energy potential.The range and specifics of the hydrogeochemical and RT data are tabulated in Table 1, providing a foundation for the comprehensive analysis undertaken in this study.

Artificial Neural Network
The artificial neural network (ANN) is a computational model inspired by the human brain's neural network.It typically consists of three primary layers: the input layer, one or more hidden layers, and the output layer [40,41].The primary goal in training an ANN is continuous optimization, which involves mapping input to output to find optimal bias and weight values within the fewest possible iterations.The multilayer perceptron (MLP) is the most frequently utilized ANN structure in the literature.This section delves into MLP and the metaheuristic methods increasingly adopted for MLP training in recent years.Additionally, it covers evaluation metrics for regression problem assessments and data-normalization techniques.

Multi-Layer Perceptron Neural Networks
Similar to ANNs, the MLP functions by mapping a set of input values to a corresponding set of output values.This mapping is achieved through a transformation process designed to derive the output.An MLP consists of three layers: the input layer contains n input values; the hidden layer, positioned between the input and output layers, varies in size depending on the problem type; and the output layer, which aggregates the results of the MLP network [42].Figure 2a,b illustrate the fundamental MLP structure and a single neuron's architecture, respectively.The input layer hosts n neurons, the output layer includes k neurons, and the hidden layer comprises m neurons.Each neuron in the hidden layer performs two critical operations: summation and activation.The sum obtained is subsequently passed through an activation function, as depicted in Equation (1).
where w ij is the connection weight between the hidden neuron j and the input neuron i. b j is the bias value.
where y j is the output value of neuron j, and f is the sigmoid function.Its calculation is shown in Equation (3).
where yj is the output value of neuron j, and f is the sigmoid function.Its calculation is shown in Equation (3).
At the end of these operations, the final output value   is calculated using the sum and activation operations.These operations are given in Equations ( 5) and (6).
Here Yj is the final output of j.

Whale Optimization Algorithm
Mirjalili and Lewis (2016) introduced the whale optimization algorithm (WOA), a metaheuristic optimization technique inspired by the social behavior of humpback whales specifically designed to tackle challenging optimization problems [43].Humpback whales are known for their unique hunting strategy, wherein they can pinpoint and entirely engulf their prey.In the context of WOA, this behavior is simulated by allowing the simulated whales to adjust their positions relative to a designated optimal search agent, analogous to the target prey in their natural hunting process.This adaptation of humpback whale behavior into a computational model is encapsulated in the mathematical formulations presented in Equations ( 6) and ( 7), detailing the algorithm's mechanics of search and optimization.At the end of these operations, the final output value Ŷi is calculated using the sum and activation operations.These operations are given in Equations ( 5) and (6).
Here Y j is the final output of j.

Whale Optimization Algorithm
Mirjalili and Lewis (2016) introduced the whale optimization algorithm (WOA), a metaheuristic optimization technique inspired by the social behavior of humpback whales specifically designed to tackle challenging optimization problems [43].Humpback whales are known for their unique hunting strategy, wherein they can pinpoint and entirely engulf their prey.In the context of WOA, this behavior is simulated by allowing the simulated whales to adjust their positions relative to a designated optimal search agent, analogous to the target prey in their natural hunting process.This adaptation of humpback whale behavior into a computational model is encapsulated in the mathematical formulations presented in Equations ( 6) and (7), detailing the algorithm's mechanics of search and optimization.
The location vector of the optimal solution that has been found up to this point is denoted by → A and → C coefficient vectors are calculated in Equations ( 8)- (10).The position vector is denoted by → X. t represents the most recent iteration.
In the whale optimization algorithm (WOA), a coefficient vector "a" decreases linearly from 2 to 0 over the course of iterations, influencing both the exploration and exploitation phases.The vector "r" is a randomly generated vector within the range of [0, 1], with "t_max" representing the maximum number of iterations and "t" denoting the current iteration number.Equations ( 8) and ( 9) are designed to maintain a balance between exploration and exploitation during the optimization process.In these equations, "r" generates a random number, introducing stochastic elements into the population's location updates.Exploration is initiated when A ≥ 1, while exploitation occurs when A < 1, enabling the algorithm to transition between exploration and exploitation at any optimization stage.
The unique bubble-net attacking strategy of humpback whales is mimicked within WOA through two main mechanisms: the spiral update position mechanism and the shrinking encircling mechanism.The coefficient vector A, which influences these mechanisms, is determined by setting the value of "a" within the range of [−1, 1] [−1, 1], while the shrinking encircling mechanism reduces the value of "a" linearly through iterations.This approach positions the new location midway between its current location and that of the optimal search agent.To emulate the humpback whales' spiral movements toward their prey, the spiral equation defining the path between the whale and the prey's location is established.This mathematical representation captures the essence of the humpback whales' hunting strategy, applying it to the optimization process in WOA.
where → D ' is the distance of the i whale from its target (the best solution so far), l is a random value within the range [−1, 1], and b is a constant used to define the logarithmic spiral's form.Because humpback whales swim in a circle that gets smaller and smaller around their prey while at the same time moving along the path in a spiraling fashion, the shrinking containment method and the spiral approach are used simultaneously.In order to model this behavior, it is presumed that each mechanism has a probability of occurring of fifty percent [44].The method based on the variation of vector A can be utilized for hunting (exploration).Random searches are conducted by humpback whales based on one another's locations.As a result, A is used in conjunction with random values less than or greater than 1 to force the search agent to depart from the reference whale.During the exploration phase, in contrast to the exploitation phase, they do not update the position of a search agent according to the best search agent discovered up to this point.Instead, they choose a search agent at random and base the update on that.This mechanism highlights the A > 1 discovery phase and allows WOA to conduct a global search.Equations ( 13) and ( 14) are a mathematical model of the process of hunting prey.
where − −− → X rand is a randomly selected whale from the current population whose position vector is random.

Ant Lion Algorithm
The ant lion optimizer (ALO) algorithm models the interaction between ant lions and ants within the context of a trap [45].In this algorithm, ant lions set traps to capture ants, thereby enhancing their fitness through successful predation.Ants, symbolizing potential solutions within the search space, navigate through this space to mirror these natural interactions.Reflecting the stochastic movement of ants in their quest for food, the algorithm employs a specific random walk strategy to simulate the ants' movement patterns.This approach captures the essence of the dynamic and unpredictable interactions that occur in nature, translating them into a computational method for solving optimization problems.
where cumsum is a function that calculates the cumulative sum, n is the maximum number of iterations that may occur, t represents the step of a random walk (referred to as an iteration in this research), and r(t) is a stochastic function defined as follows: where rand is a uniformly distributed random number in the range [0, 1].In the following matrix, the ant's location is noted and used for optimization: where M ant stores the location of each ant, A i,j indicates the ith ant's jth variable (dimension), d is the number of variables, and n is the number of ants.During optimization, a fitness (objective) function is used to assess each ant, and the fitness value of each ant is stored in the following matrix: where M OA is the matrix used for preserving each ant's fitness, and f is the fitness (objective) function.In addition, the ant lions lurk in the search area.Their locations are saved using the following matrices: M Antlion is the matrix used to store each ant lion's location.
M OAL is the matrix used to save each ant lion's fitness.

Random Walks of Ants
Equation ( 21) is used to normalize ants' positions and restrict them from wandering outside of the search area.
where a i denotes the smallest random walk for the ith variable, c t i denotes the smallest variable at the tth iteration, and d t i represents the largest variable at the tth iteration.

Trapping in Antlion's Pits
Ant lion traps affect random ant walks.The following equations are proposed to describe this supposition: where c t stands for the vector containing all variables' minimum values at iteration t; d t stands for the vector containing all variables' maximum values at iteration t; c t i and d t i represent the minimum and maximum values of all variables for the i-th ant, respectively; and Antlion t j represents the position of the selected j-th.

Building Trap
The capacity of ant lions to hunt should be modeled using a selection method.The more fit the ant lion, the greater its chance of catching an ant.The roulette wheel selection method was used to choose ant lions based on their fitness value.

Sliding Ants towards Antlion
Ants must walk in a random pattern, while ant lions can construct traps according to their fitness.Antlions spray sand from the pit once an ant is inside the trap.This behavior hinders an ant's escape.In order to show this behavior, the size of the ants' random walk's hypersphere is made smaller.In this respect, the following equations are suggested: where c t represents the lowest value for all variables at iteration t, d t is the vector containing ts' maximum value for all variables, and I is a ratio, as described by Equation (26).
where w is a constant determined depending on the current iteration (w = 2 when t > 0.1t max , w = 3 when t > 0.5t max , w = 4 when t > 0.75t max , w = 5 when t > 0.9t max , and w = 6 when t > 0.95t max ), where t is the current iteration, and t max is the maximum number of iterations.In essence, the constant w allows for exploitation accuracy level adjustment.

Sliding Ants towards Antlion
The prey is captured by the ant lion's jaws as it descends to the bottom of the pit during the last phase of the hunt.The ant lion then drags the ant into the sand, where it eats the insect's body.When an ant becomes more physically fit than its comparable ant lion, it is considered that prey is captured.In order to expand its capacity for hunting fresh ants, the ant lion must thus change its posture to that of the hunted ant.Equation (27) represents this process: where Antlion t j displays the position of chosen j-th antlion at the t-th iteration, and Ant t i shows the position of the i-th ant at the t-th iteration.

Elitism
The ant lion that is fittest in each iteration is labeled an elite.The chosen ant lion and the elite ant lion direct the random walk of an ant using the selection process, and so the repositioning of a particular ant follows Equation (28).
where Ant t i denotes the location of the i-th ant at the t-th iteration, R t A denotes the t-th iteration's random walk around the ant lion chosen by the roulette wheel, and R t E denotes the t-th iteration's random walk around the elite.

Slime Mould Algorithm and Adaptive Opposition Slime Mould Algorithm
A stochastic optimizer called SMA has been proposed by Li et al. [46].Inspired by the oscillation of the mode of slime mould in nature, the proposed SMA method has been successfully applied in many studies in the literature [47,48].Suppose there are N slime moulds with a lower boundary (LB) and upper boundary (UB) in the search space.The position of the ith slime mould in d dimensions is represented as and the fitness of i-th slime is expressed as f(X i ), ∀i = [1, N].Thus, the position of N slime mould and its fitness at the present moment (iteration) t may be stated according to Equations ( 29) and (30): For the next iteration (t + 1) in the SMA, the position of the slime mould is updated using Equation (31).
where V b and V c represent random velocity, X LB represents the best local individual for the current iteration, W represents the weight vector, and X A and X B represent randomly pooled slime mould samples from the available populations.r 1 and r 2 are random values between 0 and 1.The probability that the slime mould will appear at a random search site is set at δ 0.03.p i is the i-th slime mould's threshold value, which assists in picking the slime mould position using the best individual or itself for the following iteration, and is computed as shown in Equation (32).
where f(X i ) is the fitness value of the i-th slime mould X i , and f(X GB ) is the global best fitness value f GB derived by Equation ( 33) of the global best position X GB .
Equation ( 34) may be used to calculate the weight W of N different types of slime mould in the current iteration: where "rand" represents a random number between [0, 1].The local worst fitness value is represented by f Lw , and the local best fitness value is represented by f LB .f LB and f Lw are calculated based on the fitness value f given in Equation (30).We can sort the fitness value in ascending order for a minimization problem, as shown in Equation ( 35): The local worst fitness value Equation ( 36), the local best fitness value Equation ( 37), and the corresponding local best individual value Equation ( 38) are subtracted as follows: where V b and V c represent random velocities selected from a continuous uniform distribution in the [−b, b] range and in the [−c, c] range.The b and c values for the t iteration are calculated as shown in Equations ( 39) and ( 40): The ideal feeding path for slime mould may be improved in the search process, as explained in Equation ( 31) [34].Based on δ and p i , the next iteration position update rule of slime mould in SMA is dependent on the following three cases: Case 1: When r 1 ≥ δ and r 2 < p i , the slime mould search trajectory is directed by the best local slime X LB and two randomly pooled slimes X A and X B with the velocity V b .It balances exploration and exploitation.Case 1 indicates that X A and X B are arbitrarily combined slime mould; therefore, the solutions we acquire are not well explored and exploited [34].This limitation may be solved by substituting X A with the best local X LB .In this case, the equation can be updated, as shown in Equation (41).
Case 2: The slime mould trajectory is directed by its own location with a velocity V c when r 1 ≥ δ and r 2 ≥ p i .This helps with exploitation.According to Case 2, the slime mould utilizes a neighboring location; thus, it may take a different route with a lower fitness value.An adaptive decision (AD) strategy might be a better option to overcome this limitation [34].
Case 3: When r 1 < δ, in the search space, the slime mould re-initializes, assisting with exploration.Based on Case 3, the SMA provides a provision for devoted exploration; nevertheless, the exploration is limited since δ has a small value.We must add more exploration to SMA in order to assist it in circumventing this limitation and exceeding the local minima.To address the limitations of Cases 2 and 3, we employ an AD technique to determine if it is necessary to investigate further using OBL [34].

Opposition-Based Learning
The OBL updated the location of the subsequent iterations by comparing an estimate Xo i in the search space that is the exact opposite of the position Xn i for each slime mould (i = 1, 2, ..., N).With increased convergence, this step reduces the likelihood of being stranded in the local minima.Thus, it is calculated that the Xo i for the i-th slime mould in the j-th dimension is, where i = 1, 2, ..., N and j = 1, 2, ..., d. i is chosen for the Xs i minimization problem.The slime mould position is as follows:

Adaptive Decision Strategy
An AD is made based on the present fitness value of f(Xn i (t)) and the old fitness value of f(X i (t)) while the slime mould is pursuing a decedent nutrition route.When necessary, the AD uses OBL to augment the investigation.The AD method of AOSMA is then used to adjust the location for the next iteration and is depicted as shown in Equation (44).
Surprisingly, the suggested AOSMA improves the efficiency of SMA by using an AD technique to determine if OBL is required along the search trajectory.

Metaheuristic Optimization Algorithms for Learning Mlp
In the literature, many metaheuristic methods have been proposed to develop the MLP network in the training phase.SMA, ALO, WOA and AOSMA metaheuristic methods are among those that are widely used with success.The successful application of these methods to benchmark functions and real-world problems in the literature has motivated the selection of the methods.In the training phase of MLP, metaheuristic optimization methods are used to determine the bias and weight values that make up the network connections.Four methods are used to find the optimal set of bias and weight values.There is no accepted equation in the literature for selecting the number of hidden nodes.In this study, it was obtained using the following equation: Here, d is the number of data features, and m is the number of neurons.The n value, that is, the total weight and bias value, was calculated using the equation below.
Search agents commonly found in metaheuristic optimization methods represent a vector with n floating-point numbers.The flow chart of the proposed methods is demonstrated in Figure 3.The use of metaheuristic methods in the training phase of MLP generally covers four processes.First, initialization is initiated by specifying the MLP structure, such as the number of neurons (m) and the total weight and bias values (n).Then, the MLP network set-that is, the bias and weight values-are randomly generated.Then, the second step, the fitness evaluation step, is passed.In this step, the fitness value is calculated.For the fitness value, the fitness function must be selected.In this study, the MSE value was chosen, and its equation is given below.
, 14, x FOR PEER REVIEW 12 of 19 Here,   is the predictive value,   is the actual value, and  is the number of samples in the training set.In the third step, the update step, the best global fitness value, and personal fitness values are updated for each search agent.Finally, there is the termination step.The termination step is used to continue training the MLP until the maximum number of iterations is achieved.

Evaluation Metrics
Four different evaluation metrics, namely, R 2 , R, RMSE, and MAE, were used in this study.These metrics are widely used in the literature to compare the performances of the models proposed for predicting regression problems [40,49].Equations of evaluation metrics are given in Equations ( 48)- (51).Here, ŷi is the predictive value, y i is the actual value, and k is the number of samples in the training set.In the third step, the update step, the best global fitness value, and personal fitness values are updated for each search agent.Finally, there is the termination step.The termination step is used to continue training the MLP until the maximum number of iterations is achieved.

Evaluation Metrics
Four different evaluation metrics, namely, R 2 , R, RMSE, and MAE, were used in this study.These metrics are widely used in the literature to compare the performances of the models proposed for predicting regression problems [40,49].Equations of evaluation metrics are given in Equations ( 48)- (51).

Normalization
In this study, min-max [0, 1] normalization was applied to the dataset.The min-max normalization equation is given in Equation (52).

Results
In this study, the reservoir temperature (RT) was predicted using several approaches: an MLP trained with a classical optimization method, MLPs trained with three distinct metaheuristic methods, and the AOSMA-MLP, which was proposed for the first time.The dataset comprised 161 samples, encompassing hydrogeochemical data and RTs from geothermal resources across various regions Anatolia, Turkey.Understanding RTs is essential for determining the most effective use of geothermal resources, whether for direct heating applications or electricity generation, depending on the RT.The dataset was divided into training and test sets, constituting 80% (128 samples) and 20% (33 samples) of the data, respectively.This division ensured consistency across the four models proposed in the study.The metaheuristic methods employed were the whale optimization algorithm (WOA), ant lion optimizer (ALO), slime mould algorithm (SMA), and the newly proposed adaptive opposition-based slime mould algorithm (AOSMA).Characteristics of the MLPs trained using these metaheuristic optimization methods are detailed in Table 2, including the number of hidden neurons (HNO), which was kept consistent across all models.For the classical optimization-based training of MLP, the one-step secant backpropagation method was utilized.Table 2 outlines various parameters, including the number of attributes (NA), samples (NS), training samples (NTRS), test samples (NTS), hidden neurons (HNO), dimension (Dim), weight (W), bias (B), and neural network structure (NNS).Additionally, Table 3 lists the parameters of the employed metaheuristic optimization methods, with the maximum number of iterations and the number of search agents standardized at 200 and 30, respectively, to facilitate equal evaluation conditions across all methods.The training durations for the metaheuristic optimization methods, namely, ALO-MLP, WOA-MLP, SMA-MLP, and AOSMA-MLP, were recorded as 13.07, 8.06, 8.17, and 8.26 min, respectively, highlighting the efficiency and potential applicability of these advanced computational techniques in geothermal resource evaluation.

Discussion
To assess the effectiveness of the models proposed in this study, four widely recognized evaluation metrics were employed: R-squared (R 2 ), correlation coefficient (R), root mean square error (RMSE), and mean absolute error (MAE).The comparative results of the four models are systematically presented in Table 4, with the most favorable outcomes highlighted for clarity.Upon a comprehensive review of Table 4, the AOSMA-MLP model surpasses its counterparts across all evaluated metrics, establishing its superiority and effectiveness in predicting the reservoir temperatures (RTs) of geothermal resources.This comparative analysis underscores the potential of the AOSMA-MLP approach as a more accurate and reliable method for RT prediction in geothermal studies.In the study conducted by Tut Hakkidir, the RT value was predicted using linear regression, a linear support vector machine, and a deep neural network (DNN).A total of 83 different datasets were used in the study, and the best result was obtained in DNN.DNN achieved an MAE value of 6.45 and an RMSE value of 8.29 [12].In the study conducted by Bemah et al., the RT value was estimated using natural gradient boosting (NGB), extreme learning machine, group method of data handling, generalized regression neural network, and back propagation neural network methods.A total of 83 different datasets were used in the study, and the best result was obtained with the NGB method.The NGB MAE was calculated at 3.97, RMSE at 4.59, and R 2 at 0.9959 [50].In another study by Quan et al., the RT value was estimated using ANN, support vector regression genetic algorithm SVR, and improved support vector machine (M-GASVR) methods.The M-GASVR method yielded the best results in the study.The M-GASVR was calculated as MAE 0.45, RMSE 0.556, and R 2 0.903 [51].Perez-Zarate and colleagues conducted a study using different ANN models to predict the RT value.In the study, the ANN model that gave the best results was calculated as MAE 18.32, RMSE 26.4971, and R 0.7165 [24].
Figure 4 compares predicted and actual reservoir temperatures (RTs) using four distinct models.Figure 4 shows that the multilayer perceptron (MLP) trained via the adaptive opposition-based slime mould algorithm (AOSMA) yields predictions that are significantly closer to actual values compared to other models.Notably, at index numbers 1, 15, 17, and 28, AOSMA-MLP demonstrates remarkable accuracy, predicting values that closely mirror the true RTs.The ability to accurately predict RTs from the hydrogeochemical properties of geothermal resources signifies a substantial advancement.This approach mitigates the drawbacks associated with traditional geological studies, which are often time-consuming, expensive, and reliant on specialized equipment.Consequently, the financial burden on geothermal energy projects is lessened, offering a considerable advantage to investors.Moreover, this predictive capability enhances flexibility in feasibility assessments for engineers and experts engaged in geothermal energy projects.The proposed models not only aid in determining the potential applications of geothermal waters by preemptively identifying RTs but also serve as a decision-support system, enabling the selection of the most suitable options for exploiting geothermal resources.

Conclusions
In this study, the adaptive opposition-based slime mould algorithm (AOSMA) was innovatively applied during the training phase of the multilayer perceptron (MLP) for the first time.This novel approach was specifically tailored for predicting reservoir temperatures (RTs) and was benchmarked against a conventional first-order optimization technique, one-stage secant backpropagation, and three distinct stochastic metaheuristic optimization methods.The metaheuristic techniques compared included the whale optimization algorithm (WOA), ant lion optimizer (ALO), and slime mould algorithm (SMA), all of which are extensively recognized in the literature.Key findings from this comparative analysis are as follows:

•
The AOSMA-MLP demonstrated superior performance relative to the other metaheuristic optimization algorithms tested.By leveraging AOSMA for ANN training with hydrogeochemical and RT data derived from geothermal sources, it effectively addressed common limitations of alternative methods, such as susceptibility to local minima and constraints on global exploration capabilities.

•
Across the board, AOSMA-MLP showcased a distinct advantage over competing methods across the four different evaluation metrics employed in this study.This underscores its efficacy and robustness in predicting RTs.

•
The promising outcomes achieved with AOSMA-MLP indicate its potential applicability across a broad spectrum of regression problems, extending beyond the scope of this study.

•
The application of the AOSMA-MLP model for predicting RTs in geothermal resources is projected to significantly aid engineers and project planners in identifying optimal drilling locations.Given the typically time-intensive, expensive, and complex nature of such determinations, this model can substantially reduce The ability to accurately predict RTs from the hydrogeochemical properties of geothermal resources signifies a substantial advancement.This approach mitigates the drawbacks associated with traditional geological studies, which are often time-consuming, expensive, and reliant on specialized equipment.Consequently, the financial burden on geothermal energy projects is lessened, offering a considerable advantage to investors.Moreover, this predictive capability enhances flexibility in feasibility assessments for engineers and experts engaged in geothermal energy projects.The proposed models not only aid in determining the potential applications of geothermal waters by preemptively identifying RTs but also serve as a decision-support system, enabling the selection of the most suitable options for exploiting geothermal resources.

Conclusions
In this study, the adaptive opposition-based slime mould algorithm (AOSMA) was innovatively applied during the training phase of the multilayer perceptron (MLP) for the first time.This novel approach was specifically tailored for predicting reservoir temperatures (RTs) and was benchmarked against a conventional first-order optimization technique, one-stage secant backpropagation, and three distinct stochastic metaheuristic optimization methods.The metaheuristic techniques compared included the whale optimization algorithm (WOA), ant lion optimizer (ALO), and slime mould algorithm (SMA), all of which are extensively recognized in the literature.Key findings from this comparative analysis are as follows: • The AOSMA-MLP demonstrated superior performance relative to the other metaheuristic optimization algorithms tested.By leveraging AOSMA for ANN training with hydrogeochemical and RT data derived from geothermal sources, it effectively addressed common limitations of alternative methods, such as susceptibility to local minima and constraints on global exploration capabilities.
• Across the board, AOSMA-MLP showcased a distinct advantage over competing methods across the four different evaluation metrics employed in this study.This underscores its efficacy and robustness in predicting RTs.

•
In terms of accuracy of fit to the data, the AOSMA-MLP algorithm performed better than the ANN, WOA-MLP, ALO-MLP, and SMA-MLP approaches by 18.76%, 9.65%, 5.16%, and 7.03%, respectively.• The promising outcomes achieved with AOSMA-MLP indicate its potential applicabil- ity across a broad spectrum of regression problems, extending beyond the scope of this study.• The AOSMA-MLP model demonstrated a significant reduction in prediction error, showing improvements of 27.56%, 18.46%, 11.65%, and 14.75% over the ANN, WOA-MLP, ALO-MLP, and SMA-MLP algorithms, respectively.• The application of the AOSMA-MLP model for predicting RTs in geothermal resources is projected to significantly aid engineers and project planners in identifying optimal drilling locations.Given the typically time-intensive, expensive, and complex nature of such determinations, this model can substantially reduce project costs and enhance flexibility within the investment and design phases of geothermal energy projects.

•
Overall, the introduction and application of AOSMA-MLP represent a significant advancement in geothermal energy research, offering practical benefits for the planning and execution of geothermal projects.

Figure 1 .
Figure 1.Input and output parameters used in modeling.

Figure 1 .
Figure 1.Input and output parameters used in modeling.

Figure 2 .
Figure 2. (a) One single neuron and (b) Single hidden layer MLP network.

Figure 2 .
Figure 2. (a) One single neuron and (b) Single hidden layer MLP network.

Figure 3 .
Figure 3. Flow chart of the metaheuristic learning algorithm.

Figure 3 .
Figure 3. Flow chart of the metaheuristic learning algorithm.
Appl.Sci.2024, 14, x FOR PEER REVIEW 15 of 19 MLP, underscoring its superior performance in forecasting RTs based on the hydrogeochemical characteristics of geothermal resources.

Further
insight is provided by scatter plots depicted in Figure5.This graphical representation reinforces the accuracy of AOSMA-MLP, showcasing its predictions in close alignment with real RT values.The scatter plots vividly illustrate the precision of AOSMA-MLP, underscoring its superior performance in forecasting RTs based on the hydrogeochemical characteristics of geothermal resources.Appl.Sci.2024, 14, x FOR PEER REVIEW 16 of 19

Table 1 .
Range of hydrogeochemical and RT dataset.

Table 2 .
Properties of the MLP.

Table 3 .
The parameters of the metaheuristic optimization methods.