Fish have some form of intelligence, but really it's all based upon their instincts of survival. What's good, what's bad, is all "learned" by how it affects them.
My fish recognize the food in my hand. And the algae brush/scraper/gravel vac. So they are happy at the top when they see food, and go to the otherside of the tank when they see the cleaning stuff. Some have even "learned" that they don't need to fear my cleaning stuff and they come to investigate.
When they see the net however, they all hide under my driftwood, in the plants and in the corner. I was losing fish for a while for no real reason. And took out giant danio's that I had.