Tunnel projects entail high levels of uncertainty due to vague geological conditions and the complexity of the mechanized tunneling process. The effectiveness of the tunnel-boring machine (TBM) is indispensable for the completion of any mechanical tunneling project. The capital costs and schedule of tunnel excavation may be reduced by precisely predicting TBM performance, particularly under certain rock mass conditions. This study attempts to present an optimized model of the gene expression algorithm using the whale optimization algorithm. The TBM drilling machine's penetration rate is a performance metric to provide a precise prediction target for the suggested models. Site surveys for the Qom metro line A project and numerous lab tests on the gathered rock samples led to the developing of a test database with 5742 data sets for modeling purposes. A combination of rock and machine characteristics having the largest impact on the drilling machine penetration rate was utilized to create intelligent models of drilling machine penetration rate relying on training and test patterns. A total of 7 parameters were used as input parameters. The prediction accuracy of the created models was also assessed and compared using several statistical indicators, including variance calculation, coefficient of determination, and root mean square error. Depending on the simulation results and the estimated values of the indices, the correlation coefficient values in the gene expression model and the model optimized by the whale algorithm were calculated as 0.79 and 0.91, respectively. This indicates the significant performance of the whale algorithm in optimizing the results of the gene expression algorithm aimed at predicting the penetration rate of the TBM.