Monte Carlo smart, not optimized compiler smart.
Like the way slime molds solve mazes: explore every possible path in parallel, and push growth in all areas with greater nutrient gradients. Not by sensing any gestalt clues, like symmetries in the maze design.
Astoundingly stupidly smart.