This research article presents a thorough and all-encompassing examination of predictive models utilized in the estimation of viscosity for ionic liquid solutions. The study focuses on crucial input parameters, namely the type of cation, the type of anion, the temperature (measured in Kelvin), and the concentration of the ionic liquid (expressed in mol%). This study assesses three influential machine learning algorithms that are based on the Decision Tree methodology. These algorithms include Random Forest (RF), Gradient Boosting (GB), and XGBoost (XGB). Furthermore, the study incorporates the use of Glowworm Swarm Optimization (GSO) for hyper-parameter optimization, thereby further elevating the efficacy of the models. The results obtained from the evaluation showcase the exceptional predictive capabilities of the models, with Random Forest (RF) achieving an impressive R
2
value of 0.9971, Gradient Boosting (GB) attaining an R
2
value of 0.9916, and XGBoost (XGB) yielding an R
2
value of 0.9911. In addition to the R
2
metric, the study also presents other performance metrics, such as RMSE and MAPE, for each model. This comprehensive assessment of accuracy further solidifies the credibility and effectiveness of the models employed in the estimation of viscosity for ionic liquid solutions.