220 likes | 341 Views
Architecture-Altering Operations. Are used to change the architecture of individuals containing the following automatically defined constructs: Automatically Defined Functions (ADFs) Automatically Defined Iterations (ADIs) Automatically Defined Loops (ADLs)
E N D
Architecture-Altering Operations • Are used to change the architecture of individuals containing the following automatically defined constructs: • Automatically Defined Functions (ADFs) • Automatically Defined Iterations (ADIs) • Automatically Defined Loops (ADLs) • Automatically Defined Recursions (ADRs) • Automatically Defined Storage (ADSs)
Architecture-Altering Operators • The following architecture-altering operators are defined for each automatically defined constructs • Construct duplication • Construct deletion • Construct creation • Argument duplication • Argument deletion • Argument creation
ADF Architecture • User specifies architecture • All the individuals have the same number of ADFS with each ADF having the same number of arguments in each individual. • Branch typing is used during crossover and mutation. • Architecture is evolved • Each individual has a different architecture, i.e. a different number of ADFs and each ADF has a different number of arguments. • Point typing is used during crossover and mutation
Architecture-Altering Operations: ADFs • Subroutine duplication • Argument duplication • Subroutine creation • Argument creation • Subroutine deletion • Argument deletion
Subroutine Duplication • Adds a copy of an existing branch to a copy of the chosen parent. • Choose a parent • Choose a branch • Copy the parent and add a copy of the chosen branch. • The new function-defining branch is given a different name. • GP Parameters • Application rate • Maximum number of ADFs per individual
Subroutine Duplication: Example 1. Copy selected parent 2. Choose a branch 3. Insert a copy of the chosen branch 4. Rename the ADF 5. Share function calls
Argument Duplication • Copies an existing argument. • Select a parent • Select an ADF branch • Select an argument • Extend argument list of the chosen ADF • Update results-producing branch • Update the function sets of each branch • GP Parameters • Application rate of the argument duplication operator • The maximum number arguments per ADF • Maximum size of the results-producing branch
Argument Duplication: Example 1. Copy the selected parent 2. Choose an ADF branch 3. Choose an argument 4. Copy the chosen argument 5. Rename the argument 6. Randomly choose each argument occurrence (0 remain as is, 1 change) 7. Update the results-producing branch 0 1
Subroutine Creation • Creates a new ADF branch • Select a parent • Select a point N, in the body of a branch. • Select arguments for the new ADF from the subtree rooted at N. • Create the new branch and give the ADF a name. • Replace N with the name of the new ADF and insert the chosen arguments. • GP Parameters • Application rate of the subroutine creation operator. • The maximum number of ADFs per individual. • The maximum size of an ADF • The maximum number of arguments per ADF. • The minimum number of arguments per ADF.
Subroutine Creation: Example 1. Copy the selected parent 2. Choose a non-invariant node randomly 3. Traverse the tree rooted at the chosen point to determine the arguments of the new ADF ( 1 indicates chosen point). 1 0 4. Create the new ADF branch 1 5. Replace the chosen node with the new ADF 0 6. Insert arguments of the ADF
Argument Creation • Extends the argument set of an existing ADF to contain a new argument • Select a parent • Choose a node, N, in the body of a function-defining branch. • Extend the argument list of the branch containing N to include another argument. • Replace the subtree rooted at N with the name of the new argument. • Extend each function call of the ADF branch containing N to include an additional subtree representing the new argument. • GP Parameters • The application rate of the argument creation operator. • The maximum number of arguments per individual. • The maximum size of the results-producing branch.
Argument Creation: Example 1. Copy the selected parent 2. Randomly choose a non-invariant, N, point in an ADF branch 3. Extend the argument list of the ADF branch containing N to include another argument 4. Replace the subtree rooted at N with the new argument label. 5. Update each function call to include an additional subtree.
Subroutine Deletion • Deletes an existing ADF • Select a parent. • Delete a randomly chosen ADF branch in a copy of the parent. • Replace the functions calls to the deleted ADF • GP Parameters • Application rate of the subroutine deletion operator. • The minimum number of ADFs per individual. • Method to use to replace function calls to the deleted ADF (consolidation, regeneration or macro expansion).
Subroutine Deletion by Consolidation The deleted ADF and the replacement ADF have the same number of arguments
Subroutine Deletion by Consolidation The deleted ADF has more arguments than the replacement ADF
Subroutine Deletion by Consolidation The deleted ADF has less arguments than the replacement ADF
Argument Deletion • Deletes an argument of an existing ADF branch • Select a parent. • Randomly choose an ADF branch in the copy of a parent. • Randomly choose an argument to delete. • Delete the chosen argument. • Delete the subtree representing the deleted argument in each function call of the ADF. • Replace each occurrence of the deleted argument in the ADF. • GP Parameters • Application rate of the argument deletion operator. • The minimum number of arguments that an ADF branch must contain.