The simple answer is that no one has programmed computers to dream, yet. The more complicated answer is that there is no consensus on the mechanism and purpose of dreaming, yet.
See my Quora answers related to Computational Dreaming:
- How do we create artificial intelligence which dreams?
- Will computers ever be able to think “out of the box”?
- Is there a natural language processor in existence that can actually extract semantic content from real human conversation?
- What algorithms model the imagination in agent or multi-agent systems?
- Is it possible to explain metaphors using discourse analysis frameworks, or only with cognitive linguistic frameworks?
- How are metaphors handled in AI / NLP / ML?