We use directed search techniques in the space of computer programs to learn recursive sequences of positive integers. Specifically, the integer sequences of squares, x; cubes, x; factorial, x!; and Fibonacci numbers are studied. Given a small nite pre x of a sequence, we show that three directed searches|machine-language genetic programming with crossover, exhaustive iterative hill climbing, and a hybrid (crossover and hill climbing)|can automatically discover programs that exactly reproduce the nite target pre x and, moreover, that correctly produce the remaining sequence up to the underlying machine's precision. Our machine-language representation is generic|it contains instructions for arithmetic, register manipulation and comparison, and control ow. We also introduce an output instruction that allows variablelength sequences as result values. Importantly, this representation does not contain recursive operators; recursion, when needed, is automatically synthesized from primitive instructions. For a xed set of search parameters (e.g., instruction set, program size, tness criteria), we compare the e ciencies of the three directed search techniques on the four sequence problems. For this parameter set, an evolutionary-based search always outperforms exhaustive hill climbing as well as undirected random search. Since only the pre x of the target sequence is variable in our experiments, we posit that this approach to sequence induction is potentially quite general.
[1]
Richard M. Friedberg,et al.
A Learning Machine: Part I
,
1958,
IBM J. Res. Dev..
[2]
Richard M. Friedberg,et al.
A Learning Machine: Part II
,
1959,
IBM J. Res. Dev..
[3]
M. Boden.
Arti cial Intelligence and Natural Man
,
1977
.
[4]
R. J. Joenk,et al.
IBM journal of research and development: information for authors
,
1978
.
[5]
Nichael Lynn Cramer,et al.
A Representation for the Adaptive Generation of Simple Sequential Programs
,
1985,
ICGA.
[6]
Andrew W. Appel,et al.
A Standard ML compiler
,
1987,
FPCA.
[7]
Robin Milner,et al.
Definition of standard ML
,
1990
.
[8]
Zbigniew Michalewicz,et al.
Genetic Algorithms + Data Structures = Evolution Programs
,
1992,
Artificial Intelligence.
[9]
John R. Koza,et al.
Genetic programming - on the programming of computers by means of natural selection
,
1993,
Complex adaptive systems.
[10]
Peter Nordin,et al.
A compiling genetic programming system that directly manipulates the machine-code
,
1994
.
[11]
Simon Handley.
A new class of function sets for solving sequence problems
,
1996
.
[12]
Una-May O'Reilly,et al.
A comparative analysis of genetic programming
,
1996
.
[13]
L. Huelsbergen,et al.
Toward simulated evolution of machine-language iteration
,
1996
.