Rats are capable of feeling regret about their own actions, an emotion that has never previously been found in any other mammals apart from humans.
Researchers set up a test called Restaurant Row in which the rats had to decide how long to wait for food.
“It's like waiting in line at the restaurant,” Professor David Redish, of Minnesota University, told BBC Nature News. "If the line is too long at the Chinese restaurant, then you give up and go to the Indian restaurant across the street."
In some cases, the rats decided to move on from one “restaurant” that offered nice food but was taking too long, only to find the next one offered a less popular dish.
Faced with this scenario, the rats often stopped and looked back at the previous restaurant and were more likely to wait for longer for something nice.
Professor Redish said they had had to be careful to design the study so that they could monitor signs of regret and not just disappointment.
"Regret is the recognition that you made a mistake, that if you had done something else, you would have been better off," he said.
"The hard part was that we had to separate disappointment, which is just when things aren't as good as you hoped. The key was letting the rats choose."
The study, published in “Nature Neuroscience”, questions claims that regret is a uniquely human emotion.
"In humans, a part of the brain called the orbitofrontal cortex is active during regret. We found that in rats recognising that they made a mistake, their orbitofrontal cortex represented the missed opportunity," Professor Redish said.
"Interestingly, the rat's orbitofrontal cortex represented what the rat should have done, not the missed reward. This makes sense because you don't regret the thing you didn't get, you regret the thing you didn't do."
Dr Mark Walton, of Oxford University, who reviewed the research, said the findings were significant and praised the methodology. "It is a clever way to look at cognitive processes, seeing how rats perform these tasks can open up how they think and behave in the wild," he said.
Kole vows to eat rats at Museveni tour
Rats eat newly born baby in Kibaale
Rats to de-mine northern Uganda
Rats invade Moyo district