Most impressive demo I saw at MIT AI Lab when a student there was Tom Ray's Tierra, basically this idea, 30 years ago.
At the time I learned about Tierra I didn't have a way to get at any of Ray's papers or code. Now I do, but I'd kinda forgotten about it. I really should revisit it. There's probably a lot of fun to be had there.
Aside: Steven Levy's "Artificial Life"[1] was where I learned about Tierra. That book, along with Levy's "Hackers"[2], and Gleick's "Chaos"[3] were formative books for young me.
[0] https://en.wikipedia.org/wiki/Core_War
[1] https://www.amazon.com/Artificial-Life-Frontier-Computers-Bi...
[2] https://www.amazon.com/Hackers-Computer-Revolution-Steven-Le...
[3] https://www.amazon.com/Chaos-Making-Science-James-Gleick/dp/...
Genius. Thanks!