Apple Quality Classification Using a Metaheuristic-Optimized Machine Learning Framework El-Sayed M. El-Kenawy1,2,* 1Department of Communications and Electronics, Delta Higher Institute of Engineering and Technology, Mansoura 35111, Egypt 2Applied Science Research Center, Applied Science Private University, Amman 11931, Jordan Email: skenawy@ieee.org Abstract This study presents a comprehensive evaluation of metaheuristic-optimized machine learning models for automated apple quality classification, addressing the critical need for accurate and consistent fruit grading systems in agricultural applications. The research integrates four bio-inspired optimization algorithms—Whale Optimization Algorithm (WOA), Salp Swarm Algorithm (SSA), Cuckoo Search (CS), and Bat Algorithm (BAT)—with Multi-Layer Perceptron (MLP) classifiers to enhance fruit quality assessment performance. Experimental validation was conducted using a comprehensive apple quality dataset containing seven key attributes: size, weight, sweetness, crunchiness, juiciness, ripeness, and acidity. The results demonstrate that WOA-MLPClassifier achieves superior performance with 95.37% accuracy, 95.99% sensitivity, and balanced effectiveness across all evaluation metrics including specificity, positive predictive value, negative predictive value, and F1 Score. Statistical validation through one-way ANOVA and Wilcoxon signed-rank tests confirms significant performance improvements over baseline models and alternative optimization approaches, with p-values less than 0.001. The proposed framework exhibits remarkable consistency across multiple evaluation runs, with perfect positive rank sums indicating reliable optimization behavior. These findings establish a new benchmark for automated fruit quality classification systems and provide valuable insights for deploying bio-inspired optimization techniques in agricultural machine learning applications where both accuracy and reliability are essential for commercial viability. Keywords: Metaheuristic optimization; Apple quality classification; Whale optimization Algorithm; multi-layer perceptron; Fruit grading; Bio-inspired algorithms; Agricultural machine learning; Food quality assessment