Schema (genetic algorithms)

From HandWiki

A schema (pl.: schemata) is a template in computer science used in the field of genetic algorithms that identifies a subset of strings with similarities at certain string positions. Schemata are a special case of cylinder sets, forming a basis for a product topology on strings.[1] In other words, schemata can be used to generate a topology on a space of strings.

Description

For example, consider binary strings of length 6. The schema 1**0*1 describes the set of all words of length 6 with 1's at the first and sixth positions and a 0 at the fourth position. The * is a wildcard symbol, which means that positions 2, 3 and 5 can have a value of either 1 or 0. The order of a schema is defined as the number of fixed positions in the template, while the defining length [math]\displaystyle{ \delta(H) }[/math] is the distance between the first and last specific positions. The order of 1**0*1 is 3 and its defining length is 5. The fitness of a schema is the average fitness of all strings matching the schema. The fitness of a string is a measure of the value of the encoded problem solution, as computed by a problem-specific evaluation function.

Length

The length of a schema [math]\displaystyle{ H }[/math], called [math]\displaystyle{ N(H) }[/math], is defined as the total number of nodes in the schema. [math]\displaystyle{ N(H) }[/math] is also equal to the number of nodes in the programs matching [math]\displaystyle{ H }[/math].[2]

Disruption

If the child of an individual that matches schema H does not itself match H, the schema is said to have been disrupted.[2]

Propagation of schema

In evolutionary computing such as genetic algorithms and genetic programming, propagation refers to the inheritance of characteristics of one generation by the next. For example, a schema is propagated if individuals in the current generation match it and so do those in the next generation. Those in the next generation may be (but do not have to be) children of parents who matched it.

The Expansion and Compression Operators

Recently schema have been studied using order theory.[3]

Two basic operators are defined for schema: expansion and compression. The expansion maps a schema onto a set of words which it represents, while the compression maps a set of words on to a schema.

In the following definitions [math]\displaystyle{ \Sigma }[/math] denotes an alphabet, [math]\displaystyle{ \Sigma^l }[/math] denotes all words of length [math]\displaystyle{ l }[/math] over the alphabet [math]\displaystyle{ \Sigma }[/math], [math]\displaystyle{ \Sigma_* }[/math] denotes the alphabet [math]\displaystyle{ \Sigma }[/math] with the extra symbol [math]\displaystyle{ * }[/math]. [math]\displaystyle{ \Sigma_*^l }[/math] denotes all schema of length [math]\displaystyle{ l }[/math] over the alphabet [math]\displaystyle{ \Sigma_* }[/math] as well as the empty schema [math]\displaystyle{ \epsilon_* }[/math].

For any schema [math]\displaystyle{ s \in \Sigma^l_* }[/math] the following operator [math]\displaystyle{ {\uparrow}s }[/math], called the [math]\displaystyle{ expansion }[/math] of [math]\displaystyle{ s }[/math], which maps [math]\displaystyle{ s }[/math] to a subset of words in [math]\displaystyle{ \Sigma^l }[/math]:

[math]\displaystyle{ {\uparrow}s := \{b \in \Sigma^l | b_i = s_i \mbox{ or } s_i = * \mbox{ for each } i \in \{1,...,l\}\} }[/math]

Where subscript [math]\displaystyle{ i }[/math] denotes the character at position [math]\displaystyle{ i }[/math] in a word or schema. When [math]\displaystyle{ s= \epsilon_* }[/math] then [math]\displaystyle{ {\uparrow}s = \emptyset }[/math]. More simply put, [math]\displaystyle{ {\uparrow}s }[/math] is the set of all words in [math]\displaystyle{ \Sigma^l }[/math] that can be made by exchanging the [math]\displaystyle{ * }[/math] symbols in [math]\displaystyle{ s }[/math] with symbols from [math]\displaystyle{ \Sigma }[/math]. For example, if [math]\displaystyle{ \Sigma=\{0,1\} }[/math], [math]\displaystyle{ l=3 }[/math] and [math]\displaystyle{ s=10* }[/math] then [math]\displaystyle{ {\uparrow}s=\{100,101\} }[/math].

