Discovering Adaptable Symbolic Algorithms from Scratch