If you're interested in writing software that genetically writes other software, check out this amazing book by Koza. It's one of my favorite books that I have on my shelf. Armed with this book and a computer, you can have a ton of fun.
In that book, the author dedicates a chapter to virtual ants, and evolves programs for the ants that control where they move and what search strategies they use based on sensor inputs. And that's by far not the most interesting type of program he evolves. It's a thick book, and there are things like evolving a program to drive a tractor trailer and back it into a loading dock.
As a little bonus, this book was how I ended up understanding the vital importance of AST's, and it's how I first "groked" LISP. LISP isn't a pre-requisite to understanding the book, but you'll understand the big concepts by the end.
This is one of my most prized computer books, perhaps the most prized book I have. Even though I wasn't a Lisper when I started reading this book, I ended up building (without realizing it at first) a little Lisp inside Python for exploring the concepts.
If you thought Koza's old website is inspiring, consider getting this book. It's huge and expensive, but to me it feels like one of the 3 books I'd want to bring with me to a desert island or through the destruction of civilization.
Fresh book recommendations delivered straight to your inbox every Thursday.