## 9 Algorithms, AI Models and Digital Twins
### AI in Agricultural UGVs  
AI is a long-term, established field of Computer Science that focuses on creating systems capable of performing tasks that typically require human intelligence [116; 117]. These tasks include learning, reasoning, problem-solving, perception, and language understanding. At present, AI is involved in a wide range of sectors, transforming industries by automating processes, improving efficiency, and enabling new capabilities. In agriculture, the use of AI technologies, especially for Machine Learning (ML) characterization, is becoming widespread and encompasses all operative phases: pre-, mid- and post-production [118]. The possibility to automate entire production processes enhances farm efficiency with the use of self-guided vehicles and the autonomous execution of farm duties such as detecting pests, predicting yield, spraying, pruning, snowing, seeding, thinning, and harvesting [119; 120; 105]. ML plays a crucial role in both the planning and execution phases of UGVs' activities. Data gathered by fully autonomous robots can be utilized by Decision Support Systems (DSS) to enhance production and use resources sustainably [121; 122]. ML solutions can be divided into Traditional Machine Learning (TML) techniques and Deep Learning (DL) models [123]. As reported in [124], classical image processing and TML techniques have been extensively applied in various agriculture applications, such as SVM [125], clustering [104], decision trees [126], random forest [127], AdaBoost [128], and RANSAC [129], to name just a few. However, these methods come with significant limitations. One major challenge is the necessity of the meticulous selection of suitable algorithms for tasks such as feature extraction, shape detection, and classification. Additionally, these techniques often require partial control of the environment, which can include the use of artificial backgrounds or lighting to ensure accurate and consistent results. In contrast, DL models--a subset of ML--analyze vast amounts of agricultural data collected over time and are capable of great flexibility, and their power enables decision-making based solely on visual information. For example, Visual Simultaneous Localization And Mapping (VSLAM) algorithms utilize data from one or more cameras to detect obstacles and deter mine the rover's position in space, in contrast with classical approaches that require the fusion of multiple sensor data and many algorithms for their integration [84; 130]. Input images can also be used to compute the movement of a robot (visual odometry) without using external and dedicated sensors thanks to recent DL research [131]. Depending on the artificial neural network architecture, it is possible to achieve different performances (accuracy and speed) in different tasks (detection, recognition, segmentation, prediction, data fusion) and conduct a non-destructive detection and analysis of plants [132]. The most-used DL models/architectures are as follows:  
* Convolutional Neural Networks (CNNs) are widely used in UGVs for classification, detection, and semantic segmentation [133; 134; 135; 136; 137; 138; 139; 140; 141]. These models can analyze images of crops to identify specific plant health issues, such as nutrient deficiencies or pest infestations, and can also be used for UGV navigation, detecting obstacles, and recognizing viable pathways, such as tree rows. The most relevant DL models can be grouped into three categories: (a) Simple classification models: These models detect the presence of specific object in an image without localizing it, but by identifying patterns in the extracted features. Examples include AlexNet, VGGNet, MobileNet, and ResNet, which are often used as encoders in more complex deep learning networks. (b) Single-stage methods, based on regression, which directly predict object locations and classifications in a single pass through the network. YOLO (You Only Look Once) and SSD (Single Shot MultiBox Detector) are the most well-known examples.