Sunteți pe pagina 1din 2

Assignment No 1

Submission Deadline: 24 Feb, 2019.

Genetic Programming is an evolutionary algorithm that generates expressions using abstract


syntax trees. Example tree is

Leaf nodes are marked as terminal nodes. Internal nodes are non-terminal nodes. Non-
terminal nodes are selected from the function set while the terminal nodes are selected
from the terminal set. An example function and terminal sets are given below:

Function set: {+,-,*,sin, cos,tan}


Terminal set: {x, Ephem}
Ephem is a random number generator in the pre-defined range. E.g. -5-5. So if Ephem is
selected for a terminal node, a random number is generated and stored in the node.

Normally, tree is generated from the root node and keeps on growing till some specific
depth. Normally, functions and terminal nodes are selected randomly from the function and
terminal sets.

A tree is evaluated and its goodness is calculated against some training data set. An example
training dataset is given below:
In the training set “x” is the independent variable and f(x) is the output or dependent
variable. Performance of a tree is measured for each row by plugging in the value of the
terminal (x) from the data set and comparing its output with f(x). If they match there is zero
error in that row. Similarly, error on each row of the data set is calculated. A fit tree is the
one that has cumulative (error on all the rows) is zero.

1) Discuss the possible application of dynamic programming to find the optimal tree for
the given data set. If it is applicable then prove that the problem has optimal
substructure and overlapping subproblems. In case it is not applicable then give a
justification for this.
2) Can you propose a greedy solution for this problem? Does this problem have greedy
choice property? Give proof in support of your answer.

Submission: You need to submit a report on Google classroom. Presentations will be


scheduled later on.

S-ar putea să vă placă și