1 Introduction

Nature-inspired designs and optimization algorithms are based on chemical, physical, and biological systems and swarm intelligence. Swarm intelligence is sub-categorized into chemistry-based, physics-based and bio-inspired algorithms (BIAs) [1]. The study is situated in the broader context of precision farming, bio-inspired/nature-inspired designs, and the use of IoT systems in precision agriculture to improve crop yields, optimize the use of agricultural resources (water, land, agrochemicals, and fertilizer), and improve efficiency in the supply chain (sorting of fruits) using HIS, HSV, and RGB color spaces [2,3,4]. The review of the BIA focused on all four sub-categories of IoT services, including ubiquitous, collaborative-aware, information aggregation, and identity-related services [5]. The broad focus was validated by the mixed narratives concerning the need to integrate BIAs in precision agriculture. On the one hand, the proponents argue that BIAs are integral to the operation of IoT and precision agriculture systems and infrastructure [3, 6, 7]. On the other hand, critics argued that further research was necessary before the widescale deployment of BIAs due to the variable accuracy, precision, errors, cost of installation, and limited commercial applications [8,9,10,11]. The two worldviews were explored in the review article.

The development of BIAs is not a new phenomenon considering that Huang et al. traced it back to the 1940s [8]. The historical account provided by Huang et al. was corroborated by Macaulay et al. [12], who noted that biological systems/models inspired the earliest computer innovations in the 1940s. Despite the early and dominant influence of BIAs in agriculture, they were disregarded in the following decades; it was not until the last decade that there has been renewed interest in the adoption of BIAs in big data-related applications [12] and commercial agriculture [13,14,15]. The renewed interest in BIAs can be partly attributed to the tremendous surge in the number of neurons, layers, and complexity of the deep learning techniques [8, 16]. The review article synthesized the published studies on BIAs, with an emphasis on the four major groups (ecological, swarm-intelligence-based, ecology-based, and multi-objective) and their applications [6, 17,18,19]. The review builds on Torre-Bastida et al. [16] and Huang's [8] research on applying BIAs innovations suitable for agriculture [8]. The outcomes drawn from the review would positively impact future research and the development of advanced algorithms for agriculture.

The inquiry focused on BIAs in agriculture, particularly signal and image processing, power systems, system identification, scheduling problems, robotic bees flight, agricultural machinery path planning, optimization, and parameter optimization, which are considered representative applications of the algorithms [20]. Significant research has been dedicated to advancing BIAs by incorporating AI and machine learning. Machine learning in BIAs enables farmers to analyze large volumes of data and obtain quick and reliable information in real-time [4]. On average, it takes about 1–5 min for algorithms to compute and provide comprehensive information [21]. The timeframe is dependent on the computation system capabilities and the tasks to be executed [16, 22,23,24]. The performance of hybrid algorithms in terms of the computation speed is presented in Fig. 1. The graph demonstrated an inconsistent relationship between the path length/path optimization, choice of the algorithm, and computational time. The GA-PSO and PSO had comparable path lengths and computational windows [25]. The HPSO-GWA-EA was ranked the best in terms of the computation speed—a factor that reinforces the need for hybrid algorithms compared to single alternative algorithms. The case for the HPSO-GWA-EA algorithm advanced by Gul et al. [25] was in line with Singh and Singh [26], who noted that a hybrid HPSO-GWA algorithm performed better considering there was a diminished chance of falling into local optima, and the global search ability was enhanced.

Fig. 1
figure 1

Computation speeds of different hybrid algorithms [25]

The short computation time justifies the choice of BIAs in agricultural product quality analysis, fault prediction, image recognition, pest identification, fruit quality analysis, and fraud detection [4]. The broad application of IoT, deep learning (DL), machine learning (ML), and artificial intelligence (AI) in agriculture can be partly linked to technological advances in computing and the widespread use of graphical user interfaces ideal for computational modeling in smart farms, healthcare, and manufacturing. The suitability of GPUs for a broad range of applications was reinforced by their many processor cores, parallel processing capacity (enhanced by the compute unified device architecture (CUDA) programming language by NVIDIA), and superior performance relative to the CPUs [4]. The link between the innovations in GPUs and the growing demand for BIAs advanced by [4] was corroborated by Arenas et al., who noted that swarm intelligence algorithms based on GPUs were highly effective in agricultural applications [27]. Novel applications helped developers to reduce the computational window and integrate new features.

According to Patrício and Reider, the GPUs had promising applications in the agricultural domain [4]. For example, the predictive models, ML, and DL necessary for the automation of farm machinery were impossible to achieve without the higher processing capabilities of GPUs [4]. The outlook advanced by Patrício and Reider was partly in line with NVIDIA’s internal report, which noted that GPU-based AI systems in agriculture had a positive social impact [28]. According to the report, notable applications of GPU systems in agriculture included mitigation of groundwater contamination by pesticides and fertilizers, citrus greening, and prevention of termite infestation (particularly varroa mites which compromise the growth of honey bees) [28]. Even though NVIDIA’s internal report and Patrício and Reider [4] focused on the positive aspects of GPU systems in agricultural applications, the researcher noted that the demerits were underemphasized despite their influence on the performance of the algorithms. The researcher's concerns were consistent with Rouhipour et al. [29]. The latter noted that even though GPU'S multi-core processors enabled the parallelization of computation, the basic computer architecture is serialized, limiting models' scaling up and applying BIAs in real-world situations [29]. Following the appraisal of the arguments made by NVIDIA and Patrício and Reider [4] and Rouhipour et al. [29]. On the other hand, the case for GPU systems and BIAs outweighed the reservations made. The argument is further supported by the progress made by Beeswise startup company, which used GPU-supported deep learning to enhance hive design and computer vision to identify termite infestation [29]. Additionally, GPUs have proven useful in PSOA, where they facilitated the resolution of complex optimization solutions [25]; this had direct benefits in smart greenhouse management.

Apart from the GPUs, high-performance computations such as OpenMP and MPIs were suitable replacements for CPUs as long as the computational requirements were satisfactory [30]. Researchers forecast that the new computing hardware would have a disruptive impact on the traditional industries in agriculture [4]; this would have a beneficial impact on agricultural production. On the downside, the purchase and operation of GPUs were cost-intensive, creating a need for affordable cloud computing solutions instead [31]. Darwish [32] and Amudha et al. [33] documented the successful development of the grey wolf algorithm, moth flame, chicken swarm, elephant search, whale optimization, whale optimization, fruit fly and spider web algorithms, swarm and the genetic bee colony optimization, algorithms inspired by nature. In particular, the genetic algorithm was aligned with Darwin’s theory of evolution and Mendel’s genetic theory, which informed the science of genetic inheritance [34]. According to the latter theory, genes were paired, and each dominant or recessive pair was drawn from the parents [35]. The extent to which these factors predicted the quality of the offspring remains unknown.

Beyond genetics, Aghelpour et al. explored the fusion between bio-inspired optimization algorithms with the Adaptive Neuro-Fuzzy Inference System (ANFIS), which led to the development of a robust system for drought prediction [36]. The models developed from the bio-inspired systems had a prediction accuracy of 43–46% [36]. The usefulness of a bioinspired intelligent algorithm (BIA) for agricultural and non-agricultural applications depends on computation strategy. The computational scheme should be simple and user-friendly while maintaining maximum levels of flexibility in the environment [37]. The need for flexibility in operations is premised on the fact that the operation of drones is often resource-constrained, and it is necessary to deploy/scalable network coordination techniques to achieve greater efficiency [38]. Recent case studies in the agricultural sector reported tangible benefits with the use of bio-inspired designs.

Hi et al. [37] noted that the incorporation of the algorithms helped to reduce the cost of the calculations, improved the accuracy of the measurements, and minimized the local minimum problem; this was evident in the optimization of the grid integrated renewable energy [39], intelligent allocation of water resources in multi-reservoir systems [40], optimization of the agricultural machinery path planning [41, 42], and detection of disease infestation in plant leaves [43, 44]. The suitability of all BIAs in optimizing IoT systems in agriculture is constrained by the complexity and uncertainty of ubiquitous IoT services. The uncertainty is amplified by the number of dynamic and heterogeneous links [5]. Even though the existing class of algorithms was effective, the shortcomings must be addressed. For example, there was no universal algorithm; different algorithms performed different functions based on the desired parameters (see Table 1) [45]. Additionally, BIAs introduce new cyber-security, data integrity, and confidentiality concerns [16]. The role of BIAs in cyber attacks on farms is highlighted in Sect. 4.1.

Table 1 BIAs, applications, and core parameters [45]

1.1 Context

The review focused on the role of algorithms in biomimetic innovations in agriculture. As of 2022, extensive research has been conducted on BIAs for agriculture and related applications [19]; this includes Flockstream—a bio-inspired model that enables flock to aggregate into a swarm [46]; bio-inspired hybridization of artificial neural networks (ANN) [47], and computing optimization algorithms (GA/GS-SVM) for optimized processes such as earthworm, root tree, plant growth, and regeneration optimization [48]. BIAs are part of the IoT systems intelligence decision supporting system for agriculture [49], which encompass smart sensors, wireless communication systems [50, 51], ground-based AGV (automated guided vehicles), and UAVs [52]. The development of new BIAs was key to the industry growth of IoT systems in agriculture.

The market for IoT systems has increased in the past decade, recording a cumulative average growth rate (CAGR) of 9.8% in 2021, and the aggregate value was projected to exceed $18 billion by 2026 [53]. Other studies estimate that the actual contribution to the global GDP would be $1.5 trillion [54]. However, the achievement of the projected growth would depend on resolving the existing barriers to market adoption. At present, there has been limited adoption of BIAs in agriculture beyond the prediction of rice growth rates [6], the direction of artificial bees [19], the scheduling of agricultural production [18], crop yield, and assessment of fruit quality [55,56,57]. Despite the immense potential of BIAs [18, 46,47,48,49], there are practical constraints to widespread use in agriculture. For example, Sarkar et al. [48] noted it was challenging to establish an appropriate fitness function for better performance. Other challenges are enumerated in Sect. 2.

1.2 Background on Bio-inspired Innovations in Agriculture

As noted in the preceding section, the development of BIAs was not new early iterations were released in the 1940s [8], but progress was intermittent. Moreover, the investments in BIAs have been concentrated in developed countries; this is evident from the case studies in precision agriculture [7, 58,59,60,61]. A majority of the developing nations in Africa and Asia have been lagging, except for South Africa. The use of a decision optimization framework to optimize the sugarcane harvest rate in Kwa Zulu Natal, South Africa, was a case in point [62]. The genetic algorithm employed in the study reduced the computational period by more than 95%, which, in turn, translated to faster solution searching and optimization of the sugarcane yield.

The outcomes of the KwaZulu Natal project [62] were comparable to another project in Okinawa, Japan, which employed a hybrid genetic algorithm and simulated algorithm to predict the sugarcane crop growth cycle [63]. Each algorithm had a unique function—the GA was employed to optimize the priority list scheduling while the simulated annealing enabled optimal resource assignment [63]. The findings formed the basis for the long-term cropping schedule in spring, summer, and winter [63]. Nonetheless, there were issues of concern from the Japan case study. First, the computational time should be optimized; although it was within the allowable range, it could be enhanced via parallel computing. Second, researchers should explore fast convergence methods, including edge recombination crossover and sub-tour exchange crossover as substitutes for one-point order crossover. Optimal performance was hindered by premature convergence and sub-optimal hill-climbing [63]. The mixed performance documented in the South Africa and Japan case studies raises pertinent questions on the suitability of the genetic algorithm in precision agriculture. Despite the shortcomings, the genetic algorithms were preferred in the scheduling of agricultural products, food processing, renewable energy conversion, crop pest classification, and estimation of the rate of evapotranspiration [10, 18, 44, 48, 64, 65]. Based on these findings, the benefits of the algorithm outweighed the shortcomings of the GA.

