Deconstructing Cooperation and Ostracism via Multi-Agent Reinforcement Learning