This starts with some interesting stuff that is new to me (though actually quite old) and leads us through a lifetime of thinking towards a view of consciousness and “qualia” that seems to be quite close to (and perhaps an improvement of) my own.
Consciousness, as I see it, seems to involve having a mental model of one’s own mental state. So the qualia of redness corresponds not so much to the sensation of seeing red as to the knowledge that one is seeing red. The evolutionary pressure to evolve such a capacity might arise in any species whose members have to modify their behaviour in response to inferences about their environments – as awareness of the possibility of being wrong might well have survival value. (For example having a mental state that includes some representation of “I see stripes” may allow the individual to evaluate the appropriate response in a more nuanced way than just having a built in algorithm that jumps back in fear of a tiger rather than considering the possibility that the tall grass may yield edible seeds.)
With this in mind though, I can imagine that the fish which passes the mirror test and the octopus which learns how to open a lock might also be in a position where there is some reproductive advantage to be gained from having a mental model of one’s own mental state. For the fish I find it hard to imagine where the necessary neural complexity might be located; but for the octopus, as I think I’ve been told, there seems to be neural complexity throughout the entire body. And so I would not be so quick to dismiss the possibility of their “consciousness”.