Problem solving during artificial selection of self-replicating loops