The evolution of stupidity