EvoNet¶
EvoLib integration layer for EvoNet.
Provides an interface to EvoNet networks so it can be used inside EvoLib’s evolutionary pipeline. Supports configuration, mutation, crossover, and conversion to/from vector form.
- class evolib.representation.evonet.EvoNet[source]¶
Bases:
ParaBaseWrapper class for EvoNet.
Responsibilities: - Build and configure neural networks from YAML/typed configs - Provide mutation (weights, biases, activations, structure) - Provide crossover at weight/bias level (no structural crossover) - Expose network parameters as flat vectors for integration
- crossover_with(partner)[source]¶
Perform crossover on weights and biases if topologies are compatible.
Structural crossover is not supported.
- Return type:
None
- get_weights()[source]¶
Return network weights in the canonical order defined by Nnet.
- Return type:
ndarray
- plot(name, engine='neato', labels_on=True, colors_on=True, thickness_on=False, fillcolors_on=False)[source]¶
Prints the graph structure of the EvoNet.
- Parameters:
name (str) – Output filename (without extension).
engine (str) – Layout engine for Graphviz.
labels_on (bool) – Show edge weights as labels.
colors_on (bool) – Use color coding for edge weights.
thickness_on (bool) – Adjust edge thickness by weight.
fillcolors_on (bool) – Fill nodes with colors by type.
- Return type:
None