evolib 0.2.0b4.dev7__tar.gz → 0.2.0b4.dev9__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.
Files changed (157) hide show
  1. {evolib-0.2.0b4.dev7/evolib.egg-info → evolib-0.2.0b4.dev9}/PKG-INFO +1 -2
  2. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/README.md +0 -1
  3. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/docs/config_guide.md +9 -6
  4. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/docs/config_parameter.md +144 -37
  5. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/config/evonet_component_config.py +31 -3
  6. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/config/vector_component_config.py +41 -10
  7. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/initializers/evonet_initializers.py +10 -47
  8. evolib-0.2.0b4.dev9/evolib/initializers/registry.py +112 -0
  9. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/interfaces/enums.py +1 -2
  10. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9/evolib.egg-info}/PKG-INFO +1 -2
  11. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/02_strategies/01_step_by_step_evolution.py +2 -2
  12. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/05_advanced_topics/06_evolving_mutation_strength_as_a_module.py +1 -1
  13. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/pyproject.toml +1 -1
  14. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/tests/test_config_loader.py +1 -1
  15. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/tests/test_evonet_neuron_dynamics.py +3 -4
  16. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/tests/test_initializer_evonet.py +3 -4
  17. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/tests/test_initializer_net.py +3 -3
  18. evolib-0.2.0b4.dev7/evolib/initializers/registry.py +0 -89
  19. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/LICENSE +0 -0
  20. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/MANIFEST.in +0 -0
  21. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/docs/api_core_individual.rst +0 -0
  22. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/docs/api_core_population.rst +0 -0
  23. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/docs/api_operators_crossover.rst +0 -0
  24. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/docs/api_operators_evonet_structural_mutation.rst +0 -0
  25. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/docs/api_operators_mutation.rst +0 -0
  26. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/docs/api_operators_replacement.rst +0 -0
  27. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/docs/api_operators_reproduction.rst +0 -0
  28. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/docs/api_operators_selection.rst +0 -0
  29. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/docs/api_operators_strategy.rst +0 -0
  30. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/docs/api_public_api.rst +0 -0
  31. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/docs/api_representation_evonet.rst +0 -0
  32. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/docs/api_representation_netvector.rst +0 -0
  33. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/docs/api_representation_vector.rst +0 -0
  34. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/docs/api_utils_benchmarks.rst +0 -0
  35. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/docs/api_utils_history_logger.rst +0 -0
  36. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/docs/api_utils_loss_functions.rst +0 -0
  37. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/docs/api_utils_plotting.rst +0 -0
  38. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/docs/conf.py +0 -0
  39. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/docs/getting_started.md +0 -0
  40. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/docs/index.md +0 -0
  41. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/__init__.py +0 -0
  42. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/api.py +0 -0
  43. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/config/__init__.py +0 -0
  44. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/config/base_component_config.py +0 -0
  45. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/config/component_registry.py +0 -0
  46. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/config/schema.py +0 -0
  47. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/core/README.md +0 -0
  48. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/core/__init__.py +0 -0
  49. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/core/individual.py +0 -0
  50. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/core/population.py +0 -0
  51. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/envs/gym_wrapper.py +0 -0
  52. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/globals/README.md +0 -0
  53. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/globals/__init__.py +0 -0
  54. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/globals/numeric.py +0 -0
  55. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/initializers/__init__.py +0 -0
  56. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/initializers/net_initializers.py +0 -0
  57. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/initializers/vector_initializers.py +0 -0
  58. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/interfaces/__init__.py +0 -0
  59. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/interfaces/enum_helpers.py +0 -0
  60. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/interfaces/structs.py +0 -0
  61. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/interfaces/types.py +0 -0
  62. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/io/checkpoint.py +0 -0
  63. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/io/serialization.py +0 -0
  64. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/operators/README.md +0 -0
  65. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/operators/__init__.py +0 -0
  66. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/operators/crossover.py +0 -0
  67. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/operators/evonet_structural_mutation.py +0 -0
  68. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/operators/heli.py +0 -0
  69. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/operators/mutation.py +0 -0
  70. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/operators/replacement.py +0 -0
  71. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/operators/reproduction.py +0 -0
  72. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/operators/selection.py +0 -0
  73. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/operators/strategy.py +0 -0
  74. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/registry/__init__.py +0 -0
  75. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/registry/replacement_registry.py +0 -0
  76. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/registry/selection_registry.py +0 -0
  77. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/registry/strategy_registry.py +0 -0
  78. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/representation/__init__.py +0 -0
  79. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/representation/_apply_config_mapping.py +0 -0
  80. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/representation/base.py +0 -0
  81. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/representation/composite.py +0 -0
  82. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/representation/dummy.py +0 -0
  83. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/representation/evo_params.py +0 -0
  84. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/representation/evonet.py +0 -0
  85. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/representation/netvector.py +0 -0
  86. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/representation/vector.py +0 -0
  87. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/utils/README.md +0 -0
  88. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/utils/__init__.py +0 -0
  89. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/utils/benchmarks.py +0 -0
  90. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/utils/config_loader.py +0 -0
  91. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/utils/fitness.py +0 -0
  92. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/utils/heli_experiment_logger.py +0 -0
  93. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/utils/heli_utils.py +0 -0
  94. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/utils/history_logger.py +0 -0
  95. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/utils/lineage_logger.py +0 -0
  96. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/utils/loss_functions.py +0 -0
  97. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/utils/parallel.py +0 -0
  98. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/utils/plotting.py +0 -0
  99. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/utils/random.py +0 -0
  100. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib/utils/registry.py +0 -0
  101. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib.egg-info/SOURCES.txt +0 -0
  102. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib.egg-info/dependency_links.txt +0 -0
  103. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib.egg-info/requires.txt +0 -0
  104. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/evolib.egg-info/top_level.txt +0 -0
  105. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/01_basic_usage/01_getting_started.py +0 -0
  106. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/01_basic_usage/02_mutation.py +0 -0
  107. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/01_basic_usage/03_population_mutation.py +0 -0
  108. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/01_basic_usage/04_fitness.py +0 -0
  109. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/02_strategies/02_mu_lambda_step.py +0 -0
  110. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/02_strategies/03_mu_lambda.py +0 -0
  111. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/02_strategies/04_flexible.py +0 -0
  112. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/03_comparisons/01_history.py +0 -0
  113. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/03_comparisons/02_plotting.py +0 -0
  114. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/03_comparisons/03_compare_runs.py +0 -0
  115. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/03_comparisons/04_exponential_decay_vs_static.py +0 -0
  116. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/03_comparisons/05_adaptive_global_vs_static.py +0 -0
  117. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/03_comparisons/06_adaptive_individual_vs_static.py +0 -0
  118. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/03_comparisons/07_selection_comparison.py +0 -0
  119. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/03_comparisons/08_selection_pressure.py +0 -0
  120. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/03_comparisons/09_selection_vs_mutation_pressure.py +0 -0
  121. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/03_comparisons/10_selection_stochastic_vs_deterministic.py +0 -0
  122. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/03_comparisons/11_crossover_comparison.py +0 -0
  123. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/04_function_approximation/01_polynomial_sine.py +0 -0
  124. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/04_function_approximation/02_sine_point_approximation.py +0 -0
  125. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/04_function_approximation/03_approximation_with_noise.py +0 -0
  126. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/05_advanced_topics/01_fitness_landscape_exploration.py +0 -0
  127. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/05_advanced_topics/02_rosenbrock_surface_path.py +0 -0
  128. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/05_advanced_topics/03_vector_control.py +0 -0
  129. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/05_advanced_topics/04_vector_control_with_obstacles.py +0 -0
  130. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/05_advanced_topics/05_piecewise_linear_xsys.py +0 -0
  131. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/06_netvector/01_netvector_sine_approximation.py +0 -0
  132. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/06_netvector/02_netvector_modulated_output.py +0 -0
  133. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/06_netvector/03_netvector_gain_and_bias.py +0 -0
  134. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/07_evonet/01_sine_approximation.py +0 -0
  135. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/07_evonet/02_sine_delay.py +0 -0
  136. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/07_evonet/03_delay_bitseq_echo.py +0 -0
  137. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/07_evonet/04_leaky_temporal_smoothing.py +0 -0
  138. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/07_evonet/05_image_approximation.py +0 -0
  139. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/07_evonet/06_structural_xor.py +0 -0
  140. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/07_evonet/07_recurrent_bit_prediction.py +0 -0
  141. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/07_evonet/08_recurrent_timeseries.py +0 -0
  142. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/07_evonet/09_recurrent_trading.py +0 -0
  143. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/08_gym/01_frozen_lake.py +0 -0
  144. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/08_gym/02_cliff_walking.py +0 -0
  145. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/08_gym/03_cartpole.py +0 -0
  146. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/08_gym/04_lunar_lander.py +0 -0
  147. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/08_gym/05_bipedal_walker.py +0 -0
  148. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/09_meta_learning/01_lamarck_linear_mapping.py +0 -0
  149. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/examples/09_meta_learning/02_meta_mapping_baldwin.py +0 -0
  150. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/setup.cfg +0 -0
  151. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/tests/test_benchmarks.py +0 -0
  152. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/tests/test_elitism_preserves_best_fitness.py +0 -0
  153. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/tests/test_evonet_deepcopy.py +0 -0
  154. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/tests/test_evonet_vector_io.py +0 -0
  155. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/tests/test_mutation.py +0 -0
  156. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/tests/test_population.py +0 -0
  157. {evolib-0.2.0b4.dev7 → evolib-0.2.0b4.dev9}/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.dev7
