Archived

This topic is now archived and is closed to further replies.

Gen5.org Genetic Prog. Tutorial Questions

This topic is 5104 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''ve begun working on this genetic programming tutorial with a pretty basic understanding of lisp. For starters I have defined lists of terminators and operators for use in generation and later mututation of leaves as well as the solution tree defined as ''(OR (AND (NOT A) B) (AND A (NOT B))) to test against the various generated trees Right now I have the following (primary) functions: 1. make-random-tree, which generates a tree from the available operators { and, or, not } and terminators { a, b } up to MAX-DEPTH 2. test-fitness, which sets the globals A and B to alternating NIL/T values, EVAL''ing the given tree and comparing its return value to the evaluation of the global solution tree As I''m still shaky in using lists for anything other than mundane tasks, I''m having difficulty with the next step, the crossover. While I have come up with a few ways to handle of this, none of them feel very natural or well-formed. Specifically, I am at a loss how to randomly select a node on one of the two parent trees and swap it with a node on the other (specifically the random selection, my current method is sloppy without outside direction). The second part of this concern is whether I should only consider the intersect of the nodes (their placement, that is) between the two so that I can guarantee the tree never grows beyond MAX-DEPTH. Hopefully that was worded well and made some sense. Cheers and thanks.
If a plant cannot live according to its nature, it dies; so a man.

Share this post


Link to post
Share on other sites
With the help of the Corman and Common Lisp Yahoo groups I think I have the random selection and such out of the way which leaves the more subtle pieces left for me. If anyone is interested at any point in this feel free to e-mail me. Cheers.

Share this post


Link to post
Share on other sites