Conversely, for any [math]\displaystyle{ A \subseteq \Sigma^l }[/math] we define [math]\displaystyle{ {\downarrow}{A} }[/math], called the [math]\displaystyle{ compression }[/math] of [math]\displaystyle{ A }[/math], which maps [math]\displaystyle{ A }[/math] on to a schema [math]\displaystyle{ s\in \Sigma_*^l }[/math]: [math]\displaystyle{ {\downarrow}A:= s }[/math] where [math]\displaystyle{ s }[/math] is a schema of length [math]\displaystyle{ l }[/math] such that the symbol at position [math]\displaystyle{ i }[/math] in [math]\displaystyle{ s }[/math] is determined in the following way: if [math]\displaystyle{ x_i = y_i }[/math] for all [math]\displaystyle{ x,y \in A }[/math] then [math]\displaystyle{ s_i = x_i }[/math] otherwise [math]\displaystyle{ s_i = * }[/math]. If [math]\displaystyle{ A = \emptyset }[/math] then [math]\displaystyle{ {\downarrow}A = \epsilon_* }[/math]. One can think of this operator as stacking up all the items in [math]\displaystyle{ A }[/math] and if all elements in a column are equivalent, the symbol at that position in [math]\displaystyle{ s }[/math] takes this value, otherwise there is a wild card symbol. For example, let [math]\displaystyle{ A = \{100,000,010\} }[/math] then [math]\displaystyle{ {\downarrow}A = **0 }[/math].

Schemata can be partially ordered. For any [math]\displaystyle{ a,b \in \Sigma^l_* }[/math] we say [math]\displaystyle{ a \leq b }[/math] if and only if [math]\displaystyle{ {\uparrow}a \subseteq {\uparrow}b }[/math]. It follows that [math]\displaystyle{ \leq }[/math] is a partial ordering on a set of schemata from the reflexivity, antisymmetry and transitivity of the subset relation. For example, [math]\displaystyle{ \epsilon_* \leq 11 \leq 1* \leq ** }[/math]. This is because [math]\displaystyle{ {\uparrow}\epsilon_* \subseteq {\uparrow}11 \subseteq {\uparrow}1* \subseteq {\uparrow}** = \emptyset \subseteq \{11\} \subseteq \{11,10\} \subseteq \{11,10,01,00\} }[/math].

The compression and expansion operators form a Galois connection, where [math]\displaystyle{ \downarrow }[/math] is the lower adjoint and [math]\displaystyle{ \uparrow }[/math] the upper adjoint.[3]

The Schematic Completion and The Schematic Lattice

For a set [math]\displaystyle{ A \subseteq \Sigma^l }[/math], we call the process of calculating the compression on each subset of A, that is [math]\displaystyle{ \{{\downarrow}X | X \subseteq A\} }[/math], the schematic completion of [math]\displaystyle{ A }[/math], denoted [math]\displaystyle{ \mathcal{S}(A) }[/math].[3]

For example, let [math]\displaystyle{ A = \{110, 100, 001, 000\} }[/math]. The schematic completion of [math]\displaystyle{ A }[/math], results in the following set: [math]\displaystyle{ \mathcal{S}(A) = \{001, 100, 000, 110, 00*, *00, 1*0, **0, *0*, ***, \epsilon_*\} }[/math]

The poset [math]\displaystyle{ (\mathcal{S}(A),\leq) }[/math] always forms a complete lattice called the schematic lattice.

The Schematic lattice formed from the schematic completion on the set [math]\displaystyle{ A=\{111, 011, 001\} }[/math]. Here the schematic lattice [math]\displaystyle{ (\mathcal{S}(A),\leq) }[/math] is shown as a Hasse diagram.

The schematic lattice is similar to the concept lattice found in Formal concept analysis.

See also

References

  1. Holland, John Henry (1992). Adaptation in Natural and Artificial Systems (reprint ed.). The MIT Press. ISBN 9780472084609. https://books.google.com/books?id=JE5RAAAAMAAJ. Retrieved 22 April 2014. 
  2. 2.0 2.1 "Foundations of Genetic Programming". UCL UK. http://www.cs.ucl.ac.uk/staff/W.Langdon/FOGP/. Retrieved 13 July 2010. 
  3. 3.0 3.1 3.2 Jack McKay Fletcher and Thomas Wennkers (2017). "A natural approach to studying schema processing". arXiv:1705.04536 [cs.NE].