I noticed that most of the errors the AI is making in its code are because it can't anticipate the _behaviour_ of the program. The syntax is fine. Then I realised "oh yeah, that's the Turing halting problem". Undecidable. No AI or human will ever solve it in general.