Retail sales optimization using a hybrid K-Means, particle swarm optimization and reinforcement learning framework
摘要
Retailers face difficulty in making sales decisions because demand is uncertain, regions differ, and market conditions change quickly. This affects inventory, discounts, and sales performance. This study proposes a hybrid model using K-Means clustering, reinforcement learning, and particle swarm optimization. K-Means groups store with similar demand patterns. Reinforcement learning develops adaptive sales and discount policies. Particle swarm optimization tunes the reinforcement learning hyperparameters. The retail decision problem is formulated as the maximization of a net profit reward, and the algorithmic performance is reported as a fitness cost equal to the negative of the cumulative reward, so that lower fitness cost values indicate better policies under one consistent objective. The model was tested on about 76,000 retail observations from five stores, twenty products, and four regions between 1 January 2022 and 1 January 2024. All reported summary statistics are averaged over 30 independent runs with different random seeds, and pairwise differences are assessed using the two-sided Wilcoxon signed-rank test at a five per cent significance level. The hybrid model achieved the lowest mean fitness cost of 90.925, compared with 104.465 for particle swarm optimization, 118.225 for reinforcement learning, and 139.033 for K-Means clustering. The improvement of the full hybrid framework over the strongest single baseline (particle swarm optimization) is statistically significant (p < 0.01). Cluster quality is supported by a silhouette score of 0.42 and a Davies, Bouldin index of 0.88 for the four-cluster solution, confirming that the segmentation captures meaningful demand structure rather than a trivial one to one store relabelling. These findings indicate better cost performance on the studied dataset. The proposed framework offers a practical and data-driven approach for multi store retail decision support, and the broader generalization to large scale retail networks is positioned as future work.