pyneat.innovation module¶
Module for tracking structural innovations in genomes during evolution.
-
class
pyneat.innovation.
InnovationRecord
(key, innov_type, node_in, node_out)[source]¶ Bases:
object
Record information about a structural mutations for comparison against other mutations.
-
innov_type
¶ The type of structural mutation that occurred.
Type: InnovationType
-
-
class
pyneat.innovation.
InnovationStore
[source]¶ Bases:
object
Store records of new node and connection mutations for lookup. Also responsible for generating unique innovation keys.
-
key_to_record
¶ A dictionary containing innovation records for each new structural mutation, indexed by innovation keys.
Type: dict
-
mutation_to_key
¶ A dictionary containing innovation keys, indexed by mutations (node_in, node_out, innovation_type).
Type: dict
-
_innovation_key_generator
¶ Generates the next innovation key.
Type: generator
-
get_innovation_key
(node_in, node_out, innovation_type)[source]¶ Get a new or existing innovation key for a structural mutation.
Parameters: - node_in (int) – The input node to the new node/connection.
- node_out (int) – The output node to the new node/connection.
- innovation_type (InnovationType) – The type of structural mutation.
Returns: The innovation key for the mutation.
Return type:
-