This research aimed to determine whether unconfined compressive strength ( \(UCS\) ) of low-quality granular materials saturated with natural pozzolanic geopolymer can be predicted using machine learning. The models to predict \(UCS\) were effectively established via the use of the Extremely Randomized Tree ( \(ETR\) ) and Decision Tree ( \(DT\) ) methodologies. Hippopotamus Optimizer ( \(HiO\) ) utilized for hyperparameter tuning to improve the expected precision and durability of the \(DT\) and \(ETR\) models. The results showed how well machine training-driven methods can assess granular materials stability and provide a useful analysis for enhancing geotechnical engineering methods through the utilization of data-driven modeling application tools. Based on the information provided, it was probable that \(Hi{O}_{ETR}\) and \(Hi{O}_{DT}\) would both calculate \(UCS\) accurately. The \(Hi{O}_{ETR}\) yielded low \(RMSE\) index values, namely 0.3302 for the training stage and 0.3542 for the testing stage. The \(Hi{O}_{DT}\) findings during the training and testing phases demonstrated greater reliability than previous results, with improvement percentages of -16.523% in training and −14.177% in testing.