The evolution of fundamental neural circuits for cognition in silico