The evolution of cognitive brains in non-mammals