The research and development of intelligent systems in agriculture were interlinked with the transition from heuristic, meta-heuristic, and hyper-heuristic BIAs (see Fig. 2) [10]. Greater emphasis was placed on meta-heuristic swarm intelligence and ecology algorithms in place of hyper-heuristics because the latter had not gained sufficient traction in the agricultural sector. Ashrafi [40] and Moazenzadeh and Mohammadi [66] had documented cases where meta-heuristic algorithms were employed in agriculture-related applications such as soil temperature testing and allocation of water from reservoirs.

Fig. 2
figure 2

Transition from heuristic, meta-heuristic, and hyper-heuristic BIAs with time [10]

Short-term and long-term cost savings have informed the use of smart systems. For example, intelligent decision support systems could save farmers about $500/acre [67]. The cost savings are a critical incentive considering that the installation of IoT infrastructure is cost-intensive from an energy and resource perspective. For example, Canakci et al. estimated that the cost of energy consumed by intelligent systems in farms could surpass 65,891.5–151,220.6$ per year [68]. Excessive energy use has negative environmental consequences because most energy sources in farms have a high carbon footprint [69, 70]. Moreover, the transition towards renewable energy (wind, solar and geothermal) in commercial farms was slow [71, 72], and the alternative measures such as GPS guidance systems and auto-steering systems did not yield a significant reduction in machine time and fossil fuel consumption [70]. For example, a 5% reduction in fuel use translated to 1647–1866 L of fuel or US$734 and US$851 [70]. Intelligent IoT systems with BIAs can enable smart farms to achieve better energy savings [64, 73]. The need to invest in alternative and effective energy-saving systems was justified by the growth in the precision agriculture market and the adverse effect of CO2 pollution on farming, given it exacerbated climate change.

Beyond the projected cost-benefits, other factors catalyzed the adoption of intelligent systems and algorithms; these include global population growth, urbanization, climate change, and food insecurity [74,75,76]. Both Sivakumar [74] and Lal [77] concur that climate change has triggered desertification, which in turn caused poor crop yields. The growth of urban areas has contributed to the depletion of fertile agricultural lands [78], while excessive use of herbicides and pesticides was a risk factor for agrochemical resistance [79]. The problem would be exacerbated by global population growth, estimated to surpass 11 billion people by the end of the twenty-first century [80]. Beyond population growth and pesticide resistance, the effective management of agricultural resources such as land and water for irrigation was a concern due to climate change.

As a result of pesticide resistance, farmers in the US must spend an additional $11 billion annually to manage pests and diseases in farmlands. The additional costs attributed to climate change demonstrated the need for intelligent interventions for precision farming, including the autonomous application of pesticides using robots and UAVs [81, 82]. The use of IoT in agriculture offers tangible benefits that might help mitigate the impact of global population growth, urbanization, climate change, and food insecurity on the cost of agricultural production.

There has been a growing demand for bio-inspired swarming-based control algorithms for specific applications, including controlling the movement of swarm robots; this is crucial in the herding of flocks [15]. The innovations have been commercialized by Arugga AI Farming [83], Boston Dynamics [84], and Bird Gard Australia [85], among others. Specific applications of BIAs include gene-expression programming, regression algorithm, and ANN to predict the rate of rice growth [6]. The choice of the ANN algorithms by Liu et al. [6] was in agreement with Khairunniza-Bejo [56], who recommended the use of ANN in predicting and forecasting nonlinear physical series (such as soil parameters and crop yields), which cannot be accurately determined using linear predictors [56]. The observations made by Liu et al. and Khairunniza-Bejo [56] justify the use of ANN in precision agriculture because the performance and prediction accuracy were superior, especially in the determination of quantitative parameters.

A comparison of the three models of simulations demonstrates that each was a perfect fit; this is illustrated by the R2 values, which are close to unity [6] (see Table 2). Bio-inspired systems in crop production monitoring were not unique to rice. Gao et al. [17] demonstrated the utility of the systems in monitoring crop evapotranspiration, an important metric for nutrient absorption, growth, and yield.

Table 2 Three models of gene expression programming (GEP), ANN, and regression algorithm (REG) for predicting and optimizing rice production [6]

Nature remains a primary source of motivation for humans in the development of advanced agricultural technologies; this was evident from the development of robot bees which mimic natural bees' flapping wings, natural sounds, and behaviors [86, 87], and soft robots that are touch-sensitive as the human hand. Such capabilities are essential in weeding, irrigation, fruit picking, and seeding [88,89,90]. The use of BIA in agriculture has the potential to limit waste and eliminate human errors, leading to better efficiency; this was demonstrated by using algorithms to measure the acidity of Fuji apples and the use of GA to monitor environmental conditions in farms [57, 91]. The potential areas of application in precision agriculture are unlimited.

Despite the immense potential of biomimetic innovations, widespread commercial adoption was impeded by limited models of biological phenomena (not all biological phenomena can be modeled) [92] and the need to integrate architecture into the biological processes, simulate the point's fitness, and develop models that achieve the desired biological function. The challenges enumerated by Hanif et al. [92] were corroborated by Sarkar et al. [48]. Beyond the critical observations made by Sarkar et al. [48] and Hanif et al. [92], the review was influenced by contrasting evidence on the benefits of robotic and IoT systems operated using algorithms. For example, there is widespread support for robot bees, given they are more resilient than natural bees, manual pollination, and flowers [83]. The natural pollination process has been impacted by anthropogenic activities—a problem that could be potentially resolved by robot bees capable of improving the value of bee pollination, which was about $29 billion [93]. From another perspective, postharvest processing of fruits and vegetables could be improved by the demonstrated effectiveness of FPA in soil moisture prediction [55] and metaheuristics in fruit quality analysis [91]. The automated detection of different fruit qualities is important in food factory processing and grading. Better efficiency would translate to better cost savings for farmers. The major types of BIAs were reviewed under.

2 Basic Principles During the Development and Assessment of Soft Computing Models

In this section a detailed and in-depth discussion will be presented regarding the basic principles which should be followed during the training and development as well as the assesment of soft computing models such as metaheuristic and bioinspired intelligent algorithms. Specifically, in the next two subsections (i) the basic principles about the compilation of the database used for the training and development of surrogate soft computing models, and (ii) a short literature review on performance indices for the assessment of computational models are presented.

2.1 Basic Principles During the Compilation of Database

Main target during the training and development phase of a mathematical simulant with aim the prediction of the value of a parameter depending on a number of other parameters, is the degree that the proposed mathematical simulant is reliable and stable/robust. To this direction the majority of researchers gives particular attention and diligence to the computational techniques and methods that shall employ for its development, while at the same time they do not exercise the same attention and diligence with respect to the database that shall be used for the training of the ANN. The authors of the present study consider that the reliability of a mathematical simulant depends primarily from the reliability and effective is the database that shall be used. With term reliable and effective we do not mean a database with a large amount of data. Reliable and effective is considered a database with its data considered to be ‘true’ and covering statistically all the range of values capable of taking every of the parameters that are infringing to each particular case studied problem.

The above have even greater value when the database is comprised from experimental and not analytical results. In the case where the database is comprised from experimental data their reliability is effected from a multitude of factors as they are:

  1. i.

    The strict adherence to the international standards that are intended for the preparation of the specimens/samples as well as the conduct of the experimental tests-laboratory measurements.

  2. ii.

    The observance of the number of specimens with the same characteristics that must be checked.

  3. iii.

    The reliability of the experimental layout that was used.

  4. iv.

    The experience and specialization of the personnel that conducted the aforementioned tests.

  5. v.

    The environmental conditions in which the aforementioned specimens were maintained as well the environmental conditions of the surroundings where the aforementioned tests were conducted,

  6. vi.

    Additionally, data which for some of its parameters exhibit values with great deviations from the mean value of the respective parameter, ought not to be included in the database. Also data that increase much the reference space without continuity between them must be avoided

  7. vii.

    Databases comprised from experimental data often are characterized from the presence of superfluous and especially noisy data which instead of adding knowledge for each time studied problem introduce on the contrary ambiguities and uncertainties knows with the term ‘noise’. This may be due to errors that occurred during data collection as contamination in laboratory specimens or failure during the conduct of laboratory measurements. It is the case when equipment and tools used in everyday practice often produce noisy experimental data. The algorithms of machine learning have been used with success in analyzing data that incorporate noise. Despite that may algorithms in machine learning can deal with noise, the localization and the denoising from the totality of training data can help in the induction of the target-hypothesis. The last two decades there have been proposed a multitude of computational techniques for the preprocessing, the detection and the denoising of uncertain data. Among the first proposals they are the statistical mathematical simulants that were deemed reliable and stable especially in the case of one-dimensional data sets [94].

  8. viii.

    Among the main disadvantages of these techniques is the assumption that the data distribution is known in advance, something not true for the most problems of applied sciences. Main position among the detection techniques and denoising on datasets of the databases have the clustering methods [95, 96]. According to these methods, small groups of data interspersed among the real data, are considered probable noise. Finally, a third and widely accepted technique of noise detection are based on the distance exhibited by isolated data in relation to the whole of data and so called distance-based techniques [97,98,99].

The observance requirement of the above rules is considered particularly imperative when the experimental database is comprised from experimental data that are produced from diverse laboratories and diverse research groups.

At this point it is worth writing a comment for the necessity the database to be included as supplementary material in the publications. The authors consider it necessary because without this the check of reliability of the findings of a publication is considered impossible, where there is use of soft computing techniques for the estimation of the value of a parameter in terms of a number of other parameters that are so called input parameters.

So not only it is considered necessary the integration of the database in the publication but it is much more considered necessary to have clear distinction which of the data in the database have been used for the training of the computational simulant (training datasets) and which have been used for the testing of that (testing datasets). It is also necessary to be described thoroughlly the manner in which the data were split into data in training and testing datasets so that there is assurance for the representation and proportionality in both individual databases. Furthermore, the minimum and maximum values of each one from the input parameters define the limitations of the trained, developed and proposed soft computing model. Each proposed model is reliable and robust for input parameters values between their minimum and maximum values based on the database used for the training.

2.2 Performance Indices and Principles for the Assessement of Soft Computing Models

For the evaluation of the effectiveness of the computational models there have been proposed a multitude of statistical mainly indices, and among them main position beacause of wide acceptance [100,101,102,103,104,105,106,107,108,109,110,111,112,113,114], have indices that are presented in Table 3.

Table 3 Statistical performance indices

Dominant position as the Pearson among them has the Pearson correlation coefficient. The majority of the researchers use this index for the evaliuation of the performance of the computational models.

Nevertheless thiw index exhibits the disadvantage that there must be taken into account for the evaluation of the effectiveness of a computational model not only its value but the inclination of the respective line of this.

Indicatively there is referred the case of a mathematical simulant which is described by an equation \(y=a\) where a a constant value.That is it consists of an equation with zero inclination where for every set of data it predicts the same value a. For this to the mathematical simulant corresponds a value of Pearson correlation coefficient equal to 1 which is the ideal value.

