Neuroscientists find first evidence animals can mentally replay past events. Researchers have reported the first evidence that non-human animals can mentally replay past events from memory. The discovery could help improve the development of drugs to treat Alzheimer's disease by providing a way to study memory in animals that more closely addresses how memory works in people. Source 5z.
This is no surprise to me and is most evident in dogs because they can look for you in certain place they remember you go or act a certain way based on things you've done with them in past. Animals aren't stupid.