A multi-agent reinforcement learning model of common-pool resource appropriation