To the direction of formulating a simple, effective index which also incorporates a physical meaning easily understandable there was proposed recently [115, 116] the index a20-index (last equation at Table 3) which has lately initiated to be widely acceptable by researchers [103, 104, 117,118,119,120,121,122]. Additionally this index defines the percentage of data for which it is achieved prediction with devaiation less than 20% from the predicted value. It is worth noting that depending on the nature of the problem this percentage can be defined less than 20% (5% or 10%).

The indices above are used where the estimated-predicted value takes real values on a domain of definition of this which is defined by the minimum and maximum value it can take.

However there are problems where the estimated value does not take real values but simply defnes discrete states in which the classification problems fall. Indicatively we enumerate

  1. (i)

    The classical problem from the medicinal discipline where the sought is the formulation of a mathematical simulant that for a multitude of parameters as the values of hematological indices to estimate the outcome of the disease of a patient with respect to an illness. That is if he shall be sick or not for which the estimated parameter takes two values and it is a binary valued problem, and

  2. (ii)

    The frequently encountered problem in mechanics if a series of parameters that describe the studied problem we have stability or not of the structure or more generally of some system.

For the above classification problems there are used the indices presented in Table 4 which have become widely accepted in literature [123,124,125,126].

Table 4 Statistical performance indices for the assement of classification problems

3 Types of BIAs

The information presented in this section focused on the application of bio and nature-inspired algorithms in agriculture. The algorithms are the engine that drives biomimetic innovations, such as soft robots for harvesting and swarms robotics for pollination and herd management [127]. The scope is justified by gaps and recent research on bio-inspired innovations in agriculture [127]. As noted in the introduction, BIAs were classified into four primary groups, namely ecological, swarm-intelligence-based, ecology-based, and multi-objective. Each of these classifications has multiple subclasses, as shown in Fig. 3. The algorithm classification scheme proposed by Fan et al. [19] was in line with Cai et al. [49], Wang et al. [1], and Liu et al. [6], among other scholars. According to the standardized classification scheme, the BIAs are grouped into particle swarm, fish swarm, artificial bee, ant colony, and genetic algorithms [19]. Other algorithms, such as the firefly and Cuckoo, were reviewed briefly because their use is not well established in the precision farming industry.

Fig. 3
figure 3

Classification of BIAs [19]

The choice of the different classes of BIAs was dependent on the intended agricultural application; for example, the swarm intelligence-based algorithms were best suited for bacterial foraging optimization, intelligent water drops, foraging and flocking ant colonies and artificial bee colonization, and artificial immune system [19]. The benefits and limitations of each class of BIAs, research and development, and prospects are reviewed in the following subsections.

3.1 Ecological BIAs for Agriculture

As noted in the preceding sections, ecological and BIAs for agriculture were integral to optimizing smart farms and other intelligent infrastructure in modern farms. Specific examples include bio-inspired ANFIS-ACO (ANFIS merged with Ant Colony Optimization), ANFIS-GA (ANFIS merged with Genetic Algorithm), and ANFIS-PSO systems that predicted drought severity and frequency [7]. The three additional models were created by merging ant colony optimization and genetic algorithm optimization [36]. The system was proven useful in estimating the drought severity. On the downside, the accuracy levels were below 50% (43–46%) [36]; this reinforced the need to revise the existing class of BIAs to achieve greater accuracy. The low accuracy of the bio-inspired ANFIS algorithm did not predict the general trends in the industry. Ewees and Sahlol demonstrated it was possible to train neural networks to achieve an accuracy of 93–96% [128]. Similar to Ewees and School [128], other studies achieved an accuracy level of 99% using GA-based convolutional neural networks (CNNs) in resolving image classification problems (see Fig. 4) [44]. The model correctly identified more than 12 different pests/insect species on leaves. The high classification accuracy of the CNN-GA algorithm exceeded the GA ensemble model. Nonetheless, the reliability of the prediction was dependent on the dataset (D0, IP102, and SMALL) and the CNN model (Xception, MobileNet, GG-16, VGG-19, and Inception-V3) [44]. The observations in the former study were in line with Karar et al. [31], who relied on the public IP102 dataset to identify pests using BIAs. The dataset was preferred in most studies because it had more than 75,000 images of more than 100 pests [31]. Beyond pests, a classification accuracy of 94% was documented with the ANN-ABCOA classifier and ANN-PSOA classifiers [31]. In cases where the accuracy levels exceeded 90%, the algorithm was ideal for commercial deployment; this is because there was a lower margin of error that could be offset using metaheuristics and other interventions. On the downside, the reliance on public datasets such as IP102 could be a challenge in isolated cases, such as farms with pests that have not been cataloged in the public databases. However, considering that such scenarios were rare, the data in the public databases will suffice in the short term.

Fig. 4
figure 4

Image classification accuracy of different GA-CNN models [44]

The higher classification accuracy using the information in the public databases was correlated with the transfer functions, the number of neurons per hidden layer, backpropagating learning functions, weight learning functions, and selection criteria [2]. The role of the listed confounding factors on pest detection using algorithms cannot be negated. For example, accurate detection was influenced by other externalities such as the morphological changes in the life cycle of insects [31, 44]. Most insects undergo metamorphosis within a short timeframe, making it difficult for the algorithms to monitor each pest effectively. Apart from the space available in the cloud computing servers and the metamorphosis of the insects, the accuracy varied across different insect species. For example, the precision was 0.00% for the red spider mites using the back-propagation neural network [31]; this contrasts with 0.82% for aphids and flea beetles using the same model. The accuracy was user using the R-CNN algorithm, which had precision and recalls ability of 100% for the red spider mites and aphids [31]. The problem is further amplified by the inadequate space in the cloud hosting servers, limiting the amount of comparative data available.

Beyond predicting drought and crop pests, the ecological BIAs can help reduce the strain on environmental resources caused by excessive fertilizer and water scarcity and land use [129]. Sajith et al. demonstrated that BIAs such as PTMApp, ACPF, and EPIC-APEX integrated with GIS models were a catalyst for agricultural land use optimization, given the algorithms were capable of drawing cause and effect relationships between hydrological resources and the land-use decisions and biophysical parameters [129]. The observations made by Sajith et al. [129] agreed with Wu et al. [65] and Roy et al. [9], who relied on the BIAs to monitor crop evapotranspiration rates in different environmental conditions. The observations made by Wu et al. [65] and Roy et al. [9] concerning BIAs in land use optimization were corroborated by Memmah et al. [130], who relied on the ant colony optimization algorithm in biodiversity protection, environmental protection, and determining the viability of agricultural systems.

In contrast to Sajith et al. [129], Kaim et al. [131] explored the use of qualitative, quantitative, and hybrid multicriteria decision analysis (MCDA) to solve complex land-use problems. The case for MCDA was grounded on empirical data—the MCDA approached the problem more realistically compared to single-objective systems in land use allocation. Land-use allocation is sophisticated, considering there are competing and complex objectives that must be taken into account [131]. The arguments made by Kaim et al. [131] regarding the shortcomings of single-objective systems were consistent with Hemeida et al. [132], who conducted an in-depth review of the merits and demerits of single-objective systems. The core disadvantages included the need for advanced classification for better interpretation of the models, the inability to accurately determine the cost for the ANN structure, and poor performance analysis and comparison [132]. The shortcomings of the single-objective algorithms justified the emphasis on the multi-objective algorithms in precision agriculture. The fundamental applications of swarm-intelligence algorithms are reviewed in Sect. 2.2.

3.2 Swarm-Intelligence-Based BIAs for Agriculture

