I was first impressed with insects when I saw a scientific study on a TV show. If anyone else saw it they can correct any faulty memories I have. I remember a scientist wanted to determine whether spiders could analyze situations or if they reacted on pure instinct. The scientist put a spider in a glass cage. The spider spun a perfectly symmetrical web. The scientist placed a fly in the same location of the web each day (not in the center), and the spider re-spun the web to strengthen it to where the fly appeared.
Conclusion: There was some "thinking" going on.