[Cs254f11] a complete GP system

Wm. Josiah Erikson wjerikson at hampshire.edu
Thu Oct 20 15:43:07 EDT 2011


Lee mentioned clojure.zip, so I decided to look it up, and am so far 
finding this tutorial pretty easy to understand. I guess I'll find out 
when I go to actually use it, but in case you find it useful:

http://www.exampler.com/blog/2010/09/01/editing-trees-in-clojure-with-clojurezip/

     -Josiah


On 10/18/11 10:35 PM, Lee Spector wrote:
> Here's a big step up from the simple genetic algorithm code that I sent out previously and which we covered in class yesterday:
>
> https://gist.github.com/1297325
>
> This is a complete genetic programming system that solves (sometimes) the same symbolic regression problem that's used in Chapter 4 our our text. It's not exactly the same as the algorithm that they describe there -- I use some different parameters and do a couple of things slightly differently -- because I've tried to strike a balance between doing things in the standard/efficient way and writing relatively simple and clear Clojure code.
>
> Note BTW that a couple of things could be done even more concisely (e.g. the "insert" and "extract" functions), but I also wanted to avoid using fancy Clojure stuff that we haven't gone over in class, like clojure.zip and clojure.walk.
>
> The result is not quite as simple as the earlier genetic algorithm code that I shared (and it's also not exactly what you might end up with following the hints and exercises in clojinc), but it's still fairly concise and all of you should be able to understand it if you study it carefully.
>
> I also think that this is pretty close, in most important respects, to the GP algorithms that professionals use for real problems. And it is certainly a good starting point for exploration and extension.
>
> You should feel free to modify/reuse this code in your own work, with attribution. But you should understand everything that you use!
>
> I will go over it in detail in class.
>
>   -Lee
>
> --
> Lee Spector, Professor of Computer Science
> Cognitive Science, Hampshire College
> 893 West Street, Amherst, MA 01002-3359
> lspector at hampshire.edu, http://hampshire.edu/lspector/
> Phone: 413-559-5352, Fax: 413-559-5438
>
> _______________________________________________
> Cs254f11 mailing list
> Cs254f11 at lists.hampshire.edu
> https://lists.hampshire.edu/mailman/listinfo/cs254f11

-- 
Wm. Josiah Erikson
Network Engineer
Hampshire College
Amherst, MA 01002
(413) 559-6091



More information about the Cs254f11 mailing list