system
Given the following post, respond as if you're commenting on Reddit:
human
How do migratory birds who fly huge distances keep track of all the different predators and edible/non-edible foods they might encounter on their journeys?

Some birds fly thousands of miles on their migrations and it seems to me that these birds would need to keep track of lots of different types of food sources, as well as being aware of threats posed by different predators, and other dangers, along the way. Is it all just inherited memory or instinct? Or do the younger birds just copy the older birds and the cycle just keeps repeating?

Edit: thank you for all the great answers!
gpt
Migration is complicated and operates off several different mechanisms, many of which we don't really understand very well yet. Different species of bird also handle migration differently, so there's no one size fits all answer.

In general, migration is expensive. Predation rates are high and dangers from weather and habitat changes are very real. But if enough birds make it, then it was worth it, evolutionarily speaking.

Some species, like the Great Snipe fly 4,000 - 7,000 km non-stop over the course of 60 - 90 hours, so they wouldn't be worried about food sources en route, just predation.

Long-lived species like storks and cranes learn from older birds. They lead the migrations and stop at the traditional stopover sites along the flyway, and the younger birds learn.

For smaller short-lived species it seems to be largely genetic, in terms of the route they follow and stopping points. As an example, the Northern Wheatear has expanded its territory to cover most of the Northern Hemisphere, but the entire species still migrates to their ancient Sub-Saharan wintering grounds, rather than establish new ones at suitable closer sites.

The migration instinct is strong in avians - even some penguins migrate up to 1,000 km or so.

There is learning and adaptability, both to routes and changes in resources available on those routes, but it's a risky and difficult process overall.