This research is dedicated to exploring and identifying the most effective design for an energy source tailored specifically to meet the electricity demands of a residential community. In an era where energy efficiency and sustainability are paramount, this study emphasizes the importance of both technical and economic considerations in energy sourcing. It posits that any viable solution must not only be efficient in its energy production and consumption but also reliable in its delivery and financially feasible for the residents who will depend on it. To address this multifaceted challenge, the study proposes the innovative use of a rotation-invariant coordinate convolutional neural network in conjunction with binary battle royale optimization techniques. These advanced methodologies are selected for their potential to enhance the modelling and optimization processes involved in energy source design. The primary goal of employing these methods is to minimize two critical factors: the net present cost of the energy system and the overall energy cost incurred by the residents. By focusing on these objectives, the research aims to ensure that the proposed energy solutions are not only cost-effective but also sustainable over the long term. To rigorously test the proposed model and evaluate its performance, the research is conducted using the MATLAB platform. The study employs established methodologies and performance metrics to assess the outcomes of the model, ensuring that the findings are both credible and applicable to real-world scenarios. Through comprehensive testing and detailed analysis, this research aims to provide significant insights and actionable recommendations for the optimal design of energy sources in residential areas. By contributing to the ongoing discourse on sustainable energy solutions, the study seeks to inform policymakers, energy planners, and community stakeholders about effective strategies for meeting residential energy demands while promoting environmental sustainability. Ultimately, the findings of this research could play a crucial role in shaping the future of energy sourcing in residential communities, paving the way for more resilient and sustainable energy systems