Agriculture and the development of complex societies