I guess just hard to tell how much of that is attributable to cognition inside the brain of each ant, and how much is network effects with each ant responding in individually stupid ways to the pheromone (and other) signals they create.
Each ant could be very dumb while the system of ants as a whole are quite "smart" (I.e. exhibit complex and interesting behaviours).
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.
Each ant could be very dumb while the system of ants as a whole are quite "smart" (I.e. exhibit complex and interesting behaviours).