The accurate prediction of rock mass quality ahead of the tunnel face is crucial for optimizing tunnel construction strategies, enhancing safety, and reducing geological risks. This study developed three hybrid models using random forest (RF) optimized by moth-flame optimization (MFO), gray wolf optimizer (GWO), and Bayesian optimization (BO) algorithms to classify the surrounding rock in real …