Conference PaperPDF Available

Solving even-parity problems using traceless genetic programming

Authors:

Abstract and Figures

A genetic programming (GP) variant called traceless genetic programming (TGP) is proposed in this paper. TGP is a hybrid method combining a technique for building the individuals and a technique for representing the individuals. The main difference between TGP and other GP techniques is that TGP does not explicitly store the evolved computer programs. Two genetic operators are used in conjunction with TGP: crossover and insertion. TGP is applied for evolving digital circuits for the even-parity problem. Numerical experiments show that TGP outperforms standard GP with several orders of magnitude.
Content may be subject to copyright.
Solving Even-Parity Problems using
Traceless Genetic Programming
Mihai Oltean
Department of Computer Science
Faculty of Mathematics and Computer Science
Babes¸-Bolyai University, Kog
˘
alniceanu 1
Cluj-Napoca, 3400, Romania
Email: moltean@cs.ubbcluj.ro
AbstractA new Genetic Programming (GP) variant called
Traceless Genetic Programming (TGP) is proposed in this paper.
TGP is a hybrid method combining a technique for building
the individuals and a technique for representing the individuals.
The main difference between TGP and other GP techniques
is that TGP does not explicitly store the evolved computer
programs. Two genetic operators are used in conjunction with
TGP: crossover and insertion. TGP is applied for evolving digital
circuits for the even-parity problem. Numerical experiments
show that TGP outperforms standard GP with several orders
of magnitude.
I. INTRODUCTION
Traceless Genetic Programming (TGP)
1
is a GP [2], [3]
variant as it evolves a population of computer programs. TGP
is a hybrid method combining a technique for building the
individuals and technique for representing the individuals.
The main difference between the TGP and GP is that TGP
does not explicitly store the evolved computer programs. TGP
is useful when the trace (the way in which the results are
obtained) between the input and output is not important. In
this way the space used by traditional techniques for storing
the entire computer programs (or mathematical expressions in
the simple case of symbolic regression) is saved.
We choose to apply the proposed TGP technique to the
even-parity problems because according to Koza [2] these
problems appear to be the most difficult Boolean functions
to be detected via a blind random search.
Evolutionary techniques have been extensively used for
evolving digital circuits [1], [2], [3], [8], [4], [5], [6], [7],
[11], due to their practical importance. The case of even-
parity circuits was deeply analyzed [2], [3], [8], [7] due to
their simple representation.
Special techniques have been proposed in order to improve
in standard GP: Automatically Defined Functions [3], Sub-
machine code GP [9] and Sub-symbolic node representation
[10].
Standard GP was able to solve up to even-5 parity. Using the
proposed TGP we are able to easily solve up to even-8 parity
problem. Numerical experiments show that TGP outperforms
standard GP with several order of magnitude.
1
The source code for TGP is available at www.tgp.cs.ubbcluj.ro.
The paper is organized as follows: In section II the Traceless
Genetic Programming technique is described. The parity prob-
lem is briefly presented in section III. In section IV several
numerical experiments for solving the parity problems are
performed.
II. TRACELESS GENETIC PROGRAMMING
In this section the proposed TGP technique is described.
TGP is a hybrid method combining a technique for building
the individuals and a technique for representing the individu-
als.
A. Prerequisite
The quality of a GP individual is usually computed using a
set of fitness cases [2], [3]. For instance, the aim of symbolic
regression is to find a mathematical expression that satisfies a
set of m fitness cases.
We consider a problem with n inputs: x
1
, x
2
, ...x
n
and
one output f. The inputs are also called terminals [2]. The
function symbols that we use for constructing a mathematical
expression are F = {+, , , /, sin}.
Each fitness case is given as a (n + 1) dimensional array
of real values:
v
k
1
, v
k
2
, v
k
3
, ..., v
k
n
, f
k
where v
k
j
is the value of the j
th
attribute (which is x
j
) in the
k
th
fitness case and f
k
is the output for the k
th
fitness case.
Usually more fitness cases are given (denoted by m) and
the task is to find the expression that best satisfies all these
fitness cases. This is usually done by minimizing the quantity:
Q =
m
X
k=1
|f
k
o
k
|,
where f
k
is the target value for the k
th
fitness case and o
k
is
the actual (obtained) value for the k
th
fitness case.
B. Individual representation
Each TGP individual represents a mathematical expression
evolved so far, but the TGP individual does not explicitly
store this expression. Each TGP individual stores only the
obtained value, so far, for each fitness case. Thus a TGP
individual is:
(o
1
, o
2
, o
3
, ..., o
m
)
T
,
where o
k
is the current value for the k
th
fitness case. Each
position in this array (a value o
k
) is a gene. As we said
it before behind these values is a mathematical expression
whose evaluation has generated these values. However, we
do not store this expression. We store only the values o
k
.
Remark
The structure of an TGP individual can be easily enhanced
for storing the evolved computer program (mathematical ex-
pression). Storing the evolved expression can provide a more
easy way to analyze the results of the numerical experiments.
However, in this paper, we do not store the trees associated
with the TGP individuals.
C. Initial population
The initial population contains individuals whose values
have been generated by simple expressions (made up a
single terminal). For instance, if an individual in the initial
population represent the expression:
E = x
1
,
then the corresponding TGP individual is represented as:
C = (v
1
1
, v
2
1
, v
3
1
, ..., v
m
1
)
where v
k
j
has been previously explained.
The quality of this individual is computed using the equation
previously described:
Q =
m
X
i=1
¯
¯
v
k
1
f
k
¯
¯
.
D. Genetic Operators
In this section the genetic operators used in conjunction with
TGP are described. TGP uses two genetic operators: crossover
and insertion. These operators are specially designed for the
proposed TGP technique.
1) Crossover: The crossover is the only variation operator
that creates new individuals. For crossover several individuals
(the parents) and a function symbol are selected. The offspring
is obtained by applying the selected operator for each of the
genes of the parents.
Speaking in terms of expressions, an example of TGP
crossover is depicted in Figure 1.
From Figure 1 we can see that the parents are subtrees of
the offspring.
The number of parents selected for crossover depends on
the number of arguments required by the selected function
symbol. Two parents have to be selected for crossover if
the function symbol is a binary operator. A single parent
needs to be selected if the function symbol is a unary operator.
Example 1
Let us suppose that the operator + is selected. In this case
two parents:
C
1
= (p
1
, p
2
, ..., p
m
)
T
and
C
2
= (q
1
, q
2
, ..., q
m
)
T
are selected and the offspring O is obtained as follows:
O = (p
1
+ q
1
, p
2
+ q
2
,..., p
m
+ q
m
)
T
.
Example 2
Let us suppose that the operator sin is selected. In this case
one parent:
C
1
= (p
1
, p
2
, ..., p
m
)
T
is selected and the offspring O is obtained as follows:
O = (sin(p
1
), sin(p
2
),..., sin(p
m
))
T
.
2) Insertion: This operator inserts a simple expression
(made up of a single terminal) in the population. This operator
is useful when the population contains individuals representing
very complex expressions that cannot improve the search.
By inserting simple expressions we give a chance to the
evolutionary process to choose another direction for evolution.
E. TGP Algorithm
Due to the special representation and due to the newly
proposed genetic operators, TGP uses a special generational
algorithm which is given below:
The TGP algorithm starts by creating a random population
of individuals. The evolutionary process is run for a fixed num-
ber of generation. At each generation the following steps are
repeated until the new population is filled: With a probability
p
insert
generate an offspring made up of a single terminal
(see the Insertion operator). With a probability 1-p
insert
select
two parents using a standard selection procedure. The parents
are recombined in order to obtain an offspring. The offspring
enters the population of the next generation.
The standard TGP algorithm is depicted in Figure 2.
F. Complexity of the TGP Decoding Process
A very important aspect of the GP techniques is the time
complexity of the procedure used for computing the fitness of
the newly created individuals.
The complexity of that procedure for the standard GP is:
O(m g),
where m is the number of fitness cases and g is average
number of nodes in the GP tree.
Fig. 1. An example of TGP crossover.
Fig. 2. Traceless Genetic Programming Algorithm.
By contrast, the TGP complexity is only
O(m)
because the quality of a TGP individual can be computed
by traversing it only once. The length of a TGP individual is
m.
Due to this reason we may allow TGP programs to run g
times more generations in order to obtain the same complexity
as the standard GP.
III. PARITY PROBLEM
The Boolean even-parity function of k Boolean arguments
returns T (True) if an even number of its arguments are T.
Otherwise the even-parity function returns NIL (False) [2].
In applying TGP to the even-parity function of k arguments,
the terminal set T consists of the k Boolean arguments d
0
,
d
1
, d
2
, ... d
k1
. The function set F consists of four two-
argument primitive Boolean functions: AND, OR, NAND,
NOR. According to [2] the Boolean even-parity functions
appear to be the most difficult Boolean functions to be detected
via a blind random search.
The set of fitness cases for this problem consists of the 2
k
combinations of the k Boolean arguments. The fitness of an
TGP chromosome is the sum, over these 2
k
fitness cases, of
the Hamming distance (error) between the returned value by
the TGP chromosome and the correct value of the Boolean
function. Since the standardized fitness ranges between 0 and
2
k
, a value closer to zero is better (since the fitness is to be
minimized).
Several techniques have been used in the past for solving
the parity problems [2], [3], [8].
IV. NUMERICAL EXPERIMENTS
Several numerical experiments using TGP are performed in
this section using the even-parity problems. General parameter
of the TGP algorithm are given in Table I.
TABLE I
GENERAL PARAMETERS OF THE TGP ALGORITHM FOR SOLVING PARITY
PROBLEMS.
Parameter Value
Insertion probability 0.05
Selection Binary Tournament
Function set {gates} {AND, OR, NAND, NOR}
Terminal set Problem inputs
Number of runs 100
For assessing the performance of the TGP algorithm the
computational effort an the probability of success metrics [2]
are used.
The method used to assess the effectiveness of an algorithm
has been suggested by Koza [2]. It consists of calculating the
number of chromosomes, which would have to be processed
to give a certain probability of success. To calculate this figure
one must first calculate the cumulative probability of success
P (M, i), where M represents the population size, and i the
generation number. The value R(z) represents the number of
independent runs required for a probability of success (given
by z) at generation i. The quantity I(M, z, i) represents the
minimum number of chromosomes which must be processed
to give a probability of success z, at generation i. The formulae
are given by the equation (1), (2) and (3). Ns(i) represents
the number of successful runs at generation i, and N
total
,
represents the total number of runs:
P (M, i) =
Ns(i)
N
total
. (1)
R(z) = ceil
½
log(1 z)
log(1 P (M, i)
¾
. (2)
I(M, i, z) = M · R(z) · i. (3)
In the tables and graphs of this section z takes the value
0.99.
A. Even-3 parity
The number of fitness cases for this problem is 2
3
= 8. For
solving the even-3 parity we use a population of 50 individuals
evolved for 200 generations. Other TGP parameters are given
in Table I.
The effort and the probability of success of the TGP
algorithm are depicted in Figure 3.
Fig. 3. The cumulative probability of success and the computational effort
for the even-3 parity problem. Results are averaged over 100 runs.
The minimum effort is 33,750 and it was obtained at
generation 131. We want to compare the result obtained by
TGP with that obtained by standard GP.
In [2] GP was used for solving the even-3 parity prob-
lem using a population of 4000 individuals evolved for 51
generations. The results indicated that 80,000 individuals are
sufficient to be processed in order to obtain a solution for this
problem [2]. One of the obtained solutions is a tree with 45
nodes.
As we noted in section II-F, the complexity of computing
the fitness of the TGP individuals is g times lower (g is the
number of nodes in a GP tree) than the complexity of decoding
GP individuals.
Due to this reason we have to divide the TGP effort (33,750)
by 45 (the number of nodes in a GP tree for the even-3 parity
problem). Thus, the actual TGP effort is 750 which is with
2 orders of magnitude better than the result obtained by GP.
Note that a perfect comparison between GP and TGP cannot
be made due to their different individual representation.
B. Even-4 parity
The number of fitness cases for this problem is 2
4
= 16.
For solving the even-4 parity we use a population of 100 in-
dividuals evolved for 500 generations. Other TGP parameters
are given in Table I.
The effort and the probability of success of the TGP
algorithm are depicted in Figure 4.
The minimum effort is 240,000 and it was obtained at
generation 480.
The effort spent by GP for solving the parity problem is
1,276,000. This number was obtained using a population of
4000 individuals [2]. One of the solutions evolved by GP has
149 nodes.
Fig. 4. The cumulative probability of success and the computational effort
for the even-4 parity problem. Results are averaged over 100 runs.
If we want to compare the efforts spent by GP and TGP we
have to divide the TGP effort (240,000) by 149 (number of
nodes in a GP tree). Thus, we obtain the number 1610 which
is with almost 3 orders of magnitude better than the result
obtained by GP.
C. Even-5 parity
The number of fitness cases for this problem is 2
5
=
32. For solving the even-5 parity we use a population of
500 individuals evolved for 1000 generations. Other TGP
parameters are given in Table I.
The effort and the probability of success of the TGP
algorithm are depicted in Figure 5.
The effort is 2,417,500 and it was obtained at generation
967.
For this problem standard GP with a population of 8000
individuals obtained a solution in the 8
th
run [2]. No other
statistics were given for this problem.
D. Even-6 parity
The number of fitness cases for this problem is 2
6
=
64. For solving the even-6 parity we use a population of
1000 individuals evolved for 2500 generations. Other TGP
parameters are given in Table I.
The effort and the probability of success of the TGP
algorithm are depicted in Figure 6.
The minimum effort is 29,136,000 and it was obtained at
generation 2428.
E. Even-7 parity
The number of fitness cases for this problem is 2
7
=
128. For solving the even-7 parity we use a population of
2000 individuals evolved for 5000 generations. Other TGP
parameters are given in Table I.
Fig. 5. The cumulative probability of success and the computational effort
for the even-5 parity problem. Results are averaged over 100 runs.
Fig. 6. The cumulative probability of success and the computational effort
for the even-6 parity problem. Results are averaged over 100 runs.
The effort and the probability of success of the TGP
algorithm are depicted in Figure 7.
The minimum effort is 245,900,000 and it was obtained at
generation 4918.
F. Even-8 parity
The even-8 parity problem is the most difficult problem
analyzed in this paper. The number of fitness cases for this
problem is 2
8
= 256. For solving the even-8 parity we use a
population of 5000 individuals evolved for 10000 generations.
Other TGP parameters are given in Table I. Only 10 runs
are performed for this problem. In the 9
th
run we obtained a
solution.
Fig. 7. The cumulative probability of success and the computational effort
for the even-7 parity problem. Results are averaged over 100 runs.
V. SUMMARIZED RESULTS
Summarized results of applying Traceless Genetic Program-
ming for solving even-parity problems are given in Table II.
TABLE II
SUMMARIZED RESULTS FOR SOLVING THE EVEN-PARITY PROBLEM USING
TGP. SECOND COLUMN INDICATES THE POPULATION SIZE USED FOR
SOLVING THE PROBLEM. THE COMPUTATIONAL EFFORT IS GIVEN IN THE
3
rd
COLUMN. THE NUMBERS IN THE 4
th
COLUMN INDICATE THE
GENERATION WHERE THE MINIMUM EFFORT WAS OBTAINED.
Problem Pop Size Effort Generation
even-3 50 33,750 131
even-4 100 240,000 480
even-5 500 2,417,500 967
even-6 1000 29,136,000 2428
even-7 2000 245,900,000 4918
Table II shows that TGP is able to solve the even-parity
problems very well. Genetic Programming without ADF was
able to solve instances up to even-5 parity problem within a
reasonable time frame and using a reasonable population. Note
again that a perfect comparison between GP and TGP cannot
be made due to their different individual representation.
Table II also shows that the effort required for solving
the problem increases with one order of magnitude for each
instance.
In order to see the effectiveness and the simplicity of the
TGP algorithm we give, in Table III, the time needed for
solving these problems using a PIII computer at 850 MHz.
Table III shows that TGP is very fast. 92 seconds are needed
to obtain a solution for the even-7 parity problem. Note that
the standard GP was never used for solving the even-7 parity
problem due to the expensive computational time.
TABLE III
THE AVERAGE TIME FOR OBTAINING A SOLUTION FOR THE EVEN-PARITY
PROBLEM USING TGP.
Problem Time (seconds)
even-3 0.2
even-4 0.9
even-5 3.2
even-6 19.3
even-7 92.5
VI. LIMITATIONS OF THE PROPOSED APPROACH
There could be a problem with the length of the program
evolved by TGP. The number of gates in offspring is the sum
of the number of gates in parents + 1. In the case of binary
operators the number of gates in a TGP chromosome might
increase exponentially.
This problem could be avoided if the selection process takes
into account the number of gates of the chosen individuals.
VII. CONCLUSIONS
A new evolutionary technique called Traceless Genetic
Programming has been proposed in this paper. TGP uses a
new individual representation, new genetic operators and a
specific evolutionary algorithm.
TGP has been used for evolving digital circuits for the
even parity problems. Numerical experiments have shown that
TGP was able to evolve very fast a solution for up to even-
8 parity problem. Note that the standard GP evolved (within
a reasonable time frame) a solution for up to even-5 parity
problem.
VIII. FURTHER WORK
Further effort will be spent for improving the proposed
Traceless Genetic Programming technique. For instance, in
[9] a Sub-machine code technique was used for improving the
performance ot the GP technique. This kind of improvement
can be applied for TGP too.
In [10] an extended, unbiased set of 16 gates was used
for solving the even-parity problems. Numerical experiments
shown [10] that GP was able to solve up to even-22 parity
instance using the considered set of gates. Further numerical
experiments with TGP will include the use of the extended set
of all possible 16 gates with 2 inputs.
REFERENCES
[1] C. Coello, E. Alba, G. Luque and A. Aguire, ”Comparing different
Serial and Parallel Heuristics to Design Combinational Logic Circuits”,
in Proceedings of 2003 NASA/DoD Conference on Evolvable Hardware,
J. Lohn, R. Zebulum, J. Steincamp, D. Keymeulen, A. Stoica, and M.I.
Ferguson, Eds. IEEE Press, 2003, pp. 3-12.
[2] J. R. Koza, Genetic Programming: On the Programming of Computers
by Means of Natural Selection, MIT Press, Cambridge, MA, 1992.
[3] J. R. Koza, Genetic Programming II: Automatic Discovery of Reusable
Subprograms, MIT Press, Cambridge, MA, 1994.
[4] J. F. Miller, P. Thomson, ”Aspects of Digital Evolution: Evolvability
and Architecture”, in Proceedings of the Parallel Problem Solving from
Nature V, A. E. Eiben, T. B
¨
ack, M. Schoenauer and H-P Schwefel,
Eds. Springer-Verlag, 1998, pp. 927-936.
[5] J. F. Miller, P. Thomson, T. Fogarty, ”Designing Electronic Circuits
using Evolutionary Algorithms. Arithmetic Circuits: A Case Study”,
in Genetic Algorithms and Evolution Strategies in Engineering and
Computer Science, D. Quagliarella, J. Periaux, C. Poloni and G. Winter,
Eds. UK-Wiley, 1997, pp. 105-131.
[6] J. F. Miller, ”An Empirical Study of the Efficiency of Learning Boolean
Functions using a Cartesian Genetic Programming Approach”, in Pro-
ceedings of the 1
st
Genetic and Evolutionary Computation Conference,
W. Banzhaf, J. Daida, A. E. Eiben, M. H. Garzon, V. Honavar, M.
Jakiela, and R. E. Smith, Eds. vol. 2, San Francisco, CA: Morgan
Kaufmann, 1999, pp. 1135-1142.
[7] J. F. Miller, D. Job, V. K. Vassilev, ”Principles in the Evolutionary
Design of Digital Circuits - Part I”, Genetic Programming and Evolvable
Machines, vol. 1. pp. 7-35, Kluwer Academic Publishers, 2000.
[8] M. Oltean, ”Solving Even-parity problems with Multi Expression Pro-
gramming”, in Proceedings of the 5
th
International Workshop on
Frontiers in Evolutionary Algorithm, K. Chen (et. al) Eds. 2003, pp.
315-318.
[9] R. Poli, W. B. Langdon, ”Sub-machine Code Genetic Programming”,
in Advances in Genetic Programming 3, L. Spector, W. B. Langdon,
U.-M. O’Reilly, P. J. Angeline, Eds. Cambridge:MA, MIT Press, 1999,
chapter 13.
[10] R. Poli, J. Page, ”Solving High-Order Boolean Parity Problems with
Smooth Uniform Crossover, Sub-Machine Code GP and Demes”, Jour-
nal of Genetic Programming and Evolvable Machines, Kluwer, pp. 1-21,
2000.
[11] A. Stoica, R. Zebulum, X. Guo, D. Keymeulen, M. Ferguson, V. Duong,
”Silicon Validation of Evolution Designed Circuits”, in Proceedings of
the 2003 NASA/DoD Conference on Evolvable Hardware, J. Lohn, R.
Zebulum, J. Steincamp, D. Keymeulen, A. Stoica, and M.I. Ferguson,
Eds. IEEE Press, 2003, pp. 21-26.
... Several evolutionary algorithms, such as genetic algorithm [4], evolution strategy [5], genetic programming [6], have been used for the evolution of digital circuits. Furthermore, numerous researchers have altered evolutionary algorithms (by changing for example the selection mechanisms, the chromosome evaluation etc.) to improve its performance in terms of the number of generations, fitness value reached, computational time etc. leading to the introduction of several other evolutionary algorithms such as Strength Pareto Evolutionary Algorithm [14], Traceless Genetic Programming [15], Embedded Cartesian Genetic Programming [16] etc. Other researchers, alternatively, have introduced decomposition strategies such as the increased complexity Manuscript received February 15, 2006. ...
... Several evolutionary algorithms, such as genetic algorithm [4], evolution strategy [5], genetic programming [6], have been used for the evolution of digital circuits. Furthermore, numerous researchers have altered evolutionary algorithms (by changing for example the selection mechanisms, the chromosome evaluation etc.) to improve its performance in terms of the number of generations, fitness value reached, computational time etc. leading to the introduction of several other evolutionary algorithms such as Strength Pareto Evolutionary Algorithm [14], Traceless Genetic Programming [15], Embedded Cartesian Genetic Programming [16] evolution [11], bi-directional incremental evolution [10], generalized disjunction decomposition [7] to improve the scalability and the evolvability, which are the main issues that limit the use of evolvable hardware for real world applications. The scalability limits the size of the circuit that may be evolved. ...
Article
Full-text available
The evolutionary design of electronic circuits, or evolvable hardware, is a discipline that allows the user to automatically obtain the desired circuit design. The circuit configuration is under the control of evolutionary algorithms. Several researchers have used evolvable hardware to design electrical circuits. Every time that one particular algorithm is selected to carry out the evolution, it is necessary that all its parameters, such as mutation rate, population size, selection mechanisms etc. are tuned in order to achieve the best results during the evolution process. This paper investigates the abilities of evolution strategy to evolve digital logic circuits based on programmable logic array structures when different mutation rates are used. Several mutation rates (fixed and variable) are analyzed and compared with each other to outline the most appropriate choice to be used during the evolution of combinational logic circuits. The experimental results outlined in this paper are important as they could be used by every researcher who might need to use the evolutionary algorithm to design digital logic circuits.
... Yet another approach in GP for learning Boolean even-N-parity functions is called Traceless Genetic Programming (TGP) (Oltean, 2004). TGP is a novel method combining a technique for building individuals and a technique for representing individuals. ...
... During the PhD program I participated to the development of other evolutionary paradigms and algorithms: Traceless Genetic Programming (TGP) [73,77] -a Genetic Programming variant that does not store the evolved computer programs. Only the outputs of the program are stored and recombined using specific operators. ...
Thesis
Full-text available
Automatic Programming is one of the most important areas of computer science research today. Hardware speed and capability has increased exponentially, but the software is years behind. The demand for software has also increased significantly, but the it is still written in old-fashion: by using humans. There are multiple problems when the work is done by humans: cost, time, quality. It is costly to pay humans, it is hard to keep them satisfied for long time, it takes a lot of time to teach and train them and the quality of their output is in most cases low (in software, mostly due to bugs). The real advances in the human civilization appeared during the industrial revolutions. Before the first revolution most people worked in agriculture. Today, very few percent of people work in this field. A similar revolution must appear in the computer programming field. Otherwise we will have so many people working in this field as we had in the past working in agriculture. How people know how to write computer programs? Very simple: by learning. Can we do the same for software? Can we put the software to learn how to write software? It seems that is possible (to some degree) and the term is called Machine Learning. It was first coined in 1959 by the first person who made a computer perform a serious learning task, namely Samuel \cite{samuel1}. However, things are not so easy as in humans (well, truth to be said - for some humans it is impossible to learn how to write software). So far we do not have a software which can learn perfectly to write software. We have some particular cases where some programs do better than humans, but the examples are sporadic at best. Learning from experience is difficult for computer programs. Instead of trying to simulate how humans teach humans how to write computer programs, we can simulate nature. What is the advantage of nature when solving problems? Answer: Nature is huge and can easily solve problems by brute force. It can try a huge number of possibilities and choose the best one (by a mechanism called survival). Genetic algorithms are inspired by nature. They have random generation of solutions, they have crossover, mutation, selection and so on. However, genetic algorithms cannot simulate the nature perfectly because they run on computers which have limited resources. Can genetic algorithms learn programming? Yes. The subfield is called Genetic Programming \cite{koza1} and is quite popular today. In Genetic Programming, we evolve computer programs by using ideas inspired from nature. Because Genetic Programming belongs to Machine learning, it should be able to learn. It can do that if it has a set of so called training data which is nothing but a set of pairs (input;output). The most important aspect of learning in Genetic Programming is how the fitness is computed. That measurement tells us how great is learning so far. After training we usually use a so called test set to see if the obtained program is able to generalize on unseen data. If we still get minimum errors on test set, it means that we have obtained an intelligent program. However, one should not imagine that things are so easy. Currently Genetic Programming has generated some good results, but in general it cannot generate large computer programs. It cannot generate an operating system. Not even an word editor, not even a game. The programmer of such system should know its limitations and should help the system to reduce the search space. It is very important to ask Genetic Programming to do what humans cannot do.
... Fitness evaluation: the set of fitness cases for the problems of concern consist of 2 k combinations of the k Boolean arguments. So, the fitness is the sum, over these fitness cases, of the Hamming distance (error) between the returned values by MGE chromosome and the correct value of the Boolean function (Oltean 2004 Figures 6, 7, 8 compare these three methods with respect to time complexity. These figures, on the one hand, demonstrate that MGE has almost the same ability (refer to the shape of fitness profiles and the ultimate approximate solutions) as the other two GEs to generate the desired result, and the advantage in efficiency over the others. ...
Article
Full-text available
Grammatical evolution (GE) is a combination of genetic algorithm and context-free grammar, evolving programs for given problems by breeding candidate programs in the context of a grammar using genetic operations. As far as the representation is concerned, classical GE as well as most of its existing variants lacks awareness of both syntax and semantics, therefore having no potential for parallelism of various evaluation methods. To this end, we have proposed a novel approach called model-based grammatical evolution (MGE) in terms of grammar model (a finite state transition system) previously. It is proved, in the present paper, through theoretical analysis and experiments that semantic embedded syntax taking the form of regex (regular expression) over an alphabet of simple cycles and paths provides with potential for parallel evaluation of fitness, thereby making it possible for MGE to have a better performance in coping with more complex problems than most existing GEs.
... El primer enfoque consiste en tomar el algoritmo original de GP (o alguna de sus variantes) y utilizar el otro algoritmo para optimizar los parámetros de los individuos. Como técnica de optimización se ha usado: regresión difusa [29]; búsqueda tabú [30] [37]; el algoritmo de maximización de la expectativa [33]; mínimos cuadrados ortogonales [35]; optimización ordinal [42]; afinación aritmética [36]; regresión polinómica evolutiva (EPR) [40]; redes neuronales (NN) [41]; algoritmo de separación de híper volúmenes [39]; algoritmos genéticos en su versión clásica [44][49] y con selección μ + λ [43]; y la programación genética no ruteada [47]. El segundo enfoque se basa en tomar como base el otro algoritmo (no GP) y reemplazar los individuos u objetos de análisis por los individuos de GP; en los estudios seleccionados se reportaron las siguientes hibridaciones de GP con: el algoritmo de colonia de abejas [28]; el algoritmo de optimización de colonia de hormigas [31], el algoritmo de recocido simulado [32] [45][46], el algoritmo de programa de línea recta [34], NN [38] y el algoritmo de perturbación de series de tiempo [48]. ...
Article
Full-text available
Objective: The aim of this paper is to analyze the main research areas in Genetic Programming (GP). Method: We used the systematic literature review method employing an automatic search with manual refining of papers published on GP between 1992 to 2012. Results: Just 63 studies meet all the requirements of the inclusion criteria. Conclusion: Although studies relating to the application of genetic programming in the forecast of time series were frequently presented, we find that the studies proposing changes in the original algorithm of GP with a theoretical support and a systematic procedure for the construction of model were scarce in the time 1992-2012.
... Specifically in Table 4 we compare the computational effort for BR and PP with the same for the canonical GP [1], Evolutionary Programming [36], Traceless GP [37], Cartesian GP [38] and Size Fair and Homologous Crossover GP [39]. ...
Article
Full-text available
This paper proposes Polyandry, a new nature-inspired modification to canonical Genetic Programming (GP). Polyandry aims to improve evolvability in GP. Evolvability is a critically important GP trait, the maintenance of which determines the arrival of the GP at the global optimum solution. Specifically evolvability is defined as the ability of the genetic operators employed in GP to produce offspring that are fitter than their parents. When GP fails to exhibit evolvability, further adaptation of the GP individuals towards the global optimum solution becomes impossible. Polyandry improves evolvability by improving the typically disruptive standard GP crossover operator. The algorithm employs a dual strategy towards this goal. The chief part of this strategy is an incorporation of genetic material from multiple mating partners into broods of offspring. Given such a brood, the offspring in the brood then compete according to a culling function, which we make equivalent to the main GP fitness function. Polyandry’s incorporation of genetic material from multiple GP individuals into broods of offspring represents a more aggressive search for building block information. This characteristic of the algorithm leads to an advanced explorative capability in both GP structural space and fitness space. The second component of the Polyandry strategy is an attempt at multiple crossover points, in order to find crossover points that minimize building block disruption from parents to offspring. This strategy is employed by a similar algorithm, Brood Recombination. We conduct experiments to compare Polyandry with the canonical GP. Our experiments demonstrate that Polyandry consistently exhibits better evolvability than the canonical GP. As a consequence, Polyandry achieves higher success rates and finds solutions faster than the latter. The result of these observations is that given certain brood size settings, Polyandry requires less computational effort to arrive at global optimum solution than the canonical GP. We also conduct experiments to compare Polyandry with the analogous nature-inspired modification to canonical GP, Brood Recombination. The adoption of Brood Recombination in order to improve evolvability is ubiquitous in GP literature. Our results demonstrate that Polyandry consistently exhibits better evolvability than Brood Recombination, due to a more explorative nature of the algorithm in both structural and fitness space. As a result, although the two algorithms exhibit similar success rates, the former consistently discovers global optimum GP solutions significantly faster than the latter. The key advantage of Polyandry over Brood Recombination is therefore faster solution discovery. As a consequence Polyandry consistently requires less computational effort to arrive at the global optimum solution compared to Brood Recombination. Further, we establish that the computational effort exerted by Polyandry is competitively low, relative to other Evolutionary Algorithm (EA) methodologies in literature. We conclude that Polyandry is a better alternative to both the canonical GP as well as Brood Recombination with regards to the achievement and maintenance of evolvability.
... The main difference between Traceless Genetic Programming and GP is that TGP does not explicitly store the evolved computer programs [7]. TGP is useful when the trace (the way in which the results are obtained) between the input and output is not important. ...
Article
Genetic Programming (GP) offers practical advantages to the researcher facing difficult optimization problems. These advantages are multifold, including the simplicity of the approach, its robust response to changing circumstance, its flexibility, and many other facets. GP can be applied to problems where heuristic solutions are not available or generally lead to unsatisfactory results. As a result, GP has recently received increased interest, particularly with regard to the manner in which they may be applied for practical problem solving. This paper illustrates how some GP variants could be used for knowledge discovery and function approximation.
Article
Full-text available
Evolvable hardware (EHW) adapts its structure and functionality at run time, by evolutionary algorithms, in a dynamic and uncertain environment. Because of man-for-one genotype-phenotype map in EHW, the problems of evolving digital circuit are multi-modal optimizations. As an important algorithm for EHW, Cartesian Genetic Programming suffers from a premature convergence caused by the genetic drift. The genetic diversity in a population decreases quickly and it loses an exploration capability. To maintain the diversity of the population and search for all the global solutions, niched techniques are tailored into traditional Cartesian Genetic Programming (NCGP). The results of the compared experiments on benchmark circuits demonstrate that the niched Cartesian Genetic Programming can maintain the diversity of the evolving population, avoiding premature and is more likelyto find all the global solutions.
Conference Paper
Evolvable hardware (EHW) is facing the problems of scalability. Evolutionary algorithms often trap into local optima, or stalling in the later procedure. This paper analyses the difficulty of EHW. To improve the efficiency of Cartesian Genetic Programming (CGP), Neighborhood searching and orthogonal experiment design are tailed to an orthogonal mutation operator and a new Orthogonal Cartesian Genetic Programming algorithm is proposed. Demonstrated by experiments on the benchmark, the proposed Orthogonal Cartesian Genetic Programming can jump out of Local optima and decrease the stalling effect.
Article
Full-text available
An evolutionary algorithm is used as an engine for discovering new designs of digital circuits, particularly arithmetic functions. These designs are often radically different from those produced by top-down, human, rule-based approaches. It is argued that by studying evolved designs of gradually increasing scale, one might be able to discern new, efficient, and generalizable principles of design. The ripple-carry adder principle is one such principle that can be inferred from evolved designs for one and two-bit adders. Novel evolved designs for three-bit binary multipliers are given that are 20% more efficient (in terms of number of two-input gates used) than the most efficient known conventional design.
Conference Paper
Full-text available
In this paper, we perform a comparative study of different heuristics used to design combinational logic circuits. The use of local search hybridized with a genetic algorithm and the effect of parallelism are of particular interest in the study conducted. Our results indicate that a hybridization of a genetic algorithm with simulated annealing is beneficial and that the use of parallelism does not only introduce a speedup (as expected) in the algorithms, but also allows one to improve the quality of the solutions found.
Conference Paper
Full-text available
This paper describes experiments to determine how the architecture vis-a-vis routing and functional resources affect the ease with which combinational logic designs may be evolved on a field-programmable gate array (FPGA). We compare two chromosome representations with differing levels of connectivity, and show that the amount of routing and functional resource have a marked effect on the success of the evolutionary process.
Conference Paper
Full-text available
In this paper, the Multi Expression Programming (MEP) technique is used for solving even-parity problems. Numerical experiments show that MEP outperforms Genetic Programming (GP) with more than one order of magnitude for the considered test cases.
Article
Full-text available
. We propose and study new search operators and a novel node representation that can make GP fitness landscapes smoother. Together with a tree evaluation method known as sub-machine code GP and the use of demes, these make up a recipe for solving very large parity problems using GP. We tested this recipe on parity problems with up to 22 input variables, solving them with a very high success probability. 1. INTRODUCTION The even-n-parity functions have long been recognised as difficult for Genetic Programming (GP) to induce if no bias favourable to their induction is introduced in the function set, the input representation, or in any other part of the algorithm. For this reason they are very interesting and have been widely used as benchmark tests [1, 4, 5, 6, 7, 23, 24, 26]. For an even-parity function of n Boolean inputs, the task is to evolve a function that returns 1 if an even number of the inputs evaluate to 1, 0 otherwise. The task seems to be difficult for at least two reasons...
Article
Full-text available
A new form of Genetic Programming (GP) called Cartesian Genetic Programming (CGP) is proposed in which programs are represented by linear integer chromosomes in the form of connections and functionalities of a rectangular array of primitive functions. The effectiveness of this approach is investigated for boolean even-parity functions (3,4,5), and the 2-bit multiplier. The minimum number of evaluations required to give a 0.99 probability of evolving a target function is used to measure the efficiency of the new approach. It is found that extremely low populations are most effective. A simple probabilistic hillclimber (PH) is devised which proves to be even more effective. For these boolean functions either method appears to be much more efficient than the GP and Evolutionary Programming (EP) methods reported. The efficacy of the PH suggests that boolean function learning may not be an appropriate problem for testing the effectiveness of GP and EP. 1. Introduction Since the original d...
Conference Paper
No silicon fabrication and characterization of circuits with topologies designed by evolution has been done before, leaving open questions about the feasibility of the evolutionary design approach, as well as on how high performance, robust, or portable such designs could really be when implemented in hardware. This paper is the first to report on a silicon implementation of circuits evolved in simulation. Several circuits were evolved and fabricated in a 0.5-micron CMOS process. This paper focuses on results of logical gates evolved at a transistor level. It discusses the steps taken in order to increase the chances of robust and portable designs, summarizes the results of characterization tests based on chip measurements, and comments on the performance comparing to simulations.