new LinearIndividual(options)
Linear genetic programming individual
Parameters:
| Name | Type | Description | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object | Linear indivdual options Properties
|
- Source:
Properties:
| Name | Type | Description |
|---|---|---|
options |
object | Linear indivdual options |
Extends
Methods
-
copy() → {Individual}
-
Creates a deep copy of the individual
- Inherited From:
- Source:
Returns:
A copy of the Individual instance
- Type
- Individual
-
createNew() → {Individual}
-
Creates a deep copy of the individual and then re initialises
- Inherited From:
- Source:
Returns:
A new individual based on the current individual
- Type
- Individual
-
execute(An) → {Array.<object>}
-
Executes the liner code represented by the indivduals body
Parameters:
Name Type Description AnArray.<object> array of inputs
Returns:
An array of outputs
- Type
- Array.<object>
-
initialise() → {Individual}
-
Re creates the individuals body with randomly generated genes
- Inherited From:
- Source:
Returns:
Reference to current object for chaining
- Type
- Individual
-
isFixedLength() → {boolean}
-
Determine whether the individual body length can change (i.e. minLength === maxLength)
- Inherited From:
- Source:
Returns:
A true value if the indiviuals body is of fixed length, otherwise false
- Type
- boolean
-
mutate() → {Individual}
-
Mutates the individual by swapping a single gene with a randomly created gene
- Inherited From:
- Source:
Returns:
Reference to current object for chaining
- Type
- Individual
-
removeIntrons() → {LinearIndividual}
-
Removes all structurally noneffective code until the body length reaches the minimum allowed length
Returns:
Reference to current object for chaining
- Type
- LinearIndividual
-
setDefaultOptionsIfNotProvided() → {LinearIndividual}
-
Sets default values for options that have not been defined
Returns:
Reference to current object for chaining
- Type
- LinearIndividual
-
toString() → {string}
-
Returns a string containing an executable representation of the individual
Returns:
A string containing an executable representation of the individual
- Type
- string
-
validateRequiredOptions() → {LinearIndividual}
-
Validates the linear individuals current options
Throws:
An exception will occur if a required option is missingReturns:
Reference to current object for chaining
- Type
- LinearIndividual