It's late at night, you are in a town that you don't know very well and all the restaurants are closing.
You are famished, and spot a stall that will sell you a small snack.
Should you take the snack or venture further, hoping to find a place that will serve you a hearty meal but knowing that you may also find nothing?
Most of us would go for the safe option -- we prefer to have at least a little to eat rather than take the risk of going hungry if the quest for a bigger reward goes awry.
Scientists have carried out an innovative experiment among our closest relatives, chimpanzees and bonobos, in an attempt to explain why this is so.
In a paper appearing on Wednesday in Biology Letters, published by Britain's Royal Society, US and German animal behaviouralists recruited five chimps and five bonobos at a primate research centre at Leipzig Zoo, eastern Germany.
The apes had to choose between two upside-down bowls.
One was the "safe" bowl, which always covered four grape halves.
The other was the "risky" bowl, which covered between one piece and as many as seven pieces of grape halves.
Chimpanzees turned out to be big risk-takers, being invariably tempted to go for the grand prize even if this also meant frequent disappointment.
Bonobos, like humans, were strongly risk-adverse, and preferred to go for the fixed, dependable reward.
The chimps' love of risk is in keeping with previous findings. Compared with bonobos, chimpanzees are more patient, waiting longer to get their hands on a delayed treat.
And their risk-taking strategy is also confirmed by the fact that, unlike bonobos, they hunt, kill and eat colobus monkeys. If the hunt comes off, the group gets to feast on protein-rich colobus meat -- if not, they all go hungry.
The distinction is intriguing, because in many respects the two primate species are very similar, having diverged from a common ancestor less than a million years ago, which in evolutionary terms is recent.
They have similar body size and appearance and share much of the same behaviour and social hierarchy.
The difference, though, lies in their diet. Both apes feed heavily on fruit, but bonobos also tuck into herbaceous vegetation on the ground, which is a more reliable source of sustenance.
In addition, bonobos may also have access to larger fruit patches, facing less competition within a given patch than chimpanzees.
So what makes chimps gamble is a clever survival mechanism -- their food resources are less certain, which means they have learnt to cope with going for big or bust, say the authors, led by Sarah Heilbronner of Harvard University and Duke University, North Carolina.
The results show how ecological pressures can sculpt decision-making, a tenet that also applies to humans, they believe.
"As humans did not evolve in the context of modern economies, many of our preferences are likely tailored to providing adaptive foraging and other evolutionary-relevant decisions," they say.
Thus, when you venture into the urban jungle late at night, with your eyes, ears and nose alert to the sight, sizzle and smell of a double cheeseburger, you are obeying the same genetic drivers as your hunter-gatherer forebears, millions of years ago.