Swarm intelligence-based BIAs include the ant colony optimization, artificial fish swarm, bacterial foraging, particle swarm optimization algorithms (which draws inspiration from multiple species (animals, insects, and even humans), and the artificial bee colony (ABC), flower pollination algorithm (FPA), firefly algorithm, Krill herd algorithm, and genetic optimization algorithms [20]. The focus on specific insects (ants and bees) is validated by the shared behavioral representations (mating, complex social hierarchies, hunting, and foraging) [2, 133, 134]. Such behaviors provide attractive and diverse bio-inspired insights that can be applied to develop algorithms [135]. For example, foraging among ants is guided by pheromones, and the algorithms can mimic these patterns using artificial pheromones; this is particularly important in the mapping of agricultural field operations and resolution of optimization problems [10, 136]. The specific case studies drawn from the agricultural sector are discussed in the next sections to demonstrate the practical benefits and limitations and areas of improvement; this information is integral to optimizing intelligent technologies in agriculture.

3.2.1 Ant Colony Optimization Algorithm (ACOA)

The ACOA was released into the market in 1992. However, at the time, the scope was limited to optimizing operational problems [137], making it incompatible with the unique needs of precision agriculture. On a positive note, the shortcomings were resolved over time. For example, the recent iterations transformed ACOA into one of the most versatile swarm-intelligence-based algorithms with a broad array of agricultural applications owing to the desirable pheromone smoothing approaches, evaporation, and aging [19]. The principle has broad application in agriculture, food processing [48], smart energy management [73], and engineering [1, 138]. The system is grounded on the principle that ants in nature tend to follow the shortest path while moving forward [19]; this helps to prevent any possibility of stagnation from the starting point to the endpoint (source of food) and back. In a natural environment, the ant colony has an army of workers that randomly scouts for food and leave a pheromone trail to be followed. In cases when there are two trails to the food source, the ants will naturally follow the shortest path to reduce the time taken to find food [139,140,141]. The ability to find the shortest path translates to time and resource maximization in farms and better production efficiency.

Using a similar approach, the ant colony swarm intelligence BIA for agriculture relies on artificial ants, which create a path through a series of nodes and problem spaces, and the achievement of specific objectives through the shortest path possible [19, 45, 48]. The principle has been proven effective in enabling farmers to allocate specific assignments to agricultural machinery. Recently, a pilot project was conducted at the Zhuozhou Experimental farm using the algorithm, and the task assignment model was optimized using MATLAB [142]. The ant colony algorithm yielded the following benefits. First, the mechanical equipment in the farms was able to take the shortest path possible—the length of the route taken by the grain and harvester transporters was reduced by 22–52% [142]. Second, the performance of the ACOA was superior to the evolutionary hybrid neighborhood search algorithm, whose application resulted in an 11% reduction in the non-working distance traveled by the agricultural machinery [143]. However, the performance of the ACOA was comparable to the model predictive control methods used in path planning [144]. The lower performance shows that the ACOA was best suited for agricultural route planning. The case for ACOA optimized with MATLAB was reinforced by the 37–67% reduction in the operational cycles [142]. Such improvements in performance had a net positive impact on operational costs considering that longer paths for combined harvesters translated to higher operating costs.

The inadequate performance of ACOA in isolation was corroborated by data drawn from a comparative study, which compared the performance of Hierarchy/hybrid particle swarm optimization (HPSO)-Grey wolf optimizer (GWO)–evolutionary algorithm (EA), direct artificial bee colony (DABC), hybrid cuckoo search-Bat algorithm (CS-BA), particle swarm optimization (PSO), and whale optimization algorithm (MWOA) (see Table 5) [25]. The comparative data demonstrated that the HPSO-GWO-EA algorithm was the fastest (computation time = 3.303 min). On the contrary, the DABC was the slowest (computation time = 6.506 min) [25]. On a positive note, the computational time did not directly impact the path length. The path length was variable.

Table 5 Comparison of different BIAs (GA-PSOA, MWOA, CS-BA, DABC, HPSO-GWO-EA) in path planning, fitness, and computational time [25]

The HPSO-GWO-EA had the shortest computation time and path length. On the other hand, GA-PSO provided the longest path length even though the computation time was shorter than the DABC algorithm. The patterns delineated by Gul et al. contrast with Kong et al. [62] and Wu et al. [65], whose findings suggested that hybrid algorithms were more effective compared to individual algorithms in the performance of complex tasks (monitoring evapotranspiration and plant growth). The inconsistencies across different studies should be addressed in future research to catalyze commercial adoption. At present, the development of metaheuristic algorithms is not a panacea because the computing time is dependent on the complexity of the problem and parameters [145]. Moreover, the polynomial-time-bounded computations for complex problems did not offer any performance guarantees.

In theory, the lack of performance guarantees was an issue of concern because commercial farm operations must be grounded on the precise use of specific parameters to achieve the desired outcomes [18, 26, 145]. The use of PSOA in scheduling agricultural products was a case in point [18]. From an abstract point of view, it would be challenging to encourage commercial farms to adapt algorithms for autonomous regulation of humidity, temperature, water, pesticides, and fertilizer application if the performance is not guaranteed. The KwaZulu Natal case study reviewed in the preceding sections was characterized by tangible outcomes and performance guarantees of GA. The decision optimization framework reduced the computational time by 95% [62].

The optimization of route planning was an enabler for precision agriculture because core activities such as harvesting, soil treatment, watering, fertilizer application seeding, and other managed tasks were performed by agricultural machines [143]. The evidence drawn from the ZhuoZhou experimental farm was corroborated by Bakhtiari et al., who noted that the ant colony algorithm-based B-patterns minimizes operational costs (fuel consumed by agricultural equipment, non-working distance traveled, and operational time) [136]. The cost savings reported by Bakhtiari et al. [136] agreed with Hou et al. [139], who relied on ant colony optimization in agricultural machinery rental optimization. According to the data depicted in Table 6, the use of the ant colony (ABCO) algorithm was correlated with a higher quality of service value. The value was higher than the max–min ant system (MMAS), artificial bee colony (ABC), and the genetic algorithm. The observations drawn from the latter study affirm the superiority of the ant colony algorithm [139]. The positive observations drawn from the two research studies yielded compelling evidence that the ant colony algorithm was an effective and practical meta-heuristic algorithm. Despite the benefits drawn from the case studies [142], the feasibility of the ant colony approach was constrained by the risk of stagnation.

Table 6 Optimal quality of fitness value of different algorithms [139]

A fundamental question is why the adoption of the ant colony algorithms has remained low despite the numerous benefits and potentially wide range of applications in agriculture (farm machinery optimization, scheduling, and vehicle routing). Various worldviews have been advanced to explain the phenomena, including issues relating to the convergence speed, exploitation rate, and stagnation phase [146]. In contrast to Mulani et al. [146], other studies suggested that the limited adoption of the ant colony algorithm was attributed to the uncertainty about time convergence, the algorithm has to be modeled using experimental data rather than theoretical/modeling simulations, random decisions define the sequences, and the probability of distribution varies by iteration [140]. The need for reliable experimental data was a challenge considering that the ant colony algorithm was ranked as one of the newest algorithms, given it was first developed in the 1990s [8, 16, 19, 32, 130]. On a positive note, various strategies have been proposed to offset the challenge, including the mitigation stagnation approach and other issues through the NP-Hard or Combinatorial problem. It is possible to achieve optimal combinations and integrate alternative algorithms [140, 146, 147].

The third school of thought suggested that the phenomena could be due to the availability of alternative and highly effective algorithms such as the particle swarm optimization algorithm [146]. After considering the different arguments made to explain the phenomena, the shortcomings should not impede the use of ant colony optimization in agriculture, given that significant cost savings in machine optimization were achieved despite sub-optimal stagnation phase, exploitation, and exploration phases [16, 19, 140]. The positive outlook is further reinforced by the utility of the ant colony algorithm in energy optimization in smart sensor networks [148]. On the downside, the worldviews advanced by the researcher were not supported by market data in Europe, Asia, the Americas, Africa, and Oceania. Most of the studies were based on pilot data, which might vary significantly compared to real-world scenarios. The utility of the ABC, artificial fish swarm, bacterial foraging, and particle swarm optimization algorithms BIAs is reviewed in the next subsections.

3.2.2 Genetic Algorithm in Agriculture

The GAOA algorithm was developed in 1975 by Holland and other researchers at the University of Michigan [149]. Further improvements were made by Goldberg in 1989 [150]. GA was inspired by chromosomes and genes, containing critical information describing various parameters and problems involving insect movement, animals, chemical reactions, physical processes, and chemical reactions that transcend swarm and evolutionary domains [150]. The broad spectrum provides unique capabilities compared to other swarm intelligence algorithms; this explains why GA is considered the “root of the nature-inspired optimization family algorithms” [150]. The fitness value of the i-th individual in a genetic algorithm is predicted by Eq. 1 [48], where h and hi represent the desired value and the functional value input for population m [48].

$${fit}_{i}=\frac{1}{1+\left|h-{h}_{i}\right|}$$
(1)

One of the core aspects of the BIA was the selection process, which involved the transfer of chromosomes from one generation to the next in line with the generational survival laws [13, 151,152,153]. Recently, researchers have documented a wide array of applications using genetic algorithms. On the downside, there is no consensus on whether GAOA functioned best in isolation or as part of a hybrid system. For example, employed the ANN-GAOA algorithm to predict the plant transpiration rates. At the same time, Kong et al. used a hybrid algorithm (GA and simulated annealing) to monitor sugarcane growth with a 95% accuracy [62]. Similar to Kong et al. [62], Wu et al. [65] used a hybrid algorithm featuring ELM and GA, CSOA, and ACOA to predict evapotranspiration. The hybrid algorithm was less impacted by climatic variations in China.

The case for the hybrid model with GAOA is reinforced by the higher accuracy and advanced computing capabilities. Nonetheless, there are cases when GAOA has been employed in isolation. For example, Gupta et al. compared the efficiency and precision of plant physiology-inspired genetic algorithm and firefly algorithm optimizer [154]. The GA had a greater accuracy and precision speed and accuracy. The observations made by Gupta et al. were corroborated by Tropea et al., who relied on the algorithm to perform pheromone optimization [13], while Sarkar et al. noted that GAOA was appropriate for multi-object optimization and single machine resource utilization [48]. Even though there was consensus among scholars on the benefits of GAOA in agriculture, widespread utilization was constrained by the following factors. First, the optimal performance of the genetic algorithm depends on the accurate representation of research problems [155]; this means that the algorithm will not perform as desired if the candidate solution is not specified using an appropriate language. Moreover, the algorithm is not flexible enough to accept random changes. Other pertinent issues of concern include determining the optimal fitness, which is a prerequisite for determining the optimal solution to the problem [155]. Lack of expertise or inadequate computational capacity increases the probability of choosing the wrong fitness function—a phenomenon that might introduce new complications, which might compromise the utility of the algorithm in pest management, scheduling of agricultural products, path optimization, and pest monitoring. The case for GA was reinforced in multiple research studies; it was among the best BIAs for agricultural applications.

3.2.3 Artificial Fish Swarm Optimization Algorithms (FSOA) and Particle Swarm Optimization Algorithms (PSOA)

FSOA was inspired by the schooling behavior of natural fish (searching, following, and feeding), and various iterations have been developed to achieve global optimization (see Fig. 5) [156]. Tsai and Lin [156] noted that FSOA could achieve a broad array of functions through optimization of key parameters with particle swarm algorithm; this has been demonstrated in industrial processes and water resource optimization [156,157,158]. The body of knowledge on artificial fish swarm optimization algorithms in agriculture is limited to water utilization, fish farming, land use optimization, and related applications [158, 159]. Both Liu et al. [158] and Gao et al. [159] concurred that the fish swarm algorithm could handle complex mathematical problems in water resource use optimization. The easy mathematical function validated the case for FSOA, ease of comprehension (there is no need for complex mathematical sophistication, and exploitation of the group of functions under each vector). However, FSOA does not hold the monopoly in water use optimization, given that similar benefits were reported using PSOA [22]. In the latter case, the researchers observed that the PSOA offered practical benefits in the irrigation canal system delivery schedule, especially when the discharge intervals were uneven.

Fig. 5
figure 5

Unique characteristics of FSOA [156]

From a theoretical point of view, PSOA is superior relative to FSOA in all dimensions; this partly explains why the algorithm was ranked highly in terms of effectiveness and efficiency in resolving engineering and science problems [156]. The case for PSOA is premised on the fact that most operations are grounded on intelligence with fast particle transfer speeds, and there are no mutation and overlapping calculations. Preliminary data drawn from experiments show that PSOA was better than FSOA because it was modeled on a population and revised often until the objective was achieved [153]. Moreover, it does not draw inspiration from one species but a group of species, including human social behavior, swarms of bees, schools of fish, and flocks of birds [153]. The multi-dimensional biological inspiration offers unique benefits relative to FSOA, bee, and artificial bee optimization algorithms influenced by one species.

The case for PSOA in agriculture was affirmed by Coelho et al. [160], who recommended the deployment of the more robust PSOA in place of FSOA; this is because the latter was capable of achieving a wide range of functions, including the optimization of the greenhouse air temperature. The arguments made by Coelho et al. [160] were in line with Hasni et al. [161], who noted that it was possible to optimize the ventilation in greenhouses by minimizing the cost function. The case for PSOA advanced by Hasni et al. [161] contrasts with Filip et al. [41], who argued that robot route planning was compromised by insufficient convergence. The technical constraints of the algorithms are amenable. Hybrid PSOA performed better compared to an ant colony, ABC, and other meta-heuristic algorithms in the scheduling of agricultural products [18]. The observation was in line with those who merged the ACOA, GA, and PSOA algorithms and ANFIS models to predict drought and enhance the performance of the neuro-fuzzy approaches [7]. The algorithms quantified the risk of drought using the average precipitation index and Palmer Drought Severity Index (PDSI) [7]. Nonetheless, further research is necessary to determine whether PSOA was better compared to simulated annealing. This technique could maintain canal delivery at optimal capacity without exceeding the predefined threshold [22]. The issue should be addressed in future studies.

3.2.4 Bacterial Foraging Optimization Algorithms (BFOA)

The BFOA was designed to mimic the foraging behavior of natural bacteria (especially Escherichia coli), which focuses on energy optimization in the search process [162]. The algorithm is aligned with three fundamental processes, primarily elimination-dispersal, reproduction, and chemotaxis [163]. The utility of BFOA in agricultural image processing could be inferred from published research, which suggested that BFOA could complement other algorithms in farms, including GA and ACOA; this is because the algorithm has been proven extremely effective in enhancing machine learning capabilities, agricultural machine/vehicle routing, image processing, dynamic environment optimization, and PID controller design [164]. The potential applications can be enhanced under a hyper-algorithm scenario where BFOA is paired with other swarm intelligence algorithms. However, not all scholars support the commercial utilization of BFOA. On the downside, Chen et al. [165] argued the utility of the algorithm was constrained by the "poor convergence behavior over complex optimization problems" (p. 1). Such concerns were in line with Chen and Zhang, who investigated the potential application of BFOA in the kernel extreme learning machine [166]. The shortcomings of BFOA were compounded by the local optima and fixed step length. However, poor convergence was not a challenge unique to BFOA but all swarm intelligence-based algorithms, as noted by Nayyar et al. [42], Tang et al. [20], and Fan et al. [19]. The criticism of the BFOA by Chen et al. and Chen and Zhang contrasts with other studies, arguing that BFOA demonstrated superior performance to GA and PSOA [167]. The mixed narratives in literature directly impact the application of the algorithm because there was no universal consensus on commercial applications in agriculture.

Despite the mixed evidence, the real-life application of BFOA in image processing was an indication that it could be utilized on the farms to identify pests and guide the precise application of fertilizers [1, 4, 31, 88, 151, 168, 169]. Apart from image processing, BFOA can be integrated into ANN to perform a wide array of functions, including communication between different sensors and IoT systems in smart farms. The algorithm's utility can be enhanced by integrating with the GA algorithm to form BFOA-GA, which has greater capabilities relative to the BFOA in isolation. The case for BFOA-GA was demonstrated by Sarkar et al. [48]. The study noted that the hyper BFOA-GA algorithm had been employed in multiple real-life scenarios and achieved optimal results. The practical constraints of the BFOA algorithm informed the investigation of the artificial bee colony algorithm in the next section.

3.2.5 Artificial Bee Colony Optimization Algorithm (ABCOA)

The ABCOA is bio-inspired, and the system mimics the behavior of natural bees (scouts, onlookers, and the workers) and how they search for food and nectar [19]. Each class of bees serves a specific function. For example, the scouts primarily identify the food sources, who, in turn, relay the information to the worker bees and the onlookers. The criteria used by the onlooker bee to optimize the selection process are illustrated in Eq. 2; where pi denotes the food source, the fit is the fitness value for the solution I, and SN is the number of food sources available [20, 42].

$$Pi= \frac{{fit}_{i}}{{\sum }_{q=1}^{SN}{fit}_{i}}$$
(2)

The model employed by the natural bees enables the onlookers and workers to evaluate the suitability of the food source and the optimization of the nectar selection process [134, 170,171,172]. The ant bee colony optimization algorithm has been proven useful in a wide array of agricultural applications such as optimized data aggregation for IoT devices [172], numerical optimization, evapotranspiration monitoring [65], and zoning of protected ecological areas [143, 170]. Wu et al. noted that the ABCOA-ANN model yielded the best results in predicting the evapotranspiration rates. The level of accuracy was better than the alternative standard back-propagation and Levenberg–Marquardt (LM) optimized with ANN. However, the accuracy of the ABCOA-ANN model was comparable to the ANN-genetic algorithm; this means that either can be deployed to monitor the evapotranspiration rates [65]. On the downside, not all scholars subscribe to the arguments made by Wu et al. [65], contrasting with Roy et al. [9], who argued that the performance of the FA algorithm was comparable to the classical and non-bio-inspired GD-LSE-ANFIS algorithm. The latter observations seem to indicate that bio-inspiration had negligible benefits—a narrative that is not consistent with the body of knowledge on bio-inspired systems in farms [10, 38, 64, 66, 128].

Recent studies have also demonstrated the algorithm could augment ant colony’s application in land use optimization and prediction of crop prices [134, 171]. The reliability of the forecast data provided by the artificial bee colony algorithm was corroborated by forecasting models such as Support Vector Regression (SVR), ARIMA, and LSTM (see Table 7) [134]. Similar to [134], Moazenzadeh and Babak Mohammadi supported using the SVR model in agricultural-related applications [66]. The comparative data demonstrated the utility and efficacy of artificial bee colonies. The data presented in Table 6 demonstrated that commercial farms and smallholder farmers could accurately estimate the price of agricultural produce using the artificial bee colony algorithm. A key drawback of the model was its inability to exploit numerical optimization. The practical solutions to this issue are reviewed in the next section.

Table 7 Pearson correlation statistics comparing the forecasting by artificial bee colonies versus ARIMA and LSTM forecasting models, among other models [134]

The accurate estimation of the commodity prices would help guarantee profits and reduce postharvest losses, leading to better productivity on farms. However, there are inherent challenges associated with the system that guided the development of parameter adaptive artificial bee colony [170, 173] and dynamic artificial bee-ant colony algorithm [139]. The iterations made in the artificial bee colony had practical benefits in agriculture; this was evident from the optimized performance of the algorithms in machinery rental optimization by Hou et al. [139], and optimization of agricultural efficiency [18, 170] and the management of swarm robotic bees [86, 174, 175]. Both Tang et al. [20] and Nayyar et al. [42] affirmed that the ABC algorithm was best suited for mapping the robot path. However, the application of the algorithm in robotic path planning yielded mixed outcomes.

On the one hand, Nayyar et al. [42] observed that even though the ABCOA algorithm was better than existing alternatives, especially in exploring feasible searches, multiple constraints offset the benefits, including the convergence of the systems and stagnation, and poor exploitation. A modified ABCOA algorithm was developed based on the Arrhenius equation to mitigate these challenges [42]. The improved ABCOA algorithm provided the best routes for robotic path planning.

On the other hand, Tang et al. [20] claimed that the primary drawback of the ABCOA algorithm was the assumption that the artificial bees could only move in a straight direction to the nectar sources; straight movements reduce the area of explored zones. Similar to Nayyar et al. [42], Tang et al. [20] recommended the adoption of discrete binary ABCOA algorithms, including the Guest-guided algorithm, which disregarded the maximum cycle numbers in favor of the maximum fitness values. The results drawn from the latter were superior. In cases where the modified/improved ABCOA algorithm was less suited, the firefly algorithm with TOPSIS techniques was deployed, and their utility was demonstrated by Micale et al. [176]. The latter study demonstrated that the firefly-TOPSIS system was equally effective in optimizing path planning in logistics. The patterns can be applied to the agricultural sector, where vehicle routing challenges have profound economic and environmental effects. The flexibility of the ABCOA algorithm makes it an ideal alternative to the ant colony optimization algorithm. The practical benefits of artificial bee colony algorithms validate the transition from agriculture 3.0 to 4.0 and 5.0, guided by precision farming technologies and IoT [177,178,179]. The utility of the Cuckoo, Firefly, and Krill algorithms is reviewed in the next section.

3.2.6 Cuckoo, Firefly, and Krill Herd Algorithms

The Cuckoo, firefly, and Krill herd BIAs are briefly reviewed in this section because they augmented the existing smart and intelligent systems in farms. The firefly algorithm is grounded on the social behavior of fireflies and bears semblance to the PSOA, which implements changes starting from an initial population [14]. The firefly algorithm has been applied to different engineering problems in agriculture, including the optimization of water resource use [14], vehicle routing/path planning [176], photovoltaic thermal greenhouse system, and biogas heating [180]. For example, the firefly algorithm paired with the SVM model (FA-SVM) provided accurate soil temperature measurements in a pilot project in Iran [66]. The comparison data drawn from the Krill Herd algorithm coupled with the SVM model (KHA-SVM) yielded similar findings at depths of 5–100 cm, thus validating the suitability of the former [66]. The soil measurements offered benefits to farms, given higher temperatures were less suitable for optimal crop growth.

The need to couple machine learning models with BIAs was supported by the prediction accuracy of the models and forecasting ability [65]. In line with this worldview, Gao et al. noted that the Cuckoo search optimization algorithm (CSOA) helped farmers monitor the evapotranspiration rate of crops. The assessment of the evapotranspiration rates was important because it predicted water loss depending on the ecological and hydrological processes [17]. However, not all scholars support the use of ML models—Karar et al. argued that deep learning solutions were more effective relative to ML inaccurate identification of crop pests [31].

Using this information, farmers can employ IoT systems to balance the sensible and latent heat fluxes, schedule irrigation, and optimize the water requirements in precision agriculture [17]. The case for BIAs for evapotranspiration monitoring was in line with those that relied on a broad array of algorithms, including the CSOA, ACOA, and genetic algorithms, whose operations were optimized using the extreme learning machine (ELM) models [65]. In theory, the ELM model was better relative to the gene expression, FFNN, and ANN because it was compatible with nearly all BIAs (see Fig. 6). Beyond compatibility, the ELM algorithm was appropriate because it led to better visualization of the output results. Enhancing visualization using ELM is critical because it influences a user's cognitive assimilation of the information and the subsequent choice of ad-hoc techniques and tools [16]. Additionally, it offered greater generalization capability and rapid learning efficiency [65]. On the downside, not all scholars support the deployment of ELM. For example, Gao et al. [17] claimed that the ANN model yielded reliable results (better estimates) than the ELM and other models in quantifying evapotranspiration rates in Saudi Arabia. The geography-specific variations show that the performance of the BIA can be influenced by local expertise, customization to address specific needs, and weather patterns. The potential influence of weather changes on algorithm accuracy was highlighted by Aogo et al.’s research [181], which affirmed that weather shocks predicted the evapotranspiration and precipitation rates.

Fig. 6
figure 6

Optimization of the BIAs with ELM [65]

The latter study illustrates that the monitoring of the evapotranspiration rate was not unique to the Cuckoo algorithm [65]. The function can be performed by a wide array of algorithms such as ELM with flower pollination algorithm, ELM with ACOA, and ELM with GA. Even though the observations made by Wu et al. [65] corroborate Gao et al. [17], there were notable differences in the capabilities of the algorithms. The statistical findings presented in Table 7 show that each of the five algorithms was effective in predicting the average evapotranspiration rates in the meteorological stations—the MAE, RSME, NRMSE, and R2 values (0.089–0.288 mm/day, 0.071–0.199 mm/day, 3.29–11.77%, and 0.98–0.99, respectively) affirm the reliability of the models in the testing, validation and training phases (see Table 8) [65].

Table 8 Evapotranspiration statistical data for the ELM with flower pollination algorithm, ELM with ACOA, and ELM with GA [65]

The R2 values close to one indicate that the regression model was a good fit for the data. The cross-validation approach affirmed the suitability and reliability of the BIAs. On the downside, cost and technical expertise were major drawbacks, especially among smallholder farmers with limited resources [182]. The concerns raised by Kendall et al. [182] were corroborated by a UNDP report [11], which argued that smallholder farmers lacked resources. Access to smart farming technologies was impeded by information inaccessibility and power structures, among other asymmetries in the market. The UNDP report and insights provided by Kendall et al. [182] underscored the need to resolve the existing market barriers to enhance the adoption of BIAs in smallholder farms.

3.3 Ecology-Based BIAs for Agriculture

The ecology-based algorithms for agriculture include invasive weed optimization algorithm (IWOA), flower pollination, bean optimization algorithms, forest optimization algorithms, plant growth algorithms, natural forest regeneration algorithms, sapling growth, runner-rot, rooted treat, root growth, plant strawberry, seed-based plant propagation, natural forest regeneration, and paddy field algorithm [16, 19, 20, 45, 135]. However, the scope of this inquiry is centered on invasive weed and root growth algorithms because they have a broad array of practical applications in agriculture. The area covered by weeds has a defined number of problem solutions that depends on the number of weeds present [165]. The invasive weed optimization algorithm (IWOA) mimics the spread of invasive weed species, which spread rapidly through the farms [19]. The weed population is initialized before optimization—the proliferation of the weeds depends on the weed fitness value.

Once the population of weeds surpasses the preset maximum value, the weaker weeds are removed/culled from the population; this means the number of weed seeds is a factor of the fitness value and the floor/area available for weed proliferation. Even though the use of invasive weed algorithms is promising, there are certain issues of concern, including the initialization of the hyper-parameters to the required before the commencement of the iterative process. If this process is not initiated, the algorithm “will converge to a local minimum or a never converge” [19] (p. 621). The highlighted concerns should be addressed to facilitate the widespread use of the IWOA. Despite the concerns, successful case studies have been documented in the literature. For example, IWOA optimized water reservoir operations, leading to higher water and energy savings [183]. The performance of IWOA in reservoir optimization was comparable to the genetic algorithm nonlinear programming [183]. Another study deduced that the IWOA algorithm enabled B-spline curve fitting in computer modeling [184]. The case for multi-objective and BIAs in agriculture was reviewed in the next sections.

3.4 Multi-objective BIAs (MOBio-IA) for Agriculture

The mobile-IA are a unique class of algorithms that complement the swarm intelligence algorithm, especially when multiple conflicting objectives must be optimized simultaneously [5]. According to Yang et al. [5], both swarm and evolutionary algorithms had sufficient capabilities to address complex optimization challenges in dynamic environments. This narrative was corroborated by Oliveira et al. [60]. The current body of knowledge affirmed that evolutionary computation and swarm intelligence were powerful methods to solve optimization problems in dynamic environments [18]. On the downside, the simultaneous optimization and resolution of dynamic multi-objective problems remain a challenge considering the risk of errors, heterogeneous resources, and variations in the computational window for various tasks.

The mobile-IA integrates different algorithms that can perform distinct objective functions such as LINGO (search results clustering algorithms), social spider algorithms, and ACOA for water demand minimization and net return maximization in four different scenarios. ACOA was deployed to determine the pheromone intensity, number of ants, and the value of the pheromones [60]. Each of the four scenarios envisaged by [60] had unique crop combinations (paddy, maize, cotton, green gram, groundnut, sugarcane, black gram, red gram, and gingelly), land under cultivation, and water requirements [59]. In other cases, multi-objective particle swarm optimization (MOPSO) was used to identify the best IP for network-on-chip operations [185]. In contrast, the firefly optimization algorithm was effective in water optimization [14]. The utility of different algorithms in multi-objective problems was beneficial, given the choice of one set of algorithms over another in dynamic optimization problems involved a tradeoff between performance, accuracy, and computational time [22, 149, 186, 187]. The algorithms' effectiveness in optimizing the desired function could be attributed to their unique capabilities, including the ability to promote the non-dominated solution evolution using the weighted aggregated cost function and we [60]. Based on the latter account, MOBio-IA helped resolve conflicting objectives, especially in greenhouses (smart regulation of humidity, temperature, water, pesticides, and fertilizer application). The shortcomings of the MOBio-IA justified the need for evolutionary BIAs in land crop management, allocation and utilization, pesticide application, machinery path planning and optimization, and monitoring of the evapotranspiration rates.

3.5 Evolutionary Programming BIAs (EPA) and Applications in Agriculture

The evolutionary programming algorithms (EPA) are useful in precision agriculture because of the following reasons. First, they can be easily embedded into existing simulation models [188]. Second, EPA is population-based and can easily find globally optimal solutions, and are applicable to continuous and discrete decision variables [155, 188]. The search behavior can be customized to satisfy the condition of the problem under consideration, such as pest management, visual identification of weeds, land use management, water resource maximization, and fertilizer application. The ability to find the optimal global solution could be attributed to the use of a large search party that is able to scan and cover large search spaces effectively relative to a single search party [183]. The illustration in Fig. 7 shows the performance of EPA with an initial population and final population. The case for EPA in precision agriculture that was advanced by Maier et al. was in agreement with Naser [189], who observed adaptive learning in EPAs for optimal analysis of the inputs and the target outputs. Oliveira et al.’s research validated the use of EPAs in greenhouse control [60]. Nonetheless, the evidence in support of EPA presented by Maier et al. [188], Oliveira et al. [60], and Naser [189] must be weighed against the shortcomings of EPA compared to the BIAs to determine the most suitable algorithm for agricultural applications.

Fig. 7
figure 7

Performance of an evolutionary algorithm. a The initial population of randomly placed solutions, b evolving solutions, c convergence of solutions at the global optimum [158]

Despite the unique capabilities of the EPAs, there were drawbacks to widespread integration in precision agriculture. For example, EPA’s computational efficiency was inadequate, there were multiple uncertainties in the computational process, and the adjustment of the solution behavior was problematic [188]. Even though various interventions have been proposed to mitigate uncertainty and computational inefficiency, the problem still persists in the various subclasses of evolutionary programming algorithms (EPA), including genetic programming, differential evolution, population-based incremental learning, evolutionary strategy, and evolutionary programming [60]. At present, there is no consensus on the ideal EPA classification scheme. On the one hand, Oliveira et al.’s classification [60] considered EPA independent of GA. On the other hand, Tropea et al. noted that GA was under the swarm intelligence algorithm category [13]. There is a large body of knowledge supporting the latter worldview. For example, the link between GA ad EPA could be attributed to the comparable design features.

Fogel developed EPA as a complementary tool to GA in 1999. The only major distinction was that the latter functioned best with genotype while the former was suited for phenotype spaces. EPA relies on mutation operators but lacks crossover operators [25]. The discussion was biased towards the evolutionary programming algorithm (EPA), extensively employed in agriculture. For example, Sarker and Ray used the algorithm to develop a multi-objective crop planning system. In contrast, Gul et al. used EPA in conjunction with PSOA in agricultural machinery path planning [25]. Considering that EPA exhibited variable performance under different circumstances, its suitability is questionable. For example, Sarker and Ray noted that the EPA failed 69% of the time to find the correct solution to the mutation, crop choice, and sowing problems [190]. The failure rate was substantially higher relative to the multi-objective constrained algorithm (MCA), whose accuracy was > 90% [190]. The variable accuracy was not unique to EPA algorithms. The problem was also observed in swarm intelligence algorithms.

3.5.1 Specific Case Studies of Evolutionary Algorithms in Precision Agriculture

Case study data drawn from major economies justifies the development of BIAs for farms to manage energy consumption and automation of key farm machinery [58, 191]. A survey conducted in India by Singh et al. established that the differential EPA was ideal for predicting the prevalence of crop diseases, crop and seed parameters, and available pasture for cattle [191]. The findings documented by Singh et al. were in agreement with Shamshirband et al., who noted that EPA's variants, such as multi-objective genetic algorithm (MOGA), were suited for higher-dimensional problems, and noisy valuation functions and provided actionable data within a given timeline; this was critical to the management of energy use in watermelon production in Iran [169]. The most energy-intensive activities included fertilizer and agrochemical application, irrigation, and operation of farm equipment. Higher energy expenditure had direct implications on carbon emissions. Approximately 9,517 kg CO2 equivalent was generated during irrigation (> 70% of total emissions) [173]. The carbon emissions and energy expenditure demonstrated the environmental impact of watermelon production and the optimization of water and energy use to limit wastage. The fundamental observations made by Shamshirband et al. about the benefits of MOGA in agriculture were in agreement with Sarker and Ray, who compared the suitability of multi-objective EPAs, namely NSGA-II and multi-objective constrained algorithm (MCA) in crop planning models in Australia [190]. The observations drawn from the Australia case study validated the choice of MCDA by Kiam et al., who noted the NSGA II was capable of providing farmers with real-time and reliable data concerning water quality, water quantity, food crop production, and bioenergy generation in Central Germany [131]. The wide application of NSGA affirmed the suitability of the multi-objective algorithms. Such models help farmers mitigate the impact of weather conditions (such as rainfall and flooding) and the availability of agricultural inputs on crop production and yield. On the downside, the model parameters must be adjusted to suit local conditions, considering the regional variations in soil characteristics and land suitability for crop production. Newer variants of the EPAs have been developed, including the gravitational search optimization algorithm (GSOA), which draws inspiration from the Newtonian laws of motion and gravity [57]. The GSOA was considered ideal, given it helped to overcome stagnation in computations and optimization problems in agriculture.

The link between the use of EPA and cost savings in farms was affirmed by Oliveira et al., who developed EPA algorithms to maximize profits in greenhouse climate control [60]. In particular, the cost savings were achieved by transitioning from random-based initialization to informed initialization for better computational efficiency [60]. Additionally, two different algorithms were employed in the global and local searches, and heuristic rules were corporated. On the downside, there were practical constraints attributed to the discretization errors in discrete combinatorial optimization with genetic algorithms and additional clonal selection algorithms [184]. Other issues relate to the computational requirements, computational speed, and reliability of the data [143, 155, 190]. Considering the EPAs have been employed in a broad array of agricultural applications, including route planning/optimization, crop planning models, crop growth models, greenhouse automation, and robotic system operation [25, 60, 61, 143, 155, 190], the technical limitations of the algorithms were not a major impediment to commercial applications in the agriculture sector.

Despite the concerns raised, it was deduced that EPA and swarm intelligence algorithms were complementary. The complex computations in swarm intelligence and the EPA involved determining the fitness function of the identified problems (including energy use, irrigation requirements, pest management, machinery path optimization, drone flight path, pesticide use, and agrochemical application). On a positive note, identifying the fitness function in all cases was independent of the interprocess communication. The similarities between EPA and swarm intelligence algorithms were beneficial in commercial agriculture because both algorithms could be employed interchangeably to optimize the use of sporadically available and loosely coupled resources.

3.6 Bio-inspired Hyper Heuristic Algorithms in Agriculture

As noted in the preceding sections, bio-inspired hyperheuristics algorithms such as the artificial plant optimization algorithm (APOA), ABCOA, and ACOA, and flower pollination optimization algorithm (FPOA) contributed to the adoption of Io systems in precision agriculture. However, in most cases, single BIAs was ineffective, hence combining two or more algorithms to achieve the desired function. For example, Wu et al. used ACOA, ABCOA, CSOA, and APOA to optimize the evapotranspiration prediction rates [65]. Similarly, other studies relied on the combined performance of different algorithms. Combining different classical or meta-heuristic algorithms creates hybrid algorithms that exploit the synergistic benefits of unique algorithms to achieve better outcomes (see Fig. 8). For instance, the ABCOA and PSOA hybrid algorithms were ideal for measuring crop growth parameters [61]. On the contrary, Zhang et al. argued that the hybrid HPSOA-GWO algorithm was ideal for cluster optimization [192]. Using the hybrid algorithms in cluster optimization and monitoring the crop growth parameters could benefit precision agriculture.

Fig. 8
figure 8

Development of a hybrid algorithm via low-level hybridization, iteration-based hybridization, sub-population-based hybridization, and equation-based hybridization [192]

Despite the broad areas of potential application, the shortcomings of the individual algorithms were inherent in the hybrid systems, as noted by Zhang et al. [192]. The limitations of the individual algorithms include the poor-for-change strategy, low computational complexity, and high-level hybridization, which is considered less efficient relative to the high-level hybridization. However, not all scholars subscribed to Zhang et al.’s [192] pessimistic view of the hybrid algorithms. For example, Singh and Singh noted that the hybrid algorithms outperformed individual algorithms in several metrics, such as locating the global optimum, convergence speed, solution stability, solution quality, and computational time [26]. The observations made by Singh and Singh [26] were consistent with Ahmed et al.’s research on the performance of hybrid algorithms vis-à-vis individual algorithms [193]. The latter studies affirm the need for customized hybridization of algorithms to offset the constraints associated with individual algorithms. Hybridization integrates two algorithms minimizing the disadvantages of individual algorithms and optimizing the benefits [192]. For example, failure to solve complex matching problems and premature convergence were among the key shortcomings of ACOA and PSOA [194]. The disadvantages can be resolved using the imperialist competitive algorithms.

The demand for hybridized algorithms is projected to increase with the advances in science and technology and societal needs such as precision agriculture for better crop yields. The new applications will lead to greater computational and optimization problems that must be resolved to achieve the desired outcomes in precision agriculture. Hybridization of algorithms remains a viable option considering the traditional algorithms suffer from low computational speeds, which translates to poor performance. The shortcomings of the conventional algorithms can be addressed through the development of algorithms with advanced capabilities; this is a worldview supported by proponents of hybrid algorithms [26, 65, 192, 194], who advocated for the mass adoption of hybrid algorithms to resolve the optimization challenges. In light of these observations, hybrid algorithms would continue to hold great significance in precision agriculture because they had robustness and exhibited universality. The case for the heuristic and metaheuristic algorithms in agriculture is presented in the next sections.

3.7 Heuristic and Metaheuristic BIAs

According to Maier et al., metaheuristics featured high-level procedures that employed heuristics to find near-optimal solutions to complex optimization problems [188]. From an agricultural point of view, metaheuristics could facilitate the exploitation of existing environmental models and identify decision alternatives that provide a near-perfect tradeoff between the desired outcomes and the set of solutions [188]. A critical mass of the metaheuristics are bio-inspired, and metaphor inspired hence the term metaheuristics [30, 145, 188]. There are two major classes of metaheuristics—those that rely on population solutions (such as evolutionary algorithms) and those that do not. In line with Maier et al. [188], Hermida et al. [132] confirmed here were population-based and non-population-based EPAs. The population-based EPAs function best with operators in the ACOA, PSOA, GA, and firefly algorithms. The primary goal of the population-based algorithms was to establish the global optima by mimicking social behavior, evolutionary strategy, and information transition.

Past research confirmed the suitability of metaheuristics in the designs of water distribution systems in farms and long-term planning to satisfy local irrigation needs and mitigate climate change [188]. Additionally, Pourdarbani et al. relied on metaheuristics in the estimation of the acidity of Fuji apples [91]. The metaheuristic algorithms were employed in conjunction with NIR spectroscopy to calculate the titrable acidity and pH of the apples [91]. Similarly, the heuristic algorithms were efficient and flexible in farming-related applications; this worldview is corroborated by Dokeroglu et al. [30], who noted that hybrid metaheuristic algorithms offered better results than single metaheuristic algorithms. Even though the hyper metaheuristic algorithms were better than the individual algorithms, their performance cannot surpass the hyper-heuristic algorithms, which rely on advanced techniques to solve computational search problems. The ABCOA, PSOA, and CSOA hyperheuristic algorithms were better at prediction, optimization, and performance.

In contrast to the meta-heuristic systems, the hyper-heuristic systems integrate different approaches guided by an intelligent combination of different heuristic methods to address complex optimization problems [184]. Despite the benefits, the adoption rate in commercial agriculture has remained low compared to particle swarms, fish swarms, artificial bees, ant colonies, and genetic algorithms. Nonetheless, one cannot negate the immense benefits associated with the algorithms. For example, an AI-based APOA could diagnose crop diseases by monitoring physical changes in the infected crop leaves. The choice of APOA is supported by the high accuracy levels of > 95% [10]. In contrast, alternative classification algorithms are less accurate (78–91%) [10]. The variable accuracy levels suggest that APOA was better than the support vector machine, random forest, and convolution neural networks.

The observations made by Kar [10] were in agreement with Kumar et al., who noted that APOA yielded reliable information about crop health [43]. The latter study affirmed that the accuracy levels were above 95% [43]. The consistent and positive results in detecting infected leaves using APOA machine learning have practical implications in commercial farming, considering that climate change-related effects have led to higher pesticide resistance and excessive use of pesticides [195,196,198]. From another perspective, the transition from pesticides or non-application of pesticides was not feasible. Pests and diseases contributed to 20–40% of the crop damage [31]; this means metaheuristic algorithms would be continuously needed to guide robotic pesticide spray machines. Metaheuristic algorithms might optimize the spraying of herbicides, fungicides, and insecticides to minimize wastage [13]. Nonetheless, the benefits must be weighed against the drawbacks.

The existing class of metaheuristic algorithms requires continuous refinement, and there is a high probability of entrapment in the local optima and long-running times [145]. Additionally, the metaheuristic algorithm's time-bound and worst-case time complexity are unknown compared to standard algorithms [145]. The issues raised by Chopard and Tomassini about the shortcomings of metaheuristics contrast with Kong’s [62] research which noted that the algorithms offered faster and more responsive approaches. At the same time, Müller and Bonilha emphasized the superior solution quality of metaheuristic systems [187]. In real-time scenarios, the benefits enumerated by Müller and Bonilha [187] and Kong [62] were offset by the major limitations of the metaheuristics. For example, Chopard and Tomassini postulated that even if the time-bound issue was addressed, other issues would emerge, such as the lack of effective methods and performance guarantees [145]. The options available with performance guarantees are not general. Different metaheuristic systems in agriculture would yield distinct outcomes [145]. Researchers have often argued that the core challenges with metaheuristic systems would be best resolved using polynomial-time-bounded computations for difficult problems. However, there is no clear-cut evidence that this would be effective. The lack of guarantees was a major impediment to the widespread utilization of BIAs.

The researcher concurs with the fundamental issues raised by Chopard and Tomassini concerning the performance limitations of BIAs [145]. Considering the unique requirements for algorithms used in monitoring evapotranspiration, crop growth, pest infestation, humidity, drone and machinery path planning, soil temperature, yield, and nutritional requirements, the lack of performance guarantees impacted the commercial utility given that intelligent agricultural systems must be precise with a near-zero margin of error to avoid crop damage [13, 65, 144, 153]. The current body of knowledge affirms that heuristic and metaheuristic BIAs do not meet this threshold. Most of the readily available algorithms have variable computational time depending on the complexity of the problem and the nature of the solution required. In the future, the developers should focus on limiting the impact of random variables/choices on solution quality and computing time in metaheuristics; this could be partly resolved by modifying the stochastic nature of the algorithms to achieve better and more rigorous analysis. The proposals are practical considering that the variability has been partly offset with the use of simulated annealing and evolutionary algorithms [25, 26, 145]. The case for simulated annealing was corroborated by Saheri-Amiri et al., who affirmed the model was appropriate in augmenting closed-loop supply chain systems in agriculture and beyond because it focused on establishing a practical solution in the initial steps, which is replaced by a better solution in the subsequent steps [168]. The sequence of steps is repeated over time until the conditions for halting the computation are satisfied. On the downside, the preliminary outcomes derived from simulated annealing and evolutionary algorithms are asymptotic. Further refinements are necessary before widespread commercial application on smallholder and commercial farms.

Proper pesticide waste management has remained an issue of concern among smallholders and large farms [199, 200]. The utilization of the APOA in pesticide application offers tangible economic benefits because the cost of pesticide application can be shared among farmers, and the risk of waste is minimized because the drones are fitted with a small pesticide tank, GPS, multispectral sensors, and wireless modules to communicate with other drones in the swarm. Literature research on the potential application of hyper-heuristic BIAs in pesticide management did not yield relevant outcomes, indicating the limited deployment. The inadequate exploitation of the benefits associated with the APOA and other hyper-heuristic algorithms should be improved, given early versions of the algorithms were developed in 2011.

Emerging applications of APOA in agriculture include the development of mobile/radio networked weather stations, biomass/crop response sensors, and yield sensors. The use of APOA in the tuning of pheromone parameters in precision agriculture in conjunction with Flying Ad Hoc NETworks (FANET) was a case in point [13]; this builds upon the progress made by Rango et al. [38] with FANET and Recruiting Strategy over Bio-Inspired Routing (RSoBIR) in agricultural drones. The BIAs customized for drones activated the proactive routing strategy. The drones could autonomously locate and kill parasites in plants using an onboard pesticide tank. The wireless module facilitates the communication between drones. In contrast to Rango et al. [38], Tropea et al. used the algorithm to fine-tune the pheromone parameters [13]. The leading meta-heuristic algorithms are reviewed in the next sections.

3.8 Hybrid, Hyper, and Meta-heuristic Algorithms for Agriculture

The documented case studies for meta-heuristics encompassed diverse applications such as hydropower management using a two-stage hedging rule curve computational model for managing industrial, agricultural, and municipal water demands in multi-reservoir systems [40]. Following the comparison of the mixed-integer nonlinear programming (MINLP) MINLP-PSO algorithm versus the DSO-HRC model, it was deduced that the latter was best suited for regulating water reservoirs. The inherent limitations observed in the latter included long execution time, inability to derive the optimal solution, and insufficient objective function evaluation [40]. The observations made by Ashrafi [40] have practical implications for the choice of meta-heuristic BIAs for agricultural applications because the data was drawn from the Great Karun multi-reservoir system in southwestern Iran [40]. Apart from managing water resources, meta-heuristic algorithms were appropriate for soil temperature monitoring, as noted by Moazenzadeh and Mohammadi [66]. Beyond soil temperature monitoring, Sabzi et al. noted the algorithms were suitable for identifying weeds among potatoes [3]. The accurate identification of weeds helps to reduce wastage in agrochemical applications because the spraying was localized to areas with a high concentration of weeds.

In yet another study, Sabzi et al. demonstrated the suitability of the ANN-ABCOA metaheuristic BIAs in the differentiation of orange varieties [55]. Following the comparison of the ANN-PSOA, k-nearest neighbors (kNN), ANN-harmony search, and ANN-ABCOA, the best prediction accuracy was reported in the ANN-ABCOA algorithm, which had a prediction accuracy of 96.7%. The effectiveness of ANN-ABCOA in image processing was partly linked to the incorporation of the metaheuristics, lower chance of confusion, and ability to perform multiple iterations in the test samples. The reliability of ANN-ABCOA in the identification of orange fruits had practical benefits in the identification of other types of fruits because the model data could be applied to other fruits and vegetables apart from oranges. The use of algorithms could eliminate the need for human labor in the sorting process, translating to better efficiency, cost savings, and lower errors.

From an abstract point of view, the greatest potential of the hybrid, hyper, and metaheuristics was in the identification of weeds and pests. An algorithm-guided image processing was able to locate Polygonum aviculare L., Xanthium strumarium L., and Secale cereale L., weeds [3]. On the downside, the system's accuracy was impacted by weather conditions. For example, the prediction accuracy was 86 and 64% on sunny and cloudy days, respectively [3]. The reported accuracy levels were inadequate to guide autonomous systems—a factor that underscored the need to improve the ANN algorithms and Fourier-based color analysis and automatic classification of plants, pests, and diseases. From another perspective, one can argue that weed prediction accuracy was better relative to cases where no algorithms were employed to identify weeds; this is because the identification of weeds limits agrochemical wastage. The herbicides can be precisely applied to areas infested with weeds [11]. The United Nations Development Program (UNDP) estimated that precision spraying was 40 times more efficient [11]. A key emphasis should be on optimizing the algorithms to enhance the accuracy despite variations in humidity, temperature, and light.

In light of the observations made by UNDP [11], and Sabzi et al. [3], a fundamental question is whether adopting advanced BIAs would better detect pests and diseases. Drawing from the current engineering data, it would be challenging to achieve optimal results without changing the core architecture; this claim is supported by comparing the back-propagation neural network, single-shot multi-box detector, and the region-based CNN. The region-based CNN algorithm was the best suited for specific tasks such as recognizing insect pests with a 99% accuracy [31]. The high accuracy contrasts with the ANFIS-GA and ANFIS-PSO systems, which had accuracy levels of 43–46% [36]. The higher accuracy of the CNN affirms the superiority of the deep learning systems compared to machine learning—an observation that was in line with Kasinathan et al.'s comparative assessment of Naïve Bayes, K-nearest neighbors, support vector machines, and ANN using information drawn from public database (IP102) [31]. The CNN model yielded the best classification rate of 92% [31]. The recommendations for future research studies are reviewed in the next sections.

3.9 Limitations of Swarm Intelligence-Based and Other BIAs in Agriculture

Even though there were sufficient grounds for the deployment of swarm intelligence-based algorithms in agriculture, there were limitations that hindered widespread adoption [134, 139, 170,171,172]. First, the ant colony and artificial bee investigation indicated that swarm intelligence-based algorithms involve time-intensive processes, which are impacted by the iteration patterns, frequency of iterations, and population sizes. The concerns were informed by Mao et al.'s research, which affirmed that ABCOA algorithms suffered stagnation, poor population diversity, slow search speeds, and were trapped in the optimal local solution [201, 202]. A fundamental question was whether ABCOA could be replaced with evolutionary programming algorithms such as the gravitational search algorithm able to overcome the stagnation challenge [57]. The current body of knowledge on the subject was inconclusive because gravitational search algorithms were relatively new, and their adoption in the agricultural sector was not well established—the existing studies emphasized continuous function optimization [1, 39, 57]. The optimal performance of the algorithm was also dependent on the conditions in the local environment.

On a positive note, the constraints can be addressed by model predictive control, which is effective when there are time lags/large and nonlinear delays [144]. Considering that these factors were extremely variable in the natural environment, the efficiency of the algorithms was context-specific. If the confounding factors exceed a certain threshold, the algorithms become less useful and worthless. Second, Nayyar et al. [42], Tang et al. [20], and Fan et al. [19] highlighted the lack of central coordination and premature convergence in swarm intelligence-based algorithms; this underscores the need for continuous improvement to resolve the shortcomings. Third, the calculation time increased with the blocking coordination mechanisms in ABC and ant colony, particle swarm, and optimization algorithms. In each of these cases, the agent must wait for other agents to be evaluated before proceeding to another position.

The real-world impact of R&D in academia to enhance the performance of the swarm robotic algorithms remain unknown because the solutions (self-adaptive search strategy, ARIMA, and LSTM discrete binary, and Guest-guided algorithm) proposed by Nayyar et al. [42], Tang et al. [20], Wang et al. [134] and Chen and Xiao [133] had not been employed on a broader scale. There are also concerns about the accuracy levels of BIAs vis-à-vis the R-CNN and other alternatives in pest management. Karar et al. noted the R-CNN precision was 98%, while the BIA had a precision of 92% [31]. Even though the discrepancies were limited to detecting crop pests, they underscored the tradeoffs associated with the choice of algorithms.

Despite these concerns, the gradual improvement of the algorithms was the only practical and feasible solution considering the growing demand for AI and IoT in agriculture. Widespread use in the short-term is not practical because of the high computational costs, local adjustments and optimizations, and the long wait durations. If the documented challenges are addressed, the application of swarm intelligence-based algorithms will transcend data aggregation, numerical optimization, zoning of protected ecological areas [170, 173], and path planning of robotic bees [20, 42].

Similar to the ACOA, the MPC method has shortcomings. For example, it is unstable and incapable of identifying online models. The challenge is offset from an IoT perspective by optimizing the calculation time using more hardware, expansion of nonlinear processes, and the MIMO systems. Nonetheless, one can argue that farmers would be faced with a dilemma considering the choice of the short computing time involved a tradeoff between economical cost and performance levels [144]. It was challenging to reduce the calculation time without impacting performance and the cost. Moreover, reducing the computational time might have undesirable effects on the stability of the model; this means the optimization of the computational time is only feasible in theoretical studies—real-time applications on the farm are unfeasible in the short-term [144]. The listed shortcomings explain why MPC was not widely adopted in irrigation management, pest management, or processing of agricultural products. Considering the shortcomings, one can argue that MPC can be deployed in conjunction with BIAs such as GA, ACOA, and ABCOA for better efficiency.

Beyond the resources needed for widespread adoption, the existing stock of swarm and ecological algorithms has not been optimized for different applications [62]. For example, responsive decision-making grounded on deterministic optimization is a challenge for nearly all algorithms [8, 9, 37, 134, 171, 182, 183]. Even though progress was made using current solution searching methods in metaheuristic, branch and bound, heuristic, tree-search, cut, and exact algorithms [62], it remains challenging to resolve large-scale optimization problems using optimal global solutions. Responsive decision-making guided by computational approaches is best suited for complex optimization problems. Other studies argued that it was necessary to first address the inadequate case study data before optimizing the algorithm's performance. This narrative aligns with Utamima et al., who claimed that there were limited case studies of BIAs in agricultural logistics [143]. The logistics encompassed the sorting and classification of fruits and grading.

The published empirical data was drawn from limited real-world cases, which cannot be generalized to the wider population or the global agricultural sector; this is an issue to be addressed in upcoming research studies. Additionally, the benchmarking of the datasets should be enhanced [143]. Nonetheless, it is imperative to acknowledge that notable progress has been made in the extension of swarm algorithms, improvement of the characteristics of individual agents through optimization performance, and the development of a new class of blended algorithms, which exploit the properties of fruit fly, artificial immune system, grey wolf optimizer, pigeon-inspired and cuckoo search optimization algorithms [20, 63]. The prospects are reinforced by the relative higher scalability, robustness, collective and individual intelligence, and exploration scalability. Still, the cyber-physical attack risks are underappreciated, as noted in the next section.

3.10 Cyber Security Risks in Smart Farms and Role of BIAs

The concerns raised by Torre-Bastida are justified because there have been multiple incidents of hacking in smart farms [172]. The ransomware attack on UK’s National Milk Group (NMG) was a case in point [203]. Drawing from incidents documented in other sectors, the cost of cyber security attacks on agricultural systems would have an enormous cost. For example, a cyber-attack cost Maersk $300 million [204]. Considering the losses would diminish the utility of IoT systems in agriculture, it was necessary to invest in cyber security (real-time intrusion detection and spam filters). However, this has not been the case in real-life situations [203]. The inadequate commitment to cyber-physical systems in smart farms could be attributed to the fact that the “consequences of attacks on a digitized food sector may not be as immediately obvious as in other critical infrastructures” [203] (p. 1). However, this mindset was not guided by empirical facts because cyber-attacks might lower food production capacity in farms or crop yields. Such risks have not been appreciated due to the socio-cultural contexts of smart technologies in agriculture. Nonetheless, there is promising data drawn from bio-inspired approaches to cyber security [205]. The findings documented by Mthunzi et al. [205] about the role of bio-inspired approaches were corroborated by Suarez et al. [206], who developed ad hoc-created) algorithms capable of preventing denial of service attacks.

