The difficulty in the prediction of the glass-forming ability (GFA) of alloys hinders the development of new materials with excellent properties. The GFA of alloys is investigated by using three machine learning models based on a decision tree, with a dataset covering 1404 multicomponent alloys collected from peer-reviewed publications. With the composition (including 94 elements, C94), three characteristic temperatures (T3), and three geometric parameters (G3) as the input feature, the XGBoost model achieves the best prediction result {RMSE = 2.5635, R 2 = 0.7250}, improved by 11.20% compared with the latest published paper. Among seven possible input feature sets, "C94 + T3" achieves the best with {RMSE = 2.5250, R 2 = 0.7332} on the XGBoost model. Further analysis revealed that superimposing G3 on C94 always reduces XGBoost performance; therefore, the GFA of alloys is independent of the atomic size ratio; this is consistent with the fundamental principle of physics: the radii of atoms are determined by element types. A precision of 95.5% is obtained for binary alloys even with an incomplete feature set. Therefore, with "C94 + T3" input features, the XGBoost is generally reliable to effectively predict the GFA of all alloys.