A chameleon algorithm based on optimized partitioning was studied to solve the intelligent matching problem of college dormitory roommates. Using quantitative research methods, data on personal preferences and lifestyle habits of college students were collected, and the K-center object chameleon algorithm was used for data analysis and roommate matching. Test the algorithm performance on the BBC dataset, compare clustering quality indicators such as entropy, purity, and RI value, and verify the effectiveness of the algorithm. This algorithm can accurately assign students to their respective dormitories, avoiding overlapping situations and achieving excellent matching results. In terms of matching accuracy and running time, the K-center object chameleon algorithm shows superior performance compared to other algorithms. In terms of clustering quality evaluation, comparisons were made from three dimensions: entropy value, purity, and RI value. The experimental results show that the closer the entropy value is to 0, the closer the purity and RI value are to 1, and the better the matching effect. This result further validates the effectiveness of the algorithm in the intelligent matching problem of college dormitory roommates. The matching accuracy of this algorithm on the BBC dataset reached 98.82%, showing better clustering quality than other algorithms in terms of entropy, purity, and RI values. The entropy value approached 0, while the purity and RI values approached 1, verifying the efficiency of matching quality. The chameleon algorithm based on optimized partitioning proposed in the study has shown excellent performance in intelligent matching of college dormitory roommates, with the characteristics of high-precision matching and fast running time. It has important practical significance for improving the quality of life and learning efficiency of college dormitory students, and provides new research methods and ideas for related fields.