evonet 0.1.0.dev3__tar.gz → 0.1.0.dev4__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 (25) hide show
  1. {evonet-0.1.0.dev3 → evonet-0.1.0.dev4}/PKG-INFO +1 -1
  2. {evonet-0.1.0.dev3 → evonet-0.1.0.dev4}/evonet/mutation.py +4 -3
  3. {evonet-0.1.0.dev3 → evonet-0.1.0.dev4}/evonet.egg-info/PKG-INFO +1 -1
  4. {evonet-0.1.0.dev3 → evonet-0.1.0.dev4}/pyproject.toml +1 -1
  5. {evonet-0.1.0.dev3 → evonet-0.1.0.dev4}/LICENSE +0 -0
  6. {evonet-0.1.0.dev3 → evonet-0.1.0.dev4}/README.md +0 -0
  7. {evonet-0.1.0.dev3 → evonet-0.1.0.dev4}/evonet/__init__.py +0 -0
  8. {evonet-0.1.0.dev3 → evonet-0.1.0.dev4}/evonet/activation.py +0 -0
  9. {evonet-0.1.0.dev3 → evonet-0.1.0.dev4}/evonet/connection.py +0 -0
  10. {evonet-0.1.0.dev3 → evonet-0.1.0.dev4}/evonet/core.py +0 -0
  11. {evonet-0.1.0.dev3 → evonet-0.1.0.dev4}/evonet/enums.py +0 -0
  12. {evonet-0.1.0.dev3 → evonet-0.1.0.dev4}/evonet/io.py +0 -0
  13. {evonet-0.1.0.dev3 → evonet-0.1.0.dev4}/evonet/layer.py +0 -0
  14. {evonet-0.1.0.dev3 → evonet-0.1.0.dev4}/evonet/neuron.py +0 -0
  15. {evonet-0.1.0.dev3 → evonet-0.1.0.dev4}/evonet/utils.py +0 -0
  16. {evonet-0.1.0.dev3 → evonet-0.1.0.dev4}/evonet/visualize.py +0 -0
  17. {evonet-0.1.0.dev3 → evonet-0.1.0.dev4}/evonet.egg-info/SOURCES.txt +0 -0
  18. {evonet-0.1.0.dev3 → evonet-0.1.0.dev4}/evonet.egg-info/dependency_links.txt +0 -0
  19. {evonet-0.1.0.dev3 → evonet-0.1.0.dev4}/evonet.egg-info/requires.txt +0 -0
  20. {evonet-0.1.0.dev3 → evonet-0.1.0.dev4}/evonet.egg-info/top_level.txt +0 -0
  21. {evonet-0.1.0.dev3 → evonet-0.1.0.dev4}/setup.cfg +0 -0
  22. {evonet-0.1.0.dev3 → evonet-0.1.0.dev4}/tests/test_activation.py +0 -0
  23. {evonet-0.1.0.dev3 → evonet-0.1.0.dev4}/tests/test_core.py +0 -0
  24. {evonet-0.1.0.dev3 → evonet-0.1.0.dev4}/tests/test_nnet_io_and_forward.py +0 -0
  25. {evonet-0.1.0.dev3 → evonet-0.1.0.dev4}/tests/test_recurrent_dynamics.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: evonet
3
- Version: 0.1.0.dev3
3
+ Version: 0.1.0.dev4
4
4
  Summary: Evolvable neural network core for integration with EvoLib
5
5
  Author-email: EvoLib <evolib@dismail.de>
6
6
  License: MIT License
@@ -91,7 +91,7 @@ def mutate_biases(net: Nnet, probability: float = 1.0, std: float = 0.1) -> None
91
91
  def add_random_connection(
92
92
  net: Nnet,
93
93
  allowed_recurrent: Optional[Collection[RecurrentKind | str]] = None,
94
- ) -> None:
94
+ ) -> bool:
95
95
  """
96
96
  Add a valid connection between two randomly chosen neurons.
97
97
 
@@ -114,7 +114,7 @@ def add_random_connection(
114
114
 
115
115
  all_neurons = net.get_all_neurons()
116
116
  if len(all_neurons) < 2:
117
- return
117
+ return False
118
118
 
119
119
  # Build a dict of existing connections
120
120
  existing: set[tuple[Neuron, Neuron]] = {
@@ -152,7 +152,7 @@ def add_random_connection(
152
152
  candidates.append((src, dst)) # recurrent allowed by policy
153
153
 
154
154
  if not candidates:
155
- return
155
+ return False
156
156
 
157
157
  src, dst = random.choice(candidates)
158
158
  src_layer_idx, dst_layer_idx = layer_of[src], layer_of[dst]
@@ -163,6 +163,7 @@ def add_random_connection(
163
163
  )
164
164
 
165
165
  net.add_connection(src, dst, conn_type=conn_type)
166
+ return True
166
167
 
167
168
 
168
169
  def remove_random_connection(net: Nnet) -> None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: evonet
3
- Version: 0.1.0.dev3
3
+ Version: 0.1.0.dev4
4
4
  Summary: Evolvable neural network core for integration with EvoLib
5
5
  Author-email: EvoLib <evolib@dismail.de>
6
6
  License: MIT License
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "evonet"
7
- version = "0.1.0.dev3"
7
+ version = "0.1.0.dev4"
8
8
  description = "Evolvable neural network core for integration with EvoLib"
9
9
  authors = [
10
10
  { name = "EvoLib", email = "evolib@dismail.de" }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes