Our Weird Dreams May Help Us Make Sense of Reality, AI-Inspired Theory Suggests