Multi-agent Reinforcement Learning with Clustering and Forecasting for Optimized Energy Sharing in Microgrids - De Silva, Daswin; Kempitiya, Thimal; Madhusanka, Nuwan; Rathnayaka, Prabod; Mills, Nishan; Jennings, Andrew; Manic, Milos (Journal of Computational and Cognitive Engineering, 2026)
The increasing prevalence of renewable energy and the evolving nature of energy consumption have motivated the need for more complex and dynamic microgrid energy management systems. Recent advances in artificial intelligence (AI) address these challenges by learning, predicting, and optimizing based on the large volumes of data generated by microgrid systems and related operations. Drawing on this context, the article proposes a novel framework for multi-agent reinforcement learning (MARL) with clustering and forecasting for optimized energy sharing in a microgrid environment with renewables and battery storage integration. The framework consists of three components: first, a structure-adapting unsupervised learning approach for creating clusters of prosumer energy consumption and generation patterns; second, a time-series forecasting ensemble for predicting future behaviors of the prosumers; and third, a continuous internal auction with a MARL for optimized energy sharing within the microgrid that collectively leads to reduced dependence on external energy sources. The proposed framework is empirically evaluated in the microgrid setting of a large multi-campus tertiary education institution. The results of this evaluation include stabilization of mean reward gain between independent agent and multi-agent models, impact of forecasting on MARL across seasonal variation, performance gains of 10–15% of MARL against heuristics, and scalability of the framework against cost, stability, reward, and convergence metrics. These results confirm the effectiveness of this AI framework for optimized prosumer energy sharing in microgrids with renewables and battery storage integration. Received: 9 October 2025 | Revised: 14 January 2026 | Accepted: 25 March 2026 Conflicts of Interest The authors declare that they have no conflicts of interest to this work. Data Availability Statement The data that support the findings of this study are openly available at https://github.com/CDAC-lab/UNICON. Author Contribution Statement Daswin De Silva: Conceptualization, Methodology, Formal analysis, Writing – original draft, Supervision, Funding acquisition. Thimal Kempitiya: Software, Validation, Formal analysis, Investigation, Data curation, Writing – original draft. Nuwan Madhusanka: Software, Validation, Resources, Data curation, Writing – original draft. Prabod Rathnayaka: Formal analysis, Investigation, Resources, Writing – original draft, Visualization. Nishan Mills: Methodology, Validation, Investigation, Writing – original draft, Supervision. Andrew Jennings: Conceptualization, Formal analysis, Resources, Writing – original draft, Supervision. Milos Manic: Conceptualization, Methodology, Validation, Writing – original draft, Supervision.