Efficient allocation is important in nature and human society, where individuals frequently compete for limited resources. The Minority Game (MG) is perhaps the simplest toy model to address this issue. However, most previous solutions assume that the strategies are provided a priori and static, failing to capture their adaptive nature. Here we adopt the reinforcement learning paradigm to the MG, where individuals' decision-making is guided by their experience and the expectation of future rewards. By regulating the balance between exploration and exploitation in individual decision-making, the study reveals diverse collective behaviors. We find that the optimal allocation is reached when individuals appreciate both the experience and the rewards in the future and can balance the exploitation of their experiences with exploration by randomly acting. When the balance of the exploitation and exploration is broken, only partial coordination is observed; in some scenarios, anticoordination may occur, a phenomenon where the coordination is even worse than the scenario where every individual acts purely randomly. Mechanism analysis reveals a symmetry-breaking of action preferences that underlines optimal coordination, where resource utilization reaches its maximum, and the dynamics behind its destabilization. These findings are robust to the population size and the resource capacity. Our work thus provides a different solution to the MG and valuable insights into the resource allocation problems in general.