Get the latest tech news
Baby Steps into Genetic Programming
Table of Contents - 1 Introduction - 2 Generating Random Code - 3 Running Generated Code - 4 Population - 5 Fitness - 6 Generation Functions - 7 Advancing a Generation - 8 Conclusion - 9 Thanks 1 Introduction While my final ranking in the Google AI Contest was disappointing (280th), it was a very educational experience and was totally offset by Gábor Melis' dominating win using Common Lisp as well. One of things that piqued my interest during the contest was a post on the AI Challenge forums about a bot written using genetic programming.
We need a way to test the output of a generated function against our desired outcome and represent this as a number: the fitness. We also need to check whether the return value of RUN-FORM is NIL in which case it executed illegal code. The TEST-INPUT argument is a list of input values so the most direct approach will be to iterate over these values and running both the form and the fitness functions against them.
Or read this on Hacker News