A study of chimps, gorillas and other great apes, including human children, sheds light on how laughter has evolved.