alogos.exceptions
¶
All custom exceptions used in the package.
Detailed object descriptions¶
- exception alogos.exceptions.GrammarError[source]¶
Bases:
Exception
Raised when a grammar can not be read, written or is ill-formed.
Examples
The set of nonterminal symbols, terminal symbols or production rules is empty.
A nonterminal symbol has no production rule where its right-hand side is defined.
- exception alogos.exceptions.ParserError[source]¶
Bases:
Exception
Raised when parsing a string with a grammar fails.
Examples
The string contains characters that are not part of any terminal symbol.
The string does not belong to the language of the given grammar.
The chosen parser is not compatible with the given grammar.
- exception alogos.exceptions.ParameterError[source]¶
Bases:
Exception
Raised when a parameter or collection of parameters is invalid.
Examples
An unknown parameter is provided or requested by a user.
All variation operators of an evolutionary algorithm are turned off.
All stop criteria of a search algorithm are inactive.
- exception alogos.exceptions.GenotypeError[source]¶
Bases:
Exception
Raised when a genotype is not well-formed or modified.
Examples
The genotype can not be interpreted as a list of integers for Grammatical Evolution (GE).
The genotype can not be interpreted as a derivation tree for Context-Free Grammar Genetic Programming (CFGGP).
A user tries to modify the immutable genotype attribute of an individual.
- exception alogos.exceptions.InitializationError[source]¶
Bases:
Exception
Raised when intitialization of an individual or population fails.
Examples
A user-provided genotype is not well-formed.
A user-provided phenotype can not be parsed and reverse mapped to a genotype.
- exception alogos.exceptions.OperatorError[source]¶
Bases:
Exception
Raised when a search operator fails.
Examples
A crossover operator that requires two parent genotypes of equal length fails because it gets two individuals with different genotype lengths as input.
- exception alogos.exceptions.MappingError[source]¶
Bases:
Exception
Raised when a genotype-to-phenotype mapping or its inverse fails.
Examples
Forward mapping: No string of terminals could be found within the allowed number of expansions or wrappings.
Reverse mapping: The provided grammar contains no production rule that would match a production found in a given derivation tree.