In this research article, we propose a method based on genetic algorithms to optimize the grouping of students in engineering education. Our method aims to create student groups that take into account their skills, preferences, and relevant factors. We build upon previous research that has successfully utilized genetic algorithms for group formation in various contexts, such as assigning students to laboratory groups and facilitating cooperative learning. We implement and evaluate our proposed methods in collaborative learning environment, examining their impact on collaborative performance, processes, and perceptions. The results of our research demonstrate that grouping methods supported by genetic algorithms positively influence performance and collaborative processes, while students perceive these methods as fair and effective. This article makes a valuable contribution to the field of engineering education by providing methods that up to minus student grouping, considering their initial characteristic and performance and preferences. By employing these methods, the quality of group work can be enhanced leading to improve student learning experiences. Future research can explore the application of the of this method in order educational settings and investigate the factors that influence their effectiveness.