evolib 0.2.0b4.dev7__tar.gz → 0.2.0b4.dev8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {evolib-0.2.0b4.dev7/evolib.egg-info → evolib-0.2.0b4.dev8}/PKG-INFO +1 -2
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/README.md +0 -1
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/docs/config_guide.md +7 -4
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/docs/config_parameter.md +144 -37
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/config/evonet_component_config.py +26 -2
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/config/vector_component_config.py +1 -1
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/initializers/evonet_initializers.py +10 -47
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/initializers/registry.py +2 -6
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8/evolib.egg-info}/PKG-INFO +1 -2
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/pyproject.toml +1 -1
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/tests/test_evonet_neuron_dynamics.py +3 -4
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/tests/test_initializer_evonet.py +2 -3
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/LICENSE +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/MANIFEST.in +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/docs/api_core_individual.rst +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/docs/api_core_population.rst +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/docs/api_operators_crossover.rst +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/docs/api_operators_evonet_structural_mutation.rst +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/docs/api_operators_mutation.rst +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/docs/api_operators_replacement.rst +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/docs/api_operators_reproduction.rst +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/docs/api_operators_selection.rst +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/docs/api_operators_strategy.rst +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/docs/api_public_api.rst +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/docs/api_representation_evonet.rst +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/docs/api_representation_netvector.rst +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/docs/api_representation_vector.rst +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/docs/api_utils_benchmarks.rst +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/docs/api_utils_history_logger.rst +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/docs/api_utils_loss_functions.rst +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/docs/api_utils_plotting.rst +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/docs/conf.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/docs/getting_started.md +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/docs/index.md +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/__init__.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/api.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/config/__init__.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/config/base_component_config.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/config/component_registry.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/config/schema.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/core/README.md +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/core/__init__.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/core/individual.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/core/population.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/envs/gym_wrapper.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/globals/README.md +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/globals/__init__.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/globals/numeric.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/initializers/__init__.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/initializers/net_initializers.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/initializers/vector_initializers.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/interfaces/__init__.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/interfaces/enum_helpers.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/interfaces/enums.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/interfaces/structs.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/interfaces/types.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/io/checkpoint.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/io/serialization.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/operators/README.md +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/operators/__init__.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/operators/crossover.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/operators/evonet_structural_mutation.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/operators/heli.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/operators/mutation.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/operators/replacement.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/operators/reproduction.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/operators/selection.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/operators/strategy.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/registry/__init__.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/registry/replacement_registry.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/registry/selection_registry.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/registry/strategy_registry.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/representation/__init__.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/representation/_apply_config_mapping.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/representation/base.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/representation/composite.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/representation/dummy.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/representation/evo_params.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/representation/evonet.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/representation/netvector.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/representation/vector.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/utils/README.md +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/utils/__init__.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/utils/benchmarks.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/utils/config_loader.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/utils/fitness.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/utils/heli_experiment_logger.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/utils/heli_utils.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/utils/history_logger.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/utils/lineage_logger.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/utils/loss_functions.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/utils/parallel.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/utils/plotting.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/utils/random.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib/utils/registry.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib.egg-info/SOURCES.txt +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib.egg-info/dependency_links.txt +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib.egg-info/requires.txt +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/evolib.egg-info/top_level.txt +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/01_basic_usage/01_getting_started.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/01_basic_usage/02_mutation.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/01_basic_usage/03_population_mutation.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/01_basic_usage/04_fitness.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/02_strategies/01_step_by_step_evolution.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/02_strategies/02_mu_lambda_step.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/02_strategies/03_mu_lambda.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/02_strategies/04_flexible.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/03_comparisons/01_history.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/03_comparisons/02_plotting.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/03_comparisons/03_compare_runs.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/03_comparisons/04_exponential_decay_vs_static.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/03_comparisons/05_adaptive_global_vs_static.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/03_comparisons/06_adaptive_individual_vs_static.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/03_comparisons/07_selection_comparison.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/03_comparisons/08_selection_pressure.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/03_comparisons/09_selection_vs_mutation_pressure.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/03_comparisons/10_selection_stochastic_vs_deterministic.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/03_comparisons/11_crossover_comparison.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/04_function_approximation/01_polynomial_sine.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/04_function_approximation/02_sine_point_approximation.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/04_function_approximation/03_approximation_with_noise.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/05_advanced_topics/01_fitness_landscape_exploration.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/05_advanced_topics/02_rosenbrock_surface_path.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/05_advanced_topics/03_vector_control.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/05_advanced_topics/04_vector_control_with_obstacles.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/05_advanced_topics/05_piecewise_linear_xsys.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/05_advanced_topics/06_evolving_mutation_strength_as_a_module.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/06_netvector/01_netvector_sine_approximation.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/06_netvector/02_netvector_modulated_output.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/06_netvector/03_netvector_gain_and_bias.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/07_evonet/01_sine_approximation.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/07_evonet/02_sine_delay.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/07_evonet/03_delay_bitseq_echo.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/07_evonet/04_leaky_temporal_smoothing.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/07_evonet/05_image_approximation.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/07_evonet/06_structural_xor.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/07_evonet/07_recurrent_bit_prediction.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/07_evonet/08_recurrent_timeseries.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/07_evonet/09_recurrent_trading.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/08_gym/01_frozen_lake.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/08_gym/02_cliff_walking.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/08_gym/03_cartpole.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/08_gym/04_lunar_lander.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/08_gym/05_bipedal_walker.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/09_meta_learning/01_lamarck_linear_mapping.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/09_meta_learning/02_meta_mapping_baldwin.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/setup.cfg +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/tests/test_benchmarks.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/tests/test_config_loader.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/tests/test_elitism_preserves_best_fitness.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/tests/test_evonet_deepcopy.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/tests/test_evonet_vector_io.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/tests/test_initializer_net.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/tests/test_mutation.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/tests/test_population.py +0 -0
- {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/tests/test_selection.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: evolib
|
|
3
|
-
Version: 0.2.0b4.
|
|
3
|
+
Version: 0.2.0b4.dev8
|
|
4
4
|
Summary: A modular framework for evolutionary strategies and neuroevolution.
|
|
5
5
|
Author-email: EvoLib <evolib@dismail.de>
|
|
6
6
|
License: MIT License
|
|
@@ -164,7 +164,6 @@ modules:
|
|
|
164
164
|
type: evonet
|
|
165
165
|
dim: [4, 6, 2]
|
|
166
166
|
activation: [linear, tanh, tanh]
|
|
167
|
-
initializer: normal_evonet
|
|
168
167
|
mutation:
|
|
169
168
|
strategy: constant
|
|
170
169
|
probability: 1.0
|
|
@@ -145,11 +145,14 @@ modules:
|
|
|
145
145
|
type: evonet
|
|
146
146
|
dim: [2, 0, 0, 1] # hidden layers start empty
|
|
147
147
|
activation: [linear, tanh, tanh, sigmoid]
|
|
148
|
-
initializer: normal_evonet
|
|
149
148
|
weights:
|
|
149
|
+
initializer: normal
|
|
150
|
+
std: 0.5
|
|
150
151
|
bounds: [-5.0, 5.0]
|
|
151
|
-
bias:
|
|
152
|
-
|
|
152
|
+
bias:
|
|
153
|
+
initializer: normal
|
|
154
|
+
std: 0.5
|
|
155
|
+
bounds: [-1.0, 1.0]
|
|
153
156
|
|
|
154
157
|
recurrent: direct # REQUIRED for delay to have any effect
|
|
155
158
|
|
|
@@ -157,7 +160,7 @@ modules:
|
|
|
157
160
|
# If `recurrent` is not enabled, this block has no effect.
|
|
158
161
|
delay:
|
|
159
162
|
initializer: uniform # uniform | fixed
|
|
160
|
-
bounds: [1, 8]
|
|
163
|
+
bounds: [1, 8]
|
|
161
164
|
# value: 3 # only for fixed
|
|
162
165
|
|
|
163
166
|
mutation:
|
|
@@ -138,44 +138,146 @@ evolution:
|
|
|
138
138
|
## Modules
|
|
139
139
|
|
|
140
140
|
Modules define the parameter representation(s) of each individual. Multiple modules can be combined.
|
|
141
|
+
Depending on `structure`, the vector can represent a simple flat genome or a
|
|
142
|
+
structured parameter layout (e.g. network-like interpretation).
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
### Vector Module
|
|
147
|
+
|
|
148
|
+
The `vector` module defines an evolvable parameter vector.
|
|
149
|
+
|
|
150
|
+
| Parameter | Type | Default | Description |
|
|
151
|
+
|----------------------------------|---------------------------------------------------|----------------|------------|
|
|
152
|
+
| `type` | `"vector"` | — | Module type identifier. |
|
|
153
|
+
| `dim` | `int \| list[int]` | — | Vector length (`int`) or structured dimensions (`list[int]`). Must be > 0. |
|
|
154
|
+
| `structure` | `"flat" \| "net" | `"flat"` | Structural interpretation of the vector. |
|
|
155
|
+
| `initializer` | `str` | — | Initializer name from the registry (e.g. `random_vector`, `zero_vector`, `normal_vector`, `fixed_vector`). |
|
|
156
|
+
| `bounds` | `tuple[float, float]` | `[-1.0, 1.0]` | Hard clamp range applied after mutation. |
|
|
157
|
+
| `init_bounds` | `tuple[float, float] \| null` | `null` | Clamp applied only during initialization. Falls back to `bounds` if not set. |
|
|
158
|
+
| `shape` | `tuple[int, ...] \| null` | `null` | Optional explicit shape. If set, `dim = product(shape)`. Shape is retained as metadata. |
|
|
159
|
+
| `values` | `list[float] \| null` | `null` | Required for `initializer: fixed_vector`. If `dim` is omitted, it is inferred from `len(values)`. |
|
|
160
|
+
| `activation` | `str \| null` | `null` | Only relevant if `structure: "net"`. |
|
|
161
|
+
| `mean` | `float \| null` | `0.0` | Mean parameter for normal-based initializers (if used by initializer). |
|
|
162
|
+
| `std` | `float \| null` | `1.0` | Standard deviation for normal-based initializers (if used by initializer). |
|
|
163
|
+
| `mutation` | `dict` | — | **Required.** Mutation configuration (see below). |
|
|
164
|
+
| `randomize_mutation_strengths` | `bool \| null` | `false` | If true, per-parameter strengths are randomly initialized within min/max bounds (strategy-dependent). |
|
|
165
|
+
| `tau` | `float \| null` | `0.0` | Scaling factor for self-adaptive mutation strategies. Interpretation is strategy-dependent. |
|
|
166
|
+
| `crossover` | `dict \| null` | `null` | Optional crossover configuration. Semantics depend on operator. |
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
## Mutation Configuration
|
|
170
|
+
|
|
171
|
+
The `mutation` block must follow the `MutationConfig` schema.
|
|
141
172
|
|
|
142
173
|
### Common Fields
|
|
143
174
|
|
|
144
|
-
| Parameter
|
|
145
|
-
|
|
146
|
-
| `
|
|
147
|
-
| `
|
|
148
|
-
| `
|
|
175
|
+
| Parameter | Type | Description |
|
|
176
|
+
|-----------------|----------|-------------|
|
|
177
|
+
| `strategy` | `str` | Mutation strategy (e.g. `constant`, `adaptive_individual`, `adaptive_global`). |
|
|
178
|
+
| `probability` | `float` | Mutation probability.|
|
|
179
|
+
| `strength` | `float` | Mutation strength.|
|
|
149
180
|
|
|
150
181
|
---
|
|
151
182
|
|
|
152
|
-
###
|
|
183
|
+
### Strategy: `constant`
|
|
153
184
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
185
|
+
Uses a fixed mutation strength.
|
|
186
|
+
|
|
187
|
+
Requires:
|
|
188
|
+
- `probability`
|
|
189
|
+
- `strength`
|
|
190
|
+
|
|
191
|
+
```yaml
|
|
192
|
+
mutation:
|
|
193
|
+
strategy: constant
|
|
194
|
+
probability: 1.0
|
|
195
|
+
strength: 0.05
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### Strategy: `adaptive_individual`
|
|
199
|
+
|
|
200
|
+
Self-adaptive mutation at the individual level.
|
|
201
|
+
|
|
202
|
+
Requires:
|
|
203
|
+
- `probability`
|
|
204
|
+
- `min_strength`
|
|
205
|
+
- `max_strength`
|
|
206
|
+
|
|
207
|
+
```yaml
|
|
208
|
+
mutation:
|
|
209
|
+
strategy: adaptive_individual
|
|
210
|
+
probability: 1.0
|
|
211
|
+
min_strength: 0.01
|
|
212
|
+
max_strength: 0.05
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Strategy: `adaptive_global`
|
|
216
|
+
|
|
217
|
+
Global self-adaptive mutation strength shared across parameters.
|
|
218
|
+
|
|
219
|
+
```yaml
|
|
220
|
+
mutation:
|
|
221
|
+
strategy: adaptive_global
|
|
222
|
+
probability: 1.0
|
|
223
|
+
min_strength: 0.01
|
|
224
|
+
max_strength: 0.1
|
|
225
|
+
```
|
|
163
226
|
|
|
164
|
-
|
|
227
|
+
|
|
228
|
+
### Minimal Example:
|
|
165
229
|
|
|
166
230
|
```yaml
|
|
167
231
|
modules:
|
|
168
232
|
main:
|
|
169
233
|
type: vector
|
|
170
234
|
dim: 8
|
|
171
|
-
initializer:
|
|
235
|
+
initializer: random_vector
|
|
172
236
|
bounds: [-1.0, 1.0]
|
|
237
|
+
|
|
173
238
|
mutation:
|
|
174
|
-
strategy:
|
|
239
|
+
strategy: constant
|
|
175
240
|
probability: 1.0
|
|
176
|
-
strength: 0.
|
|
241
|
+
strength: 0.05
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
### Fixed Vector Example
|
|
245
|
+
```yaml
|
|
246
|
+
modules:
|
|
247
|
+
main:
|
|
248
|
+
type: vector
|
|
249
|
+
initializer: fixed_vector
|
|
250
|
+
values: [0.0, 1.0, 0.5, -0.5]
|
|
251
|
+
bounds: [-1.0, 1.0]
|
|
252
|
+
|
|
253
|
+
mutation:
|
|
254
|
+
strategy: constant
|
|
255
|
+
probability: 1.0
|
|
256
|
+
strength: 0.01
|
|
177
257
|
```
|
|
258
|
+
If dim is omitted, it is inferred from values.
|
|
178
259
|
|
|
260
|
+
### Advanced Example (Self-Adaptive)
|
|
261
|
+
```yaml
|
|
262
|
+
modules:
|
|
263
|
+
main:
|
|
264
|
+
type: vector
|
|
265
|
+
structure: flat
|
|
266
|
+
dim: 6
|
|
267
|
+
initializer: normal_vector
|
|
268
|
+
mean: 0.0
|
|
269
|
+
std: 0.2
|
|
270
|
+
bounds: [-1.0, 1.0]
|
|
271
|
+
|
|
272
|
+
mutation:
|
|
273
|
+
strategy: adaptive_individual
|
|
274
|
+
probability: 0.8
|
|
275
|
+
min_strength: 0.01
|
|
276
|
+
max_strength: 0.05
|
|
277
|
+
|
|
278
|
+
tau: 0.0
|
|
279
|
+
randomize_mutation_strengths: false
|
|
280
|
+
```
|
|
179
281
|
---
|
|
180
282
|
|
|
181
283
|
### EvoNet Module
|
|
@@ -186,7 +288,7 @@ modules:
|
|
|
186
288
|
|-------------------|---------------------|---------|-------------|
|
|
187
289
|
| `dim` | list[int] | — | Layer sizes, e.g. `[4, 0, 0, 2]`. Hidden layers can start empty (0) and grow through structural mutation. |
|
|
188
290
|
| `activation` | str \| list[str] | — | If list: activation per layer. If str: used for non-input layers; input layer is treated as linear. |
|
|
189
|
-
| `initializer` | str |
|
|
291
|
+
| `initializer` | str | default_evonet | Topology preset (e.g. `default_evonet`, `unconnected_evonet`, `identity_evonet`). Parameter initialization is configured via `weights`, `bias`, and `delay`. |
|
|
190
292
|
| `weights` | dict | — | Weight init and bounds configuration (initializer, bounds, optional params). |
|
|
191
293
|
| `bias` | dict | — | Bias init and bounds configuration (initializer, bounds, optional params). |
|
|
192
294
|
| `neuron_dynamics` | list[dict] \| null | null | Optional per-layer neuron dynamics specification. Must match `len(dim)`. |
|
|
@@ -197,30 +299,34 @@ modules:
|
|
|
197
299
|
|Parameter | Type | Default | Explanation |
|
|
198
300
|
|------------|-------|-----------|-------------|
|
|
199
301
|
|initializer | str | "normal" | Weight initializer preset (normal, uniform, zero, …). |
|
|
200
|
-
|bounds | list[float] | [-
|
|
302
|
+
|bounds | list[float] | [-0.5, 0.5] | Hard clipping bounds. |
|
|
201
303
|
|std | float | null |null | Std-dev for normal (if used). |
|
|
202
304
|
|
|
203
305
|
##### bias block
|
|
204
306
|
|Parameter | Type | Default | Explanation |
|
|
205
307
|
|------------|-------|-----------|-------------|
|
|
206
|
-
|initializer | str | "normal" |
|
|
207
|
-
|bounds | list[float] | [-1.0, 1.0] | Hard clipping bounds
|
|
208
|
-
|std | float | null |
|
|
308
|
+
|initializer | str | "normal" | Bias initializer preset (normal, uniform, zero, …). |
|
|
309
|
+
|bounds | list[float] | [-1.0, 1.0] | Hard clipping bounds. |
|
|
310
|
+
|std | float | null | Std-dev for normal (if used). |
|
|
209
311
|
|
|
210
312
|
---
|
|
211
313
|
|
|
212
|
-
#### EvoNet Initializer
|
|
314
|
+
#### EvoNet Initializer (Topology Presets)
|
|
315
|
+
|
|
316
|
+
`initializer` selects a **topology preset**.
|
|
213
317
|
|
|
214
|
-
|
|
318
|
+
Parameter initialization is configured via:
|
|
319
|
+
- `weights`
|
|
320
|
+
- `bias`
|
|
321
|
+
- `delay` (recurrent connections only)
|
|
215
322
|
|
|
216
|
-
|
|
217
|
-
|---------------------|------------------------------------|----------------------------------|---------------------------------------------|
|
|
218
|
-
| `normal_evonet` | Normal(0, 0.5) | Normal(0, 0.5) | Default initializer for general use |
|
|
219
|
-
| `unconnected_evonet`| None | 0 | For pure structural growth; empty topology |
|
|
220
|
-
| `random_evonet` | Random | Uniform(bias bounds) | For broader stochastic exploration |
|
|
221
|
-
| `zero_evonet` | 0 | 0 | Deterministic baseline; debugging |
|
|
222
|
-
| `identity_evonet` | Small random | Small random | Designed for stable recurrent memory |
|
|
323
|
+
Allowed presets:
|
|
223
324
|
|
|
325
|
+
| Initializer | Meaning (topology only) |
|
|
326
|
+
|------------------------|-------------------------|
|
|
327
|
+
| `default_evonet` | Standard EvoNet topology preset (uses `connection_scope`, `connection_density`, and `recurrent`). |
|
|
328
|
+
| `unconnected_evonet` | Creates neurons/layers but starts with **no connections** (use structural mutation to grow). |
|
|
329
|
+
| `identity_evonet` | Special preset intended for stable recurrent memory (may override parameters internally; see notes below). |
|
|
224
330
|
|
|
225
331
|
---
|
|
226
332
|
|
|
@@ -246,7 +352,6 @@ modules:
|
|
|
246
352
|
type: evonet
|
|
247
353
|
dim: [1, 16, 1]
|
|
248
354
|
activation: [linear, tanh, sigmoid]
|
|
249
|
-
initializer: normal_evonet
|
|
250
355
|
neuron_dynamics:
|
|
251
356
|
- name: standard
|
|
252
357
|
params: {}
|
|
@@ -276,7 +381,7 @@ modules:
|
|
|
276
381
|
...
|
|
277
382
|
delay:
|
|
278
383
|
initializer: uniform # uniform | fixed
|
|
279
|
-
bounds: [1, 8]
|
|
384
|
+
bounds: [1, 8]
|
|
280
385
|
# value: 3 # only for fixed
|
|
281
386
|
```
|
|
282
387
|
|
|
@@ -390,9 +495,9 @@ structural:
|
|
|
390
495
|
|
|
391
496
|
| Field | Type | Default | Description |
|
|
392
497
|
|---------------------|---------------|----------|-------------|
|
|
393
|
-
| `recurrent` | str | `none` | Controls recurrence: `none`, `direct`, `
|
|
498
|
+
| `recurrent` | str | `none` | Controls recurrence: `none`, `direct`, `local` or `all`. |
|
|
394
499
|
| `connection_scope` | str | `adjacent` | Allowed layer connectivity: `adjacent` (neighbor layers only) or `crosslayer` (any-to-any). |
|
|
395
|
-
| `connection_density` | float
|
|
500
|
+
| `connection_density` | float | 1.0 | Fraction of possible connections initialized at creation time. |
|
|
396
501
|
| `max_neurons` | int \| null | null | Maximum number of non-input neurons (`null` = unlimited). |
|
|
397
502
|
| `max_connections` | int \| null | null | Maximum number of edges (`null` = unlimited). |
|
|
398
503
|
|
|
@@ -432,6 +537,8 @@ modules:
|
|
|
432
537
|
strategy: adaptive_individual
|
|
433
538
|
probability: 1.0
|
|
434
539
|
strength: 0.1
|
|
540
|
+
min_strength: 0.01
|
|
541
|
+
max_strength: 0.05
|
|
435
542
|
|
|
436
543
|
brain:
|
|
437
544
|
type: evonet
|
|
@@ -189,7 +189,6 @@ class EvoNetComponentConfig(BaseModel):
|
|
|
189
189
|
type: evonet
|
|
190
190
|
dim: [4, 6, 2] # input, hidden, output
|
|
191
191
|
activation: [linear, relu, sigmoid] # single activation or list per layer
|
|
192
|
-
initializer: normal_evonet # weight/bias initializer
|
|
193
192
|
|
|
194
193
|
weights:
|
|
195
194
|
initializer: normal
|
|
@@ -228,7 +227,9 @@ class EvoNetComponentConfig(BaseModel):
|
|
|
228
227
|
recurrent: Optional[Literal["none", "direct", "local", "all"]] = "none"
|
|
229
228
|
|
|
230
229
|
# Name of the initializer function (resolved via initializer registry)
|
|
231
|
-
initializer: str = Field(
|
|
230
|
+
initializer: str = Field(
|
|
231
|
+
default="default_evonet", description="Name of the initializer to use"
|
|
232
|
+
)
|
|
232
233
|
|
|
233
234
|
# Connection topology for initialization
|
|
234
235
|
connection_scope: Literal["adjacent", "crosslayer"] = Field(
|
|
@@ -266,6 +267,29 @@ class EvoNetComponentConfig(BaseModel):
|
|
|
266
267
|
structural: Optional[StructuralMutationConfig] = None
|
|
267
268
|
|
|
268
269
|
# Validators
|
|
270
|
+
@field_validator("initializer")
|
|
271
|
+
@classmethod
|
|
272
|
+
def validate_initializer(cls, name: str) -> str:
|
|
273
|
+
"""
|
|
274
|
+
Validate that the initializer is one of the allowed topology presets.
|
|
275
|
+
|
|
276
|
+
Parameter initialization is handled exclusively via weights/bias/delay blocks.
|
|
277
|
+
"""
|
|
278
|
+
allowed = {
|
|
279
|
+
"default_evonet",
|
|
280
|
+
"unconnected_evonet",
|
|
281
|
+
"identity_evonet",
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
if name not in allowed:
|
|
285
|
+
raise ValueError(
|
|
286
|
+
f"Unknown EvoNet initializer '{name}'. "
|
|
287
|
+
f"Allowed values: {sorted(allowed)}. "
|
|
288
|
+
"Parameter initialization is configured via "
|
|
289
|
+
"'weights', 'bias', and 'delay'."
|
|
290
|
+
)
|
|
291
|
+
|
|
292
|
+
return name
|
|
269
293
|
|
|
270
294
|
@field_validator("neuron_dynamics")
|
|
271
295
|
@classmethod
|
|
@@ -101,7 +101,7 @@ class VectorComponentConfig(BaseModel):
|
|
|
101
101
|
)
|
|
102
102
|
|
|
103
103
|
# Evolution (mutation / crossover)
|
|
104
|
-
mutation:
|
|
104
|
+
mutation: MutationConfig = Field(
|
|
105
105
|
default=None,
|
|
106
106
|
description=(
|
|
107
107
|
"Mutation configuration. By default, 'probability' is an element-wise rate "
|
|
@@ -173,28 +173,7 @@ def _build_architecture(
|
|
|
173
173
|
)
|
|
174
174
|
|
|
175
175
|
|
|
176
|
-
def
|
|
177
|
-
"""
|
|
178
|
-
Initializes an EvoNet without connections.
|
|
179
|
-
|
|
180
|
-
Args:
|
|
181
|
-
config (FullConfig): Full experiment configuration
|
|
182
|
-
module (str): Module name (e.g. "brain")
|
|
183
|
-
|
|
184
|
-
Returns:
|
|
185
|
-
EvoNet: Initialized EvoNet representation
|
|
186
|
-
"""
|
|
187
|
-
para = EvoNet()
|
|
188
|
-
cfg = config.modules[module].model_copy(deep=True)
|
|
189
|
-
para.apply_config(cfg)
|
|
190
|
-
|
|
191
|
-
_build_architecture(para, cfg, connection_init="none")
|
|
192
|
-
_apply_bias_init(para, cfg)
|
|
193
|
-
|
|
194
|
-
return para
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
def initializer_normal_evonet(config: FullConfig, module: str) -> EvoNet:
|
|
176
|
+
def initializer_default_evonet(config: FullConfig, module: str) -> EvoNet:
|
|
198
177
|
"""
|
|
199
178
|
Build a standard EvoNet architecture and initialize parameters according to the
|
|
200
179
|
explicit configuration blocks.
|
|
@@ -203,9 +182,6 @@ def initializer_normal_evonet(config: FullConfig, module: str) -> EvoNet:
|
|
|
203
182
|
- Weights are initialized using `cfg.weights`.
|
|
204
183
|
- Biases are initialized using `cfg.bias`.
|
|
205
184
|
- Delay (if configured) is initialized using `cfg.delay`.
|
|
206
|
-
|
|
207
|
-
No implicit parameter initialization is performed here.
|
|
208
|
-
All parameter distributions are controlled explicitly via the config.
|
|
209
185
|
"""
|
|
210
186
|
|
|
211
187
|
para = EvoNet()
|
|
@@ -219,36 +195,23 @@ def initializer_normal_evonet(config: FullConfig, module: str) -> EvoNet:
|
|
|
219
195
|
return para
|
|
220
196
|
|
|
221
197
|
|
|
222
|
-
def
|
|
223
|
-
"""
|
|
224
|
-
Backward-compatible alias for the standard EvoNet initializer. Will be removed.
|
|
225
|
-
|
|
226
|
-
Parameter initialization is controlled by `cfg.weights`, `cfg.bias`,
|
|
227
|
-
and `cfg.delay`.
|
|
228
|
-
"""
|
|
229
|
-
return initializer_normal_evonet(config, module)
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
def initializer_zero_evonet(config: FullConfig, module: str) -> EvoNet:
|
|
198
|
+
def initializer_unconnected_evonet(config: FullConfig, module: str) -> EvoNet:
|
|
233
199
|
"""
|
|
234
|
-
|
|
200
|
+
Initializes an EvoNet without connections.
|
|
235
201
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
202
|
+
Args:
|
|
203
|
+
config (FullConfig): Full experiment configuration
|
|
204
|
+
module (str): Module name (e.g. "brain")
|
|
239
205
|
|
|
240
|
-
|
|
206
|
+
Returns:
|
|
207
|
+
EvoNet: Initialized EvoNet representation
|
|
241
208
|
"""
|
|
242
|
-
|
|
243
209
|
para = EvoNet()
|
|
244
210
|
cfg = config.modules[module].model_copy(deep=True)
|
|
245
211
|
para.apply_config(cfg)
|
|
246
212
|
|
|
247
|
-
_build_architecture(para, cfg, connection_init="
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
para.net.set_weights(np.zeros(para.net.num_weights))
|
|
251
|
-
para.net.set_biases(np.zeros(para.net.num_biases))
|
|
213
|
+
_build_architecture(para, cfg, connection_init="none")
|
|
214
|
+
_apply_bias_init(para, cfg)
|
|
252
215
|
|
|
253
216
|
return para
|
|
254
217
|
|
|
@@ -17,11 +17,9 @@ from evolib.config.schema import FullConfig
|
|
|
17
17
|
|
|
18
18
|
# EvoNet-based initializer
|
|
19
19
|
from evolib.initializers.evonet_initializers import (
|
|
20
|
+
initializer_default_evonet,
|
|
20
21
|
initializer_identity_evonet,
|
|
21
|
-
initializer_normal_evonet,
|
|
22
|
-
initializer_random_evonet,
|
|
23
22
|
initializer_unconnected_evonet,
|
|
24
|
-
initializer_zero_evonet,
|
|
25
23
|
)
|
|
26
24
|
|
|
27
25
|
# NetVector-based initializer
|
|
@@ -50,9 +48,7 @@ INITIALIZER_REGISTRY: dict[str, InitializerFunction] = {
|
|
|
50
48
|
"fixed_vector": initializer_fixed_vector,
|
|
51
49
|
"adaptive_vector": initializer_adaptive_vector,
|
|
52
50
|
"normal_net": initializer_normal_net,
|
|
53
|
-
"
|
|
54
|
-
"random_evonet": initializer_random_evonet,
|
|
55
|
-
"zero_evonet": initializer_zero_evonet,
|
|
51
|
+
"default_evonet": initializer_default_evonet,
|
|
56
52
|
"identity_evonet": initializer_identity_evonet,
|
|
57
53
|
"unconnected_evonet": initializer_unconnected_evonet,
|
|
58
54
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: evolib
|
|
3
|
-
Version: 0.2.0b4.
|
|
3
|
+
Version: 0.2.0b4.dev8
|
|
4
4
|
Summary: A modular framework for evolutionary strategies and neuroevolution.
|
|
5
5
|
Author-email: EvoLib <evolib@dismail.de>
|
|
6
6
|
License: MIT License
|
|
@@ -164,7 +164,6 @@ modules:
|
|
|
164
164
|
type: evonet
|
|
165
165
|
dim: [4, 6, 2]
|
|
166
166
|
activation: [linear, tanh, tanh]
|
|
167
|
-
initializer: normal_evonet
|
|
168
167
|
mutation:
|
|
169
168
|
strategy: constant
|
|
170
169
|
probability: 1.0
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "evolib"
|
|
7
|
-
version = "0.2.0b4.
|
|
7
|
+
version = "0.2.0b4.dev8"
|
|
8
8
|
description = "A modular framework for evolutionary strategies and neuroevolution."
|
|
9
9
|
authors = [
|
|
10
10
|
{ name = "EvoLib", email = "evolib@dismail.de" }
|
|
@@ -4,7 +4,7 @@ import pytest
|
|
|
4
4
|
|
|
5
5
|
from evolib.config.evonet_component_config import EvoNetComponentConfig
|
|
6
6
|
from evolib.config.schema import FullConfig
|
|
7
|
-
from evolib.initializers.evonet_initializers import
|
|
7
|
+
from evolib.initializers.evonet_initializers import initializer_default_evonet
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
def test_neuron_dynamics_config_length_matches_dim() -> None:
|
|
@@ -16,7 +16,6 @@ def test_neuron_dynamics_config_length_matches_dim() -> None:
|
|
|
16
16
|
type="evonet",
|
|
17
17
|
dim=[1, 2, 1],
|
|
18
18
|
activation=["linear", "tanh", "tanh"],
|
|
19
|
-
initializer="zero_evonet",
|
|
20
19
|
weights={
|
|
21
20
|
"initializer": "normal",
|
|
22
21
|
"std": 0.5,
|
|
@@ -48,7 +47,7 @@ def test_neuron_dynamics_applied_to_neurons() -> None:
|
|
|
48
47
|
"type": "evonet",
|
|
49
48
|
"dim": [1, 3, 1],
|
|
50
49
|
"activation": ["linear", "tanh", "tanh"],
|
|
51
|
-
"initializer": "
|
|
50
|
+
"initializer": "default_evonet",
|
|
52
51
|
"recurrent": "local",
|
|
53
52
|
"connection_scope": "adjacent",
|
|
54
53
|
"connection_density": 1.0,
|
|
@@ -82,7 +81,7 @@ def test_neuron_dynamics_applied_to_neurons() -> None:
|
|
|
82
81
|
parallel=None,
|
|
83
82
|
)
|
|
84
83
|
|
|
85
|
-
para =
|
|
84
|
+
para = initializer_default_evonet(cfg, "brain")
|
|
86
85
|
|
|
87
86
|
# Layer 0 (input): standard
|
|
88
87
|
for n in para.net.layers[0].neurons:
|
|
@@ -3,7 +3,7 @@ from evolib.initializers.registry import get_initializer
|
|
|
3
3
|
from evolib.representation.evonet import EvoNet
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
def
|
|
6
|
+
def test_default_initializer_evonet_builds_expected_structure() -> None:
|
|
7
7
|
config = FullConfig(
|
|
8
8
|
parent_pool_size=1,
|
|
9
9
|
offspring_pool_size=1,
|
|
@@ -15,7 +15,6 @@ def test_normal_initializer_evonet_builds_expected_structure() -> None:
|
|
|
15
15
|
"type": "evonet",
|
|
16
16
|
"dim": [2, 3, 1],
|
|
17
17
|
"activation": "linear",
|
|
18
|
-
"initializer": "normal_evonet",
|
|
19
18
|
"weights": {
|
|
20
19
|
"initializer": "normal",
|
|
21
20
|
"std": 0.5,
|
|
@@ -35,7 +34,7 @@ def test_normal_initializer_evonet_builds_expected_structure() -> None:
|
|
|
35
34
|
},
|
|
36
35
|
)
|
|
37
36
|
|
|
38
|
-
init_fn = get_initializer("
|
|
37
|
+
init_fn = get_initializer("default_evonet")
|
|
39
38
|
para = init_fn(config, "brain")
|
|
40
39
|
assert isinstance(para, EvoNet)
|
|
41
40
|
net = para.net
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/docs/api_operators_evonet_structural_mutation.rst
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/01_basic_usage/03_population_mutation.py
RENAMED
|
File without changes
|
|
File without changes
|
{evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/02_strategies/01_step_by_step_evolution.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/03_comparisons/05_adaptive_global_vs_static.py
RENAMED
|
File without changes
|
|
File without changes
|
{evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/03_comparisons/07_selection_comparison.py
RENAMED
|
File without changes
|
{evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/03_comparisons/08_selection_pressure.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/03_comparisons/11_crossover_comparison.py
RENAMED
|
File without changes
|
{evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/04_function_approximation/01_polynomial_sine.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/05_advanced_topics/03_vector_control.py
RENAMED
|
File without changes
|
|
File without changes
|
{evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/05_advanced_topics/05_piecewise_linear_xsys.py
RENAMED
|
File without changes
|
|
File without changes
|
{evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/06_netvector/01_netvector_sine_approximation.py
RENAMED
|
File without changes
|
{evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/06_netvector/02_netvector_modulated_output.py
RENAMED
|
File without changes
|
{evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/06_netvector/03_netvector_gain_and_bias.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/07_evonet/04_leaky_temporal_smoothing.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/07_evonet/07_recurrent_bit_prediction.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/09_meta_learning/01_lamarck_linear_mapping.py
RENAMED
|
File without changes
|
{evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev8}/examples/09_meta_learning/02_meta_mapping_baldwin.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|