3
+ Version: 0.2.0b4.dev9
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
@@ -105,7 +105,6 @@ modules:
105
105
  type: evonet
106
106
  dim: [4, 6, 2]
107
107
  activation: [linear, tanh, tanh]
108
- initializer: normal_evonet
109
108
  mutation:
110
109
  strategy: constant
111
110
  probability: 1.0
@@ -30,7 +30,7 @@ evolution:
30
30
  modules:
31
31
  test-vector: # logical module name
32
32
  type: vector
33
- initializer: random_vector
33
+ initializer: uniform
34
34
  dim: 2
35
35
  bounds: [-1.0, 1.0]
36
36
 
@@ -89,7 +89,7 @@ modules:
89
89
  xs:
90
90
  type: vector
91
91
  dim: 6
92
- initializer: random_vector
92
+ initializer: uniform
93
93
  bounds: [0.0, 6.283185307] # [0, 2π]
94
94
  mutation:
95
95
  strategy: adaptive_individual
@@ -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
- bounds: [-1.0, 1.0]
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] # only for random
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. `uniform`, `zero`, `normal`, `fixed`). |
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 | Type | Default | Explanation |
145
- |--------------|------|---------|-------------------------------------------------------------|
146
- | `type` | str | — | Type of parameter representation (`vector`, `evonet`, ...). |
147
- | `initializer`| str | — | Initialization method for the module. |
148
- | `bounds` | list | — | Lower and upper limits for values (only for vectors). |
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
- ### Vector Module
183
+ ### Strategy: `constant`
153
184
 
