Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Gene expression programming
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==K-expressions and genes== The k-expressions of gene expression programming correspond to the region of genes that gets expressed. This means that there might be sequences in the genes that are not expressed, which is indeed true for most genes. The reason for these noncoding regions is to provide a buffer of terminals so that all k-expressions encoded in GEP genes correspond always to valid programs or expressions. The genes of gene expression programming are therefore composed of two different domains β a head and a tail β each with different properties and functions. The head is used mainly to encode the functions and variables chosen to solve the problem at hand, whereas the tail, while also used to encode the variables, provides essentially a reservoir of terminals to ensure that all programs are error-free. For GEP genes the length of the tail is given by the formula: :<math>t = h(n_\max-1)+1</math> where ''h'' is the head's length and ''n''<sub>max</sub> is maximum arity. For example, for a gene created using the set of functions {{math|1=F = {{mset|Q, +, β, ∗, /}}}} and the set of terminals T = {a, b}, ''n''<sub>max</sub> = 2. And if we choose a head length of 15, then ''t'' = 15 (2β1) + 1 = 16, which gives a gene length ''g'' of 15 + 16 = 31. The randomly generated string below is an example of one such gene: :<code><nowiki>0123456789012345678901234567890</nowiki></code> : :<code><nowiki>*b+a-aQab+//+b+babbabbbababbaaa</nowiki></code> It encodes the expression tree: {| align="center" border="0" cellpadding="4" cellspacing="0" | [[File:GEP expression tree, k-expression *b+a-aQa.png]] |} which, in this case, only uses 8 of the 31 elements that constitute the gene. It's not hard to see that, despite their fixed length, each gene has the potential to code for expression trees of different sizes and shapes, with the simplest composed of only one node (when the first element of a gene is a terminal) and the largest composed of as many nodes as there are elements in the gene (when all the elements in the head are functions with maximum arity). It's also not hard to see that it is trivial to implement all kinds of [[genetic operator|genetic modification]] ([[mutation (genetic algorithm)|mutation]], inversion, insertion, [[crossover (genetic algorithm)|recombination]], and so on) with the guarantee that all resulting offspring encode correct, error-free programs.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)