Ethologists are convinced that many animals survive through learning—but learning that is dictated by their genetic programming, learning as thoroughly stereotyped as the most instinctive of behavioral responses.
This seems very convoluted structure to me. can anyone explain what is the relation between two parts of sentence before comma and after comma in the part "but learning that is dictated by their genetic programming, learning as thoroughly stereotyped as the most instinctive of behavioral responses". This part starting with the word "learning" before comma and after comma as well, what is their relation here?