154
- | Parameter | Type | Default | Explanation |
155
- |---------------|-------------|---------|------------------------------------------------------------------------------|
156
- | `dim` | int | — | Dimensionality of the vector. |
157
- | `initializer` | str | — | Initialization method (e.g. `normal_vector`, `random_vector`, `zero_vector`).|
158
- | `bounds` | list | — | Hard bounds for values. |
159
- | `init_bounds` | list \| null | null | Bounds used during initialization (fallback to `bounds` if omitted). |
160
- | `values` | list \| null | null | Fixed values for `initializer: fixed_vector`. |
161
- | `mutation` | dict \| null | null | Mutation settings for the vector. |
162
- | `crossover` | dict \| null | null | Crossover settings for the vector. |
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
- Example:
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: normal_vector
235
+ initializer: uniform
172
236
  bounds: [-1.0, 1.0]
237
+
173
238
  mutation:
174
- strategy: adaptive_individual
239
+ strategy: constant
175
240
  probability: 1.0
176
- strength: 0.1
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 | | Network initialization method (e.g. `normal_evonet`, `unconnected_evonet`). |
291
+ | `initializer` | str | default | Topology preset (e.g. `default`, `unconnected`, `identity`). 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] | [-1.0, 1.0] | Hard clipping bounds [min_w, max_w]. |
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" | Weight initializer preset (normal, uniform, zero, …). |
207
- |bounds | list[float] | [-1.0, 1.0] | Hard clipping bounds [min_w, max_w]. |
208
- |std | float | null |null | Std-dev for normal (if used). |
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
- The EvoNet module uses:
318
+ Parameter initialization is configured via:
319
+ - `weights`
320
+ - `bias`
321
+ - `delay` (recurrent connections only)
215
322
 
