Kyle I S Harrington / kyle@eecs.tufts.edu
Generate a random solution, s (may be a model, parameters, etc.)
Loop until s is correct:
Create an alternative solution, m, by mutating s
Compare the fitness/quality/accuracy of s and m
If m is better, then replace s with m
Otherwise, do nothing
Repeat
Because this is easy:
(def program '(+ 1 1))
(eval program) => 2
(def new-program (cons '- (rest program))) => (- 1 1)
(eval new-program) => 0
Note: the single quote tells the interpreter not to evaluate the code that follows