For the HCCI experiments, four different compression ratios were used (CR۹, CR۱۰, CR۱۱, and CR۱۲). The intake air temperatures varied between ۳۱۳ and ۳۷۳ K, while the engine speed changed from ۸۰۰ to ۱۸۰۰ rpm. Three fuel blends were used, i.e., RON۲۰, RON۴۰, and RON۶۰. The RON۶۰ indicates ۶۰% iso-octane and ۴۰% n-heptane. A modified social group optimization (MSGO) algorithm was used for HCCI optimization purposes. Regression modeling was first employed to calculate the mathematical relations between the factors (compression ratio, research octane number (RON), intake air temperature, engine speed, and lambda) and the responses (effective torque, IMEP, indicated thermal efficiency, specific fuel consumption, COV IMEP, and HC). FThe regression models fit the given observations well with a low prediction error. The calculated R^۲ obtained from this study show that the compression ratio (X_۱), RON (X_۲), intake air temperature (X_۳), engine speed (X_۴), and lambda (X_۵) are sufficient to model the responses (effective torque, IMEP, indicated thermal efficiency, specific fuel consumption, COV IMEP, and HC). ANOVA results show p-value < α (under the ۹۵% confidence type-I error= α=۵%), indicating that the model is significant (H۱ is true). Then MSGO is run via these mathematical models to determine the parameters with optimal optimization values. In the verification phase, ۱۳ additional experimental runs that were not used in the mathematical modeling phase were used. It was found that the regression models fit the observed values well with a low PE (%). MSGO algorithm suggested the best value for studied parameters as X۱=۱۱.۴۷, X۲=۶۰, X۳=۳۱۳, X۴=۸۰۰, and X۵=۱.۴۵. The verification shows satisfying results with a high accuracy. The optimized factor levels indicates that the effective torque, IMEP, and indicated thermal efficiency were maximized while the other responses were minimized. Therefore, the findings signify the potential of the MSGO algorithm for HCCI optimization.