216
- | Initializer | Weights | Biases | Notes |
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` | 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] # only for random
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`, `lateral`/`local`, `indirect`, or `all` (implementation-dependent aliases may exist). |
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 \| null | null | Optional density control for created connections (if supported). |
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
@@ -30,6 +30,7 @@ from evolib.config.base_component_config import (
30
30
  EvoNetNeuronDynamicsConfig,
31
31
  StructuralMutationConfig,
32
32
  )
33
+ from evolib.interfaces.enums import RepresentationType
33
34
 
34
35
  Bounds = Tuple[float, float]
35
36
 
@@ -189,7 +190,6 @@ class EvoNetComponentConfig(BaseModel):
189
190
  type: evonet
190
191
  dim: [4, 6, 2] # input, hidden, output
191
192
  activation: [linear, relu, sigmoid] # single activation or list per layer
192
- initializer: normal_evonet # weight/bias initializer
193
193
 
194
194
  weights:
195
195
  initializer: normal
@@ -209,7 +209,10 @@ class EvoNetComponentConfig(BaseModel):
209
209
  model_config = ConfigDict(extra="forbid")
210
210
 
211
211
  # Module type is fixed to "evonet"
212
- type: Literal["evonet"] = "evonet"
212
+ type: RepresentationType = Field(
213
+ default=RepresentationType.EVONET,
214
+ description='Fixed module discriminator; must be "evonet" for this schema.',
215
+ )
213
216
 
214
217
  # Layer structure: list of neuron counts per layer [input, hidden..., output]
215
218
  dim: list[int]
@@ -228,7 +231,9 @@ class EvoNetComponentConfig(BaseModel):
228
231
  recurrent: Optional[Literal["none", "direct", "local", "all"]] = "none"
229
232
 
230
233
  # Name of the initializer function (resolved via initializer registry)
231
- initializer: str = Field(..., description="Name of the initializer to use")
234
+ initializer: str = Field(
235
+ default="default", description="Name of the initializer to use"
236
+ )
232
237
 
233
238
  # Connection topology for initialization
234
239
  connection_scope: Literal["adjacent", "crosslayer"] = Field(
@@ -266,6 +271,29 @@ class EvoNetComponentConfig(BaseModel):
266
271
  structural: Optional[StructuralMutationConfig] = None
267
272
 
268
273
  # Validators
274
+ @field_validator("initializer")
275
+ @classmethod
276
+ def validate_initializer(cls, name: str) -> str:
277
+ """
278
+ Validate that the initializer is one of the allowed topology presets.
279
+
280
+ Parameter initialization is handled exclusively via weights/bias/delay blocks.
281
+ """
282
+ allowed = {
283
+ "default",
284
+ "unconnected",
285
+ "identity",
286
+ }
287
+
288
+ if name not in allowed:
289
+ raise ValueError(
290
+ f"Unknown EvoNet initializer '{name}'. "
291
+ f"Allowed values: {sorted(allowed)}. "
292
+ "Parameter initialization is configured via "
293
+ "'weights', 'bias', and 'delay'."
294
+ )
295
+
296
+ return name
269
297
 
270
298
  @field_validator("neuron_dynamics")
271
299
  @classmethod
@@ -1,7 +1,14 @@
1
1
  # SPDX-License-Identifier: MIT
2
2
  from typing import Any, Literal, Optional, Tuple, Union
3
3
 
4
- from pydantic import BaseModel, ConfigDict, Field, field_validator, model_validator
4
+ from pydantic import (
5
+ BaseModel,
6
+ ConfigDict,
7
+ Field,
8
+ ValidationInfo,
9
+ field_validator,
10
+ model_validator,
11
+ )
5
12
 
6
13
  from evolib.config.base_component_config import CrossoverConfig, MutationConfig
7
14
  from evolib.interfaces.enums import RepresentationType
@@ -21,7 +28,7 @@ class VectorComponentConfig(BaseModel):
21
28
  type: vector
22
29
  structure: flat # "flat" | "net"
23
30
  dim: 16 # or a list for structured cases
24
- initializer: random_vector # name from the initializer registry
31
+ initializer: normal # name from the initializer registry
25
32
  bounds: [-1.0, 1.0]
26
33
  mutation:
27
34
  strategy: constant
@@ -86,7 +93,7 @@ class VectorComponentConfig(BaseModel):
86
93
  values: Optional[list[float]] = Field(
87
94
  default=None,
88
95
  description=(
89
- "Explicit values for 'fixed_vector' initializer. If 'dim' is absent it "
96
+ "Explicit values for 'fixed' initializer. If 'dim' is absent it "
90
97
  "will be inferred from the length of 'values'."
91
98
  ),
92
99
  )
@@ -101,8 +108,7 @@ class VectorComponentConfig(BaseModel):
101
108
  )
