
Because there is a certain structure to programs, the mix between genetic algorithms and grammar gave birth to genetic programming, which first appeared on the scene for evolving sets of instructions, called programs. In programming, our IDE’s tell us when we have a ‘syntax error’ when we forget a keyword because it know what needs to come before or after based off this language-specific BNF Grammar. For example, “Tom is …”, we have “noun verb …”, which from the English grammar tells us that we cannot have a verb after the verb ‘is’, but an adjective, noun, or adverb.
TRMINAL PROGRAMMING DEFINE HOW TO
Think of it like in standard English, the English grammar tells you how to gather words together and structure sentences. If you did not know, all programming languages are built off a Backus-Naur Form (BNF) Grammar, which if you haven’t taken any automata theory classes simply means that each language has a specific set of rules for setting up instructions that the compiler uses to determine whether or not the code can run. Standard genetic algorithms deal with optimization problems where the phenotype is a point or vector, but now the phenotype in genetic programming is a tree based grammar. Genetic programming is actually a subset of genetic algorithms however, the main difference between the two is the representation of the chromosome.

In this post we will cover a brief overview of genetic programming and how it is different from standard genetic algorithms in terms of representation of the chromosome.
