Towards a framework for the evolution of artificial general intelligence