An experiment with a “vending machine for crows” is revealing insights into how intelligence evolves, scientists say.