<span lang="EN-US">This paper explores the use of deep learning to optimize the performance of a peer-to-peer energy system with an intelligent master controller. The goal addresses inefficiencies caused by energy seasonality by predicting hourly power consumption through a deep learning algorithm. The intelligent master controller was designed to manage the collaborative energy system, and the deep learning technique was employed as an optimization scheme to forecast power system performance for more efficient utilization. The deep learning algorithm was trained using dataset from American electric power, where consumer load data serves as input, and forecasted power serves as output. The forecasted power was then used as input to the intelligent master controller, which determines suitable power supply for generation and storage based on the predicted demand. The experiment results show promising accuracy with a root mean square error (RMSE) of 0.1819 for hourly energy consumption averaged over a year, 0.2419 for hourly energy consumption averaged over a month, 0.0662 for hourly energy consumption averaged per day, and 0.0217 for hourly energy consumption. These findings demonstrate that the system is well-trained and capable of accurately predicting the energy required by the intelligent master controller, thus enhancing the overall performance of the peer-to-peer energy system.</span>