SOCIAM Book: The Theory and Practice of Social Machines