From Basic Affordances to Symbolic Thought: A Computational Phylogenesis of Biological Intelligence