###### Abstract  
The increasing adoption of renewable energy sources and the emergence of distributed generation have significantly transformed the traditional energy landscape, leading to the rise of local energy markets. These markets facilitate decentralized energy trading among different market participants at the community level, fostering greater energy autonomy and sustainability. As local energy markets gain momentum, the application of artificial intelligence techniques, particularly reinforcement learning, has gained substantial interest in optimizing energy trading strategies by interacting with the environment and maximizing the rewards by addressing the decision complexities by learning. This paper comprehensively reviews the different energy trading projects initiated at the global level and machine learning approaches and solution strategies for local energy markets. State-of-the-art reinforcement learning algorithms are classified into model-free and model-based methods. This classification examines various algorithms for energy transactions considering the agent type, learning methods, policy, state space, action space, and action selection for state, action, and reward function outputs. The findings of this work will serve as a valuable resource for researchers, stakeholders, and policymakers to accelerate the adoption of the local energy market for a more efficient, sustainable, and resilient energy future.  
energy trading; local energy markets; bidding and auction; artificial intelligence; machine learning; reinforcement learning +
Footnote †: journal: Applied sciences  
is vulnerable to single points of failure, often failing to provide universal energy access, especially in remote or underserved areas. Additionally, it does not empower consumers to actively participate in energy markets or provide pricing opacity for consumers in the sale or purchase of energy. It is also subject to polluted environmental impacts [6], and consequently, it faces increased risks of supply disruptions and unexpected outages due to climate change vulnerabilities. In recent years, the global energy system has undergone a significant transformation driven by the rising demand for distributed energy resources (DERs), advancements in energy technology, and reduction in greenhouse gas emissions [7]. The risks associated with DERs have led to a shift from only a consumer-driven market to all electricity market players [8] through a competitive energy market (CEM). Traditionally, the electricity market comprises the wholesale electricity market (WEM) and the retail electricity market (REM) [9], as shown in Figure 2.  
In a typical power system structure, the large power generators and consumers participate in the WEM to sell and buy energy, facilitating the efficient exchange of electricity on a broader scale, particularly to a specific geographic area or region to meet the energy demand [10]. While supply and demand management in the WEM is generally effective, there are certain limitations, particularly for small consumers, who have limited options to choose their power supplier and can only receive power from affiliated distribution companies, which are authorized to set electricity prices. This lack of competition in the CEM restricts consumer preference and choices. This makes the WEM ineffective for renewable energy sources (RES), which have negligible or zero marginal cost, whereas in the WEM, the electricity price is set by system marginal cost. On the other hand, in the REM, distribution and supply systems are unbundled. With the introduction of the distribution system operator (DSO), the retail electricity market was introduced, whose primary task is to purchase energy from the WEM and transfer it to customers [11]. The DSO acts as a market service gateway that regulates and provides access to the distribution network to the retail supplier, who delivers electricity to the end-users [12].  
Figure 1: Breakdown of global renewable energy use for 2030 roadmap [5].