Genetic Programs Flashcards
Evolutionary algorithms work by generating new solutions to a problem and evaluating them. Genetic programs, instead…
Generate new programs using a set of rules and evaluate them
Genetic programs follow the exact same structure as evolutionary algorithms, except…
We evolve programs instead
Genetic programs could be used in future to generate… (pick 2)
Operating systems, word processors, websites, mobile apps
Search-based software engineering is a type of genetic program in which…
We solve optimisation-based software engineering problems using genetic programs
Genetic programs are used nowadays for tasks such as… (pick 2)
Navigation code for robots, curve fitting, antenna design
In evolutionary algorithms, our fitness function can be taken as a result of the output. However, this is not the case in genetic programs. For genetic programs, our fitness needs to be measured [after/before] runtime.
After
Genetic programs are defined as a tree of…
Rules
A genetic program is defined using two sets, the […] set, representing actions, and the […] set, representing variables.
Function, terminal
Each member of the function set has both an action and a […].
Syntax (rule), defining how input data must be formatted
The algorithm used to generate a program tree is to first choose a random function for the root, then enter the following loop:
Choose a function node that does not have children yet, and randomly choose values from either the function set or the terminal set (given we are not at max depth yet)
In the case that our genetic program generation algorithm has reached the maximum depth, we cannot use any items from the […] set.
Function set
To mutate a genetic algorithm, the standard approach is to…
Choose a subtree at random, remove it, then generate a new subtree in its place
To crossover a genetic algorithm, the standard approach is to…
Choose a node in the tree, and replace it with the other program’s tree in its entirety