4 Future Research

The proposals for future research were informed by the shortcomings of the BIA and the need for practical, intelligent solutions in agriculture. Even though there were diverse applications, fundamental issues of concern remain unresolved, such as the accuracy and recall ability of the BIAs relative to other alternatives such as the R-CNN [31, 80, 207, 208]. The R-CNN was superior across different case studies because it could detect pests in complex backgrounds or the field in real-time. The algorithm performed optimally even when inadequate information about the acquired images [31]. The position of the pests was correctly determined because of the successful coupling with bounding box regression and the RPN module. Beyond pest detection, the R-CNN algorithm was proven effective in the performance of a wide array of functions, including fruit detection and classification [80], wild forest fire smoke detection [207], and object detection. On a positive note, the level of accuracy and precision was satisfactory because it exceeded 95%. The lower margin of error is critical in precision agriculture.

Upcoming research studies should investigate other algorithms excluded from the review, including the pseudo-inspired Gravitational Search Algorithm (PI-GSA), which has proven capable of solving sophisticated optimization challenges in renewable energy grids [40]. Additionally, researchers should investigate the balance between intensification (exploitation) and diversification (exploration) in algorithms because there is no consensus in the existing body of knowledge—different narratives have been advanced by scholars. The lack of definitive guidelines relating to the exploitation and exploration of algorithms directly impacts convergence speed, prediction accuracy, and optimal performance of meta and hyper-heuristic algorithms, as noted by Dokeroglu et al. [30]. Based on the unique dynamics of swarm bio-inspired and ecology algorithms, exploitation and exploration should be guided by the dynamics of each algorithm, considering the unique performance of the artificial bee colony (ABC), flower pollination algorithm (FPA), firefly algorithm, Krill herd algorithm, and genetic optimization algorithms.

