NEW YORK, NY — Scientists say ravens can think about the future.

In a series of tests, ravens showed signs of a general planning ability that previously had only been documented in people and great apes. Even monkeys have failed to demonstrate it. Ravens showed they could plan by setting aside a tool that they suspected would get them a treat later. And they prepared for future bartering, too. (For more Across America news, click here to sign up for real-time news alerts. If you have an iPhone, click here to get the free Patch iPhone app.)

Watch: New Research Shows Ravens Can Plan For Future Still, it's impressive. Ravens, along with crows, jays and others, belong to a bird group called corvids. Some corvids have shown that in hoarding food, they do some planning for the future instead of just acting on natural urges. But does such foresight appear only for that behavior, as has been proposed? Or can corvids, like people and great apes, apply it to other activities?

This more general planning ability results from the combination of several skills, and if it appears in both corvids and great apes, it must have evolved more than once, the Swedish researchers said. So the researchers, Can Kabadayi and Mathias Osvath of Lund University, tested five captive ravens in two tasks they don't do in the wild: using tools and bartering with humans. They reported the results in a paper released Thursday by the journal Science.

A raven's memories are for the future: https://t.co/P7V5oMd88I pic.twitter.com/ljMQenrrDA

— Science Magazine (@sciencemagazine) July 13, 2017 The birds were shown a box that had a tube sticking out of the top, plus three stones. They learned that they could use a stone as a tool. If they dropped it down the tube, the box would release a coveted doggie treat. They also learned that some other familiar objects, like a small wooden wheel and a ball, would not work.

Now the fun began.

In one experiment, the ravens were shown the box, but without any stones available. Then the box was taken away. An hour later, in another location, they were presented with a tray containing a stone plus three objects the birds knew would be useless for releasing the treat. They were allowed to choose one thing from the tray. Fifteen minutes later, the box would show up again. Sure enough, in 14 cases of encountering the tray and later seeing the box reappear, they usually chose the stone and proceeded to use it correctly.