Psychology of a superorganism