Spiders are excellent at adapting to environmental conditions. It’s hard to call an arachnid “smart,” but they are very reactive and make changes in their habits quickly if it’s too their advantage.
I had a family of Jumping Spiders who lived on my kitchen windowsill.
I caught flies for them and they learned to rush out whenever I was near their window, in hopes of a supper, taking the flies right from my fingers.
Sadly, daddy long-legs spiders moved in and ate them.
:(
*Footnote: Now the daddy long-legs spiders have been replaced with house spiders.
Not terribly social but they do a great job with the gnats and fruit flies that often plague us.