The international roughness index (IRI) can be employed to evaluate the smoothness of pavement. The previously proposed mechanical-empirical pavement design guide (MEPDG), which is used to model the IRI of joint plain concrete pavement (JPCP), has been modified in this study considering its disadvantage of low prediction accuracy. To improve the reliability of the prediction effect of the IRI for JPCP, this study compares the prediction accuracy of the IRI of JPCP by using the machine-learning methods of support vector machine (SVM), decision tree (DT), and random forest (RF), optimized by the hyperparameter of the beetle antennae search (BAS) algorithm. The results from the machine-learning process show that the BAS algorithm can effectively improve the effectiveness of hyperparameter tuning, and then improve the speed and accuracy of optimization. The RF model proved to be the one with the highest prediction accuracy among the above three models. Finally, this study analyzes the importance score of input variables to the IRI, and the results show that the IRI was proportional to all the input variables in this study, and the importance score of initial smoothness (IRII) and total joint faulting cumulated per km (TFAULT) were the highest for the IRI of JPCP.