Modelling the effect of learning and evolving rules on the use of common-pool resources