Self-learning Neural Algorithms