Multilevel development of cognitive abilities in an artificial neural network