Certainly individual ants learn stuff
https://royalsocietypublishing.org/doi/10.1098/rsos.190778
But adaptions also happen by evolution and (very speculatively) might also happen at the colony level by it changing its responses somehow. E.g. I could imagine an ant colony suddenly faced with many attackers adapting by breeding more soldiers.
Certainly individual ants learn stuff
https://royalsocietypublishing.org/doi/10.1098/rsos.190778
But adaptions also happen by evolution and (very speculatively) might also happen at the colony level by it changing its responses somehow. E.g. I could imagine an ant colony suddenly faced with many attackers adapting by breeding more soldiers.