evolib 0.2.0b4.dev6__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.
Files changed (156) hide show
  1. {evolib-0.2.0b4.dev6/evolib.egg-info → evolib-0.2.0b4.dev8}/PKG-INFO +1 -2
  2. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/README.md +0 -1
  3. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/docs/config_guide.md +7 -4
  4. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/docs/config_parameter.md +144 -37
  5. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/config/evonet_component_config.py +128 -16
  6. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/config/vector_component_config.py +1 -1
  7. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/initializers/evonet_initializers.py +95 -91
  8. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/initializers/registry.py +2 -6
  9. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/representation/evonet.py +26 -14
  10. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8/evolib.egg-info}/PKG-INFO +1 -2
  11. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/pyproject.toml +1 -1
  12. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/tests/test_evonet_neuron_dynamics.py +16 -4
  13. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/tests/test_initializer_evonet.py +12 -3
  14. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/LICENSE +0 -0
  15. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/MANIFEST.in +0 -0
  16. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/docs/api_core_individual.rst +0 -0
  17. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/docs/api_core_population.rst +0 -0
  18. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/docs/api_operators_crossover.rst +0 -0
  19. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/docs/api_operators_evonet_structural_mutation.rst +0 -0
  20. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/docs/api_operators_mutation.rst +0 -0
  21. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/docs/api_operators_replacement.rst +0 -0
  22. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/docs/api_operators_reproduction.rst +0 -0
  23. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/docs/api_operators_selection.rst +0 -0
  24. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/docs/api_operators_strategy.rst +0 -0
  25. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/docs/api_public_api.rst +0 -0
  26. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/docs/api_representation_evonet.rst +0 -0
  27. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/docs/api_representation_netvector.rst +0 -0
  28. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/docs/api_representation_vector.rst +0 -0
  29. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/docs/api_utils_benchmarks.rst +0 -0
  30. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/docs/api_utils_history_logger.rst +0 -0
  31. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/docs/api_utils_loss_functions.rst +0 -0
  32. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/docs/api_utils_plotting.rst +0 -0
  33. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/docs/conf.py +0 -0
  34. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/docs/getting_started.md +0 -0
  35. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/docs/index.md +0 -0
  36. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/__init__.py +0 -0
  37. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/api.py +0 -0
  38. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/config/__init__.py +0 -0
  39. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/config/base_component_config.py +0 -0
  40. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/config/component_registry.py +0 -0
  41. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/config/schema.py +0 -0
  42. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/core/README.md +0 -0
  43. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/core/__init__.py +0 -0
  44. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/core/individual.py +0 -0
  45. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/core/population.py +0 -0
  46. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/envs/gym_wrapper.py +0 -0
  47. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/globals/README.md +0 -0
  48. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/globals/__init__.py +0 -0
  49. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/globals/numeric.py +0 -0
  50. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/initializers/__init__.py +0 -0
  51. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/initializers/net_initializers.py +0 -0
  52. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/initializers/vector_initializers.py +0 -0
  53. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/interfaces/__init__.py +0 -0
  54. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/interfaces/enum_helpers.py +0 -0
  55. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/interfaces/enums.py +0 -0
  56. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/interfaces/structs.py +0 -0
  57. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/interfaces/types.py +0 -0
  58. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/io/checkpoint.py +0 -0
  59. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/io/serialization.py +0 -0
  60. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/operators/README.md +0 -0
  61. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/operators/__init__.py +0 -0
  62. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/operators/crossover.py +0 -0
  63. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/operators/evonet_structural_mutation.py +0 -0
  64. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/operators/heli.py +0 -0
  65. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/operators/mutation.py +0 -0
  66. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/operators/replacement.py +0 -0
  67. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/operators/reproduction.py +0 -0
  68. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/operators/selection.py +0 -0
  69. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/operators/strategy.py +0 -0
  70. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/registry/__init__.py +0 -0
  71. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/registry/replacement_registry.py +0 -0
  72. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/registry/selection_registry.py +0 -0
  73. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/registry/strategy_registry.py +0 -0
  74. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/representation/__init__.py +0 -0
  75. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/representation/_apply_config_mapping.py +0 -0
  76. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/representation/base.py +0 -0
  77. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/representation/composite.py +0 -0
  78. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/representation/dummy.py +0 -0
  79. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/representation/evo_params.py +0 -0
  80. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/representation/netvector.py +0 -0
  81. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/representation/vector.py +0 -0
  82. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/utils/README.md +0 -0
  83. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/utils/__init__.py +0 -0
  84. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/utils/benchmarks.py +0 -0
  85. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/utils/config_loader.py +0 -0
  86. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/utils/fitness.py +0 -0
  87. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/utils/heli_experiment_logger.py +0 -0
  88. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/utils/heli_utils.py +0 -0
  89. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/utils/history_logger.py +0 -0
  90. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/utils/lineage_logger.py +0 -0
  91. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/utils/loss_functions.py +0 -0
  92. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/utils/parallel.py +0 -0
  93. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/utils/plotting.py +0 -0
  94. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/utils/random.py +0 -0
  95. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib/utils/registry.py +0 -0
  96. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib.egg-info/SOURCES.txt +0 -0
  97. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib.egg-info/dependency_links.txt +0 -0
  98. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib.egg-info/requires.txt +0 -0
  99. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/evolib.egg-info/top_level.txt +0 -0
  100. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/01_basic_usage/01_getting_started.py +0 -0
  101. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/01_basic_usage/02_mutation.py +0 -0
  102. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/01_basic_usage/03_population_mutation.py +0 -0
  103. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/01_basic_usage/04_fitness.py +0 -0
  104. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/02_strategies/01_step_by_step_evolution.py +0 -0
  105. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/02_strategies/02_mu_lambda_step.py +0 -0
  106. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/02_strategies/03_mu_lambda.py +0 -0
  107. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/02_strategies/04_flexible.py +0 -0
  108. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/03_comparisons/01_history.py +0 -0
  109. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/03_comparisons/02_plotting.py +0 -0
  110. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/03_comparisons/03_compare_runs.py +0 -0
  111. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/03_comparisons/04_exponential_decay_vs_static.py +0 -0
  112. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/03_comparisons/05_adaptive_global_vs_static.py +0 -0
  113. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/03_comparisons/06_adaptive_individual_vs_static.py +0 -0
  114. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/03_comparisons/07_selection_comparison.py +0 -0
  115. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/03_comparisons/08_selection_pressure.py +0 -0
  116. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/03_comparisons/09_selection_vs_mutation_pressure.py +0 -0
  117. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/03_comparisons/10_selection_stochastic_vs_deterministic.py +0 -0
  118. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/03_comparisons/11_crossover_comparison.py +0 -0
  119. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/04_function_approximation/01_polynomial_sine.py +0 -0
  120. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/04_function_approximation/02_sine_point_approximation.py +0 -0
  121. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/04_function_approximation/03_approximation_with_noise.py +0 -0
  122. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/05_advanced_topics/01_fitness_landscape_exploration.py +0 -0
  123. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/05_advanced_topics/02_rosenbrock_surface_path.py +0 -0
  124. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/05_advanced_topics/03_vector_control.py +0 -0
  125. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/05_advanced_topics/04_vector_control_with_obstacles.py +0 -0
  126. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/05_advanced_topics/05_piecewise_linear_xsys.py +0 -0
  127. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/05_advanced_topics/06_evolving_mutation_strength_as_a_module.py +0 -0
  128. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/06_netvector/01_netvector_sine_approximation.py +0 -0
  129. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/06_netvector/02_netvector_modulated_output.py +0 -0
  130. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/06_netvector/03_netvector_gain_and_bias.py +0 -0
  131. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/07_evonet/01_sine_approximation.py +0 -0
  132. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/07_evonet/02_sine_delay.py +0 -0
  133. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/07_evonet/03_delay_bitseq_echo.py +0 -0
  134. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/07_evonet/04_leaky_temporal_smoothing.py +0 -0
  135. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/07_evonet/05_image_approximation.py +0 -0
  136. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/07_evonet/06_structural_xor.py +0 -0
  137. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/07_evonet/07_recurrent_bit_prediction.py +0 -0
  138. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/07_evonet/08_recurrent_timeseries.py +0 -0
  139. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/07_evonet/09_recurrent_trading.py +0 -0
  140. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/08_gym/01_frozen_lake.py +0 -0
  141. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/08_gym/02_cliff_walking.py +0 -0
  142. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/08_gym/03_cartpole.py +0 -0
  143. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/08_gym/04_lunar_lander.py +0 -0
  144. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/08_gym/05_bipedal_walker.py +0 -0
  145. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/09_meta_learning/01_lamarck_linear_mapping.py +0 -0
  146. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/examples/09_meta_learning/02_meta_mapping_baldwin.py +0 -0
  147. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/setup.cfg +0 -0
  148. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/tests/test_benchmarks.py +0 -0
  149. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/tests/test_config_loader.py +0 -0
  150. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/tests/test_elitism_preserves_best_fitness.py +0 -0
  151. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/tests/test_evonet_deepcopy.py +0 -0
  152. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/tests/test_evonet_vector_io.py +0 -0
  153. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/tests/test_initializer_net.py +0 -0
  154. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/tests/test_mutation.py +0 -0
  155. {evolib-0.2.0b4.dev6 → evolib-0.2.0b4.dev8}/tests/test_population.py +0 -0
  156. {evolib-0.2.0b4.dev6 → 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.dev6
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
@@ -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
@@ -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. `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 | 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: random_vector
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_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] | [-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_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] # 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
@@ -31,25 +31,112 @@ from evolib.config.base_component_config import (
31
31
  StructuralMutationConfig,
32
32
  )
33
33
 
34
+ Bounds = Tuple[float, float]
35
+
34
36
 
35
37
  class WeightsConfig(BaseModel):
36
- """Configuration for connection weight initialization and bounds."""
38
+ # None means: no parameter-level initialization requested (preset may initialize).
39
+ initializer: Optional[str] = None # normal | uniform | zero | None
40
+ std: Optional[float] = None
41
+ bounds: Bounds = (-1.0, 1.0) # mutation/search bounds
42
+ init_bounds: Optional[Bounds] = None # init-time clipping bounds
37
43
 
38
- initializer: Literal["normal", "uniform", "zero"] = "normal"
39
- bounds: tuple[float, float] = Field(default=(-1.0, 1.0))
40
- std: Optional[float] = (
41
- None # required if initializer == "normal" (optional for now)
42
- )
44
+ @model_validator(mode="after")
45
+ def _validate(self) -> "WeightsConfig":
46
+ # Validate bounds
47
+ lo, hi = self.bounds
48
+ if lo >= hi:
49
+ raise ValueError("weights.bounds must satisfy lower < upper")
50
+
51
+ if self.init_bounds is not None:
52
+ ilo, ihi = self.init_bounds
53
+ if ilo >= ihi:
54
+ raise ValueError("weights.init_bounds must satisfy lower < upper")
55
+ if not (lo <= ilo and ihi <= hi):
56
+ raise ValueError("weights.init_bounds must lie within weights.bounds")
57
+
58
+ # Validate initializer-specific fields
59
+ if self.initializer is None:
60
+ # Preset-based initialization
61
+ if self.std is not None:
62
+ raise ValueError(
63
+ "weights.std is not allowed when " "weights.initializer is not set"
64
+ )
65
+ return self
66
+
67
+ if self.initializer == "normal":
68
+ if self.std is None or self.std <= 0:
69
+ raise ValueError(
70
+ "weights.std must be set and > 0 for initializer=normal"
71
+ )
72
+
73
+ elif self.initializer in ("uniform", "zero"):
74
+ if self.std is not None:
75
+ raise ValueError("weights.std is only allowed for initializer=normal")
76
+
77
+ else:
78
+ raise ValueError(f"Unknown weights initializer: {self.initializer}")
79
+
80
+ return self
43
81
 
44
82
 
45
83
  class BiasConfig(BaseModel):
46
- """Configuration for Neuron-Bias nitialization and bounds."""
84
+ # None means: no parameter-level initialization requested (preset may initialize).
85
+ initializer: Optional[str] = None # fixed | normal | uniform | zero | None
86
+ std: Optional[float] = None
87
+ value: Optional[float] = None
88
+ bounds: Bounds = (-0.5, 0.5) # mutation/search bounds
89
+ init_bounds: Optional[Bounds] = None # init-time clipping bounds (optional)
47
90
 
48
- initializer: Literal["fixed", "normal", "uniform", "zero"] = "normal"
49
- bounds: tuple[float, float] = Field(default=(-1.0, 1.0))
50
- std: Optional[float] = (
51
- None # required if initializer == "normal" (optional for now)
52
- )
91
+ @model_validator(mode="after")
92
+ def _validate(self) -> "BiasConfig":
93
+ # Validate bounds
94
+ lo, hi = self.bounds
95
+ if lo >= hi:
96
+ raise ValueError("bias.bounds must satisfy lower < upper")
97
+
98
+ if self.init_bounds is not None:
99
+ ilo, ihi = self.init_bounds
100
+ if ilo >= ihi:
101
+ raise ValueError("bias.init_bounds must satisfy lower < upper")
102
+ if not (lo <= ilo and ihi <= hi):
103
+ raise ValueError("bias.init_bounds must lie within bias.bounds")
104
+
105
+ # Validate initializer-specific fields
106
+ if self.initializer is None:
107
+ # Preset-based initialization
108
+ if self.std is not None:
109
+ raise ValueError(
110
+ "bias.std is not allowed when bias.initializer is not set"
111
+ )
112
+ if self.value is not None:
113
+ raise ValueError(
114
+ "bias.value is not allowed when bias.initializer is not set"
115
+ )
116
+ return self
117
+
118
+ if self.initializer == "fixed":
119
+ if self.value is None:
120
+ raise ValueError("bias.value is required for initializer=fixed")
121
+ if self.std is not None:
122
+ raise ValueError("bias.std is not allowed for initializer=fixed")
123
+
124
+ elif self.initializer == "normal":
125
+ if self.std is None or self.std <= 0:
126
+ raise ValueError("bias.std must be set and > 0 for initializer=normal")
127
+ if self.value is not None:
128
+ raise ValueError("bias.value is only allowed for initializer=fixed")
129
+
130
+ elif self.initializer in ("uniform", "zero"):
131
+ if self.std is not None:
132
+ raise ValueError("bias.std is only allowed for initializer=normal")
133
+ if self.value is not None:
134
+ raise ValueError("bias.value is only allowed for initializer=fixed")
135
+
136
+ else:
137
+ raise ValueError(f"Unknown bias initializer: {self.initializer}")
138
+
139
+ return self
53
140
 
54
141
 
55
142
  class DelayConfig(BaseModel):
@@ -102,15 +189,15 @@ class EvoNetComponentConfig(BaseModel):
102
189
  type: evonet
103
190
  dim: [4, 6, 2] # input, hidden, output
104
191
  activation: [linear, relu, sigmoid] # single activation or list per layer
105
- initializer: normal_evonet # weight/bias initializer
106
192
 
107
193
  weights:
108
194
  initializer: normal
195
+ std: 0.5
109
196
  bounds: [-1.0, 1.0]
110
197
 
111
198
  bias:
112
- initializer: uniform
113
- bounds: [-0.5, 0.5]
199
+ initializer: uniform
200
+ bounds: [-0.5, 0.5]
114
201
 
115
202
  mutation:
116
203
  strategy: constant
@@ -140,7 +227,9 @@ class EvoNetComponentConfig(BaseModel):
140
227
  recurrent: Optional[Literal["none", "direct", "local", "all"]] = "none"
141
228
 
142
229
  # Name of the initializer function (resolved via initializer registry)
143
- initializer: str = Field(..., description="Name of the initializer to use")
230
+ initializer: str = Field(
231
+ default="default_evonet", description="Name of the initializer to use"
232
+ )
144
233
 
145
234
  # Connection topology for initialization
146
235
  connection_scope: Literal["adjacent", "crosslayer"] = Field(
@@ -178,6 +267,29 @@ class EvoNetComponentConfig(BaseModel):
178
267
  structural: Optional[StructuralMutationConfig] = None
179
268
 
180
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
181
293
 
182
294
  @field_validator("neuron_dynamics")
183
295
  @classmethod
@@ -101,7 +101,7 @@ class VectorComponentConfig(BaseModel):
101
101
  )
102
102
 
103
103
  # Evolution (mutation / crossover)
104
- mutation: Optional[MutationConfig] = Field(
104
+ mutation: MutationConfig = Field(
105
105
  default=None,
106
106
  description=(
107
107
  "Mutation configuration. By default, 'probability' is an element-wise rate "