←
^
→
Genetic Algorithms
GP Example
Find program that turns any block configuration into a single stack that spells “UNIVERSAL.”
CS = name of top block on stack, or F.
TB = name of topmost correct block on stack.
NN = name of next block that needs to be on stack.
MS x = if x is on table then move to stack, else return F.
MT x = if x is on stack then move the block on top of tack to table.
EQ x y, NOT x
DU x y = do x until y returns true.
What happened? After 10 generations, with 166 test problems, the program found
(EQ (DU (MT CS)(NOT CS)) (DU (MS NN) (NOT NN)))
which solved all 166 problems.
José M. Vidal
.
15 of 18