Getting into my area now. All animals have a part of the brain between the hemispheres called the limbic brain. This deals with autonomic and lesser instinctive functions. We too have this area. What is different about higher primates including ourselves is apart of the brain called the neo-cortex. This deals with intell. and problems and reasoning. That is what makes us intellectually different to fish. I agree you can train a fish to do tricks, but again it based on the feed and reward instint principle as in the PDS(pavlov's dog syndrome). You cannot ask a fish to do any sort of trick if you don't reward it with anything. It's not memory that makes a fish do tricks, it's an instinct for survival. Like myself, I am now a black belt 2nd dan in Aikido. (non-practicing...feeling too old and decrepid)A lot of the moves I had to learn again and again, and yes I had spent several months tweking the moves until one day it became totally instinctive. I would dare say if I were to be attacked, I wouldn't have to think thus using memory to defend myself. It would hopefully come naturally-instinctively.
Probably after the event I would engage my brain and think o poo did I do that? OR word to that effect.