As an important branch of emerging artificial intelligence algorithms, multi-agent reinforcement learning (MARL) has shown strong performance in collaborative environments. It can utilize multiple agents to find the optimal set of strategies for solving sequential decision problem through trial-and-error. One of the main challenges facing multi-agent system is the non-stationarity problem, which brings poor convergence and seriously affects its performance. Clustering is a commonly used unsupervised analytical method in machine learning, which aims to group samples with similar internal properties into the same cluster. In this paper, we propose a MARL clustering algorithm based on silhouette coefficient (SC-MARLC), and use the trial-and-error strategy to find the best cluster groups. In SC-MARLC, we establish a mapping relationship between multi-agent and samples, construct a novel clustering model based on MARL, and design a good clustering subset structure based on the sample silhouette coefficient. The designed structure is helpful for multi-agent system to solve the non-stationary problem. Finally, we compare the performance of SC-MARLC with 11 existing clustering algorithms on fifteen public datasets. The results show that the new clustering algorithm performs best on ten datasets.