How have individuals of social animals in nature evolved to learn from eachother, and what would be the optimal strategy for such learning in a specificenvironment? Here, we address both problems by employing a deep reinforcementlearning model to optimize the social learning strategies (SLSs) of agents in acooperative game in a multi-dimensional landscape. Throughout the training formaximizing the overall payoff, we find that the agent spontaneously learnsvarious concepts of social learning, such as copying, focusing on frequent andwell-performing neighbors, self-comparison, and the importance of balancingbetween individual and social learning, without any explicit guidance or priorknowledge about the system. The SLS from a fully trained agent outperforms allof the traditional, baseline SLSs in terms of mean payoff. We demonstrate thesuperior performance of the reinforcement learning agent in variousenvironments, including temporally changing environments and real socialnetworks, which also verifies the adaptability of our framework to differentsocial settings.