I notice you left out division---presumably you
don't want to have to deal with errors
from the eval statement?
Yup that was one of the reasons. It would have made
the program longer that it already is.
Programs with errors in them are not a problem
as long as they have different fitness values.
For instance as long as program with one error in it has a
higher fitness as a program with two errors in it.
If all programs that do not evaluate correctly,
result in the same fitness value there is no way
for the algorithm to gradually move to a better solution.
GP works only if there are intermediate solutions.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
Outside of code tags, you may need to use entities for some characters:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||