[Push] Success with ODD
Rud Merriam
k5rud at arrl.net
Thu May 13 00:56:17 EDT 2010
Finally, had a success with ODD.
First, I dropped back to trying a different problem: multiply the top of the
integer stack by 1 less than the top (X * X-1). This was a starting point
for solving for factorial. Found problems in various places and made the
fixes. I got this problem to work with various combinations of parameters.
So just now tried ODD and after 94 generations arrived at:
(CODE.= INTEGER.%) 4 INTEGER.% BOOLEAN.FROMFLOAT EXEC.STACKDEPTH ( (
CODE.= INTEGER.% CODE.CDR CODE.=) FLOAT.=) BOOLEAN.FROMINTEGER
Which simplifies to: EXEC.STACKDEPTH (INTEGER.%) BOOLEAN.FROMINTEGER
The solution gets cute by using the exec stackdepth to push 2 on the stack
which is used for the integer modulus to produce a 1 or 0, which is then
converted to the boolean.
Parameters (that I'm controlling right now) were:
EVALPUSH-LIMIT=50
MAX-POINTS-IN-RANDOM-EXPRESSIONS=15
MIN-POINTS-IN-RANDOM-EXPRESSIONS=5
RANDOM-SEED=52432
max_programs=1000
tourney_size=4
generations=150
crossover=80
mutation=15
duplicate=5
Fitness test was 50 for not stopping, 100 for no boolean value, 10 for wrong
test result, and 5 for each time the current and previous boolean value were
the same (penalty for constant values).
----
I'm surprised at the sensitivity of parameters in getting solutions. For
example, changing tournament size from 2 to 3 or 4 might result in no
solution when a solution had been found, or the reverse. Or changing the
random seed can change from getting a solution to not.
- 73 -
Rud Merriam K5RUD
http://mysticlakesoftware.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.hampshire.edu/pipermail/push/attachments/20100512/76ce3c6c/attachment.htm>
More information about the Push
mailing list