*2.2. Firefly Algorithm (FFA)*

The mechanism of FFA is based on the nature of the firefly (flashing behavior). This algorithm is applied during the training phase to select the best set of data. This model depends on three basic principles:


Thus, the objective function of the FFA model is introduced by the intensity of the light produced by, and brightness of, the firefly. The following equations present the intensity (I) and attractiveness, respectively [14,15]:

$$I = I\_0 \varepsilon^{-\gamma r^2} \tag{1}$$

$$w(r) = w\_0 e^{-\gamma r^2} \tag{2}$$

where *r* is the distance between fireflies, *I*<sup>0</sup> is light intensity, *w*<sup>0</sup> is attractiveness at *r* = 0 distance, and *γ* is the light absorption coefficient. β and α are the attraction and movement co-efficient. α, β, and *γ* are required to be adjusted by trial and error, in order to integrate the ANFIS model with the FFA [14].

#### *2.3. Genetic Algorithm (ANFIS–GA)*

This model is highly useful for evapotranspiration calculations. The genetic algorithm (GA) is based on the characters of natural genetics and its selection system. GA includes three major stages: (1) population initialization, (2) GA operators, and (3) evaluation [11]. This system can solve large space problems efficiently and optimize complicated functions. Any hybrid model (hybrid ANFIS) can optimize the MF by using GA. This fuzzy-genetic algorithm has a potential to minimize model errors [11]. The development begins from the population of random chromosomes, thus generating form. In each generation, the fitness of the whole population is estimated. Then, based on the fitness, multiple chromosomes are stochastically adopted from the current population and adjusted by utilizing genetic operators, such as crossover and mutation, to create a new population. The current population is applied in the following iteration of the algorithm [10].