5 Conclusion

The research contributed new insights and perspectives on the utility of the BIAs; this was evident from the demonstrated performance of the ABCOA, flower pollination algorithm (FPA), firefly algorithm, Krill herd algorithm, and genetic optimization algorithms in the analysis of the soil temperature, pest detection, aerial spraying of pesticides, and fertilizers, water reservoir management, renewable power integration, and path planning for agricultural machinery. The bio-inspired ANN algorithms were superior because they relied on neural networks to mimic the brain mechanisms. In contrast, the GA algorithms were preferred because they functioned best in crop planning models, pesticide application, machinery path optimization, and other applications. Beyond GA, other algorithms, including Cuckoo, firefly, ACOA, ABCOA, and AFSOA, were useful in land use planning, optimization of crop yields, optimization of agricultural resources (water, land, agrochemicals, and fertilizer), and supply chain operations (postharvest handling of fruits and vegetables). The benefits outweighed the concerns about the sub-optimal stagnation phase, lack of performance guarantees, variable computational time, suboptimal exploitation and exploration phases, low prediction accuracy, and high cost. The positive outlook was validated because certain drawbacks could be resolved by integrating two or more algorithms. For example, the computational time was reduced with the HPSO-GWO-EA algorithm.

Drawing from the literature review, the BIAs were indispensable in metaheuristics and the future of precision agriculture. The classification of swarm intelligence into ACOA, GA, AFCOA, BFOA, ABCOA, Cuckoo, and firefly algorithms were based on solution encoding, objective functioning (single and multi-objective), optimum solutions, search process and agents, and movement of mechanisms. On the one hand, if solutions are coded as real numbers with continuous spaces, there are infinite solutions. On the other hand, combinatorial search spaces were associated with feasible solutions. The population-based and single-spaced techniques are dependent on the number of search solutions and agents. The movement processes involve the generation of neighborhood solutions from the current and the ability of the search techniques to scan as many search spaces and regions as possible.

Most BIAs are designed to balance exploitation and exploration functions. The solutions identified by the search algorithm are determined by the objective function criteria (cost and fitness function maximization and minimization). Alternatively, the single objective techniques predicted the global optima and minima, while the multi-objective techniques were best suited for determining many optimal solutions. The optimal local movements determine whether the solution was optimal. On the contrary, the global movements are designed to identify the near-optimal solutions from random search spaces.

The unique design features of the BIAs provide endless possibilities for the extension of the bio-inspired capabilities beyond the ant colony, bee swarm, firefly, fish swarm, and genetic systems. The shortcomings of the existing BIAs have been partly resolved by combining two or more algorithms with flexible architectures to create hyper-algorithms and hybrid metaheuristic techniques with advanced capabilities. Applying the hierarchy/hybrid particle swarm optimization-grey wolf optimizer–evolutionary algorithm, direct artificial bee colony, hybrid cuckoo search-bat algorithm, particle swarm optimization, and whale optimization algorithm was a case in point. The hyper-algorithms executed calculations with a short computational window and provided the best fitness values. The shortcomings observed in the hyper and hybrid algorithms could be addressed by focusing on the proposed areas of research outlined in Sect. 5.