102
109
 
103
110
  # Evolution (mutation / crossover)
104
- mutation: Optional[MutationConfig] = Field(
105
- default=None,
111
+ mutation: MutationConfig = Field(
106
112
  description=(
107
113
  "Mutation configuration. By default, 'probability' is an element-wise rate "
108
114
  "(per gene) in [0,1]; operators may optionally treat it as an apply gate."
@@ -143,18 +149,16 @@ class VectorComponentConfig(BaseModel):
143
149
  @classmethod
144
150
  def set_dim_for_fixed_vector(cls, config: dict[str, Any]) -> dict[str, Any]:
145
151
  """
146
- If using 'fixed_vector', ensure 'values' is provided and infer 'dim' if absent.
152
+ If using 'fixed', ensure 'values' is provided and infer 'dim' if absent.
147
153
 
148
154
  This keeps YAML concise and catches common mistakes early.
149
155
  """
150
156
  initializer = config.get("initializer")
151
157
  values = config.get("values")
152
158
 
153
- if initializer == "fixed_vector":
159
+ if initializer == "fixed":
154
160
  if not values:
155
- raise ValueError(
156
- "When using 'fixed_vector', 'values' must be provided."
157
- )
161
+ raise ValueError("When using 'fixed', 'values' must be provided.")
158
162
  if "dim" not in config:
159
163
  config["dim"] = len(values)
160
164
  return config
@@ -181,3 +185,30 @@ class VectorComponentConfig(BaseModel):
181
185
  else:
182
186
  raise TypeError("dim must be an int or list of ints")
183
187
  return dim
188
+
189
+ @field_validator("initializer")
190
+ @classmethod
191
+ def validate_initializer(cls, name: str, info: ValidationInfo) -> str:
192
+ """Validate allowed initializer names and provide clear errors for deprecated
193
+ names."""
194
+ if not isinstance(name, str) or not name.strip():
195
+ raise ValueError("initializer must be a non-empty string")
196
+
197
+ name = name.strip()
198
+
199
+ allowed = {"normal", "uniform", "zero", "fixed", "adaptive"}
200
+ if name not in allowed:
201
+ raise ValueError(
202
+ f"Unknown initializer '{name}'. " f"Allowed: {sorted(allowed)}"
203
+ )
204
+
205
+ # structure-aware check (only if structure is available in the data)
206
+ data = info.data or {}
207
+ structure = data.get("structure") or "flat"
208
+ if structure == "net" and name != "normal":
209
+ raise ValueError(
210
+ "For structure='net', initializer must be 'normal' "
211
+ "(use initializer: normal and structure: net)."
212
+ )
213
+
214
+ return name
@@ -173,28 +173,7 @@ def _build_architecture(
173
173
  )
174
174
 
175
175
 
176
- def initializer_unconnected_evonet(config: FullConfig, module: str) -> EvoNet:
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 initializer_random_evonet(config: FullConfig, module: str) -> EvoNet:
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
- Build a standard EvoNet architecture and initialize all parameters to zero.
200
+ Initializes an EvoNet without connections.
235
201
 
236
- - All connection weights are set to 0.
237
- - All biases are set to 0.
238
- - Delay initialization follows `cfg.delay` if applicable.
202
+ Args:
203
+ config (FullConfig): Full experiment configuration
204
+ module (str): Module name (e.g. "brain")
239
205
 
240
- This initializer ignores `cfg.weights` and `cfg.bias` distributions.
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="zero")
248
- _apply_delay_init(para, cfg)
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