Archaeology shows how ancient African societies managed pand