Organizing my thoughts – Exploring Genetic Programming (Part 2)

Since the last update I’ve had the time to look into the Robocode code base as well as start reading A Field Guide to Genetic Programming. It was all a bit overwhelming! Especially as I want to implement my robots in Clojure and that will require some additional setup to make it work. I’ve since calmed down (🤪) and I’m starting to understand it all a bit better. I guess, I will just have to live with the fact that I need to read the book before diving into the implementation. It’s kinda hard to do. 😬

What really helped was the talk by Lee Spector about Genetic Programming in Clojure. Not only does he have example code in Clojure available to use, but he also talked about the Push language and why that’s a better language to use for the task. One of the issues with genetic programming is that mutation and crossover of syntax trees can easily produce programs that just don’t make sense. After all, there’s only a limited amount of programs that actually work. Push gets around this by being a stack based language with separate stacks for each data type and the additional rule that functions just do nothing when the respective stack is empty. There’s multiple implementations of the Push language, one by Lee Spector and team in Clojure, so I probably don’t need to implement it myself. Although, that would be fun as well, but it’s probably a bit out of scope.

Next steps:

  • Continue reading A Field Guide to Genetic Programming
  • Look into robocode and how to execute the environment from Clojure (it’s been done before)
  • Integrate the above robocode stuff with Push

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s