Comparing Visual Reasoning in Humans and AI