Artificial Intelligence Algorithms have been used in recent years in many scientific fields. We suggest employing flower pollination algorithm in the environmental field to find the best estimate of the semi-parametric regression function with measurement errors in the explanatory variables and the dependent variable, where measurement errors appear frequently in fields such as chemistry, biological sciences, medicine, and epidemiological studies, rather than an exact measurement. We estimate the regression function of the semi-parametric model by estimating the parametric model and estimating the non-parametric model, the parametric model is estimated by using an instrumental variables method (Wald method, Bartlett's method, and Durbin's method), The non-parametric model is estimated by using kernel smoothing (Nadaraya Watson), K-Nearest Neighbor smoothing and Median smoothing. The Flower Pollination algorithms were employed and structured in building the ecological model and estimating the semi-parametric regression function with measurement errors in the explanatory and dependent variables, then compare the models to choose the best model used in the environmental scope measurement errors, where the comparison between the models is done using the mean square error (MSE). These methods were applied to real data on environmental pollution/ air pollution in the city of Baghdad, and the most important conclusions that we reached when using statistical methods in estimating parameters and choosing the best model, we found that the Median-Durbin model is the best as it has less MSE, but when using flower The pollination algorithm showed that the Median-Wald model is the best because it has the lowest MSE, and when we compare the statistical methods with the FPA in selecting semi-parametric models, we notice the superiority of the FP algorithm in all methods and for all models.