Consciousness is a by-product of evolution. If we try to understand what drove evolution to create consciousness, we understand the attribute itself much better. Here are some of my notes in trying to weave together a perspective on evolution, and what light it sheds on consciousness.
Notes on Consciousness through evolution