evonet 0.1.0.dev6__tar.gz → 0.1.0.dev7__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.dev6 → evonet-0.1.0.dev7}/PKG-INFO +1 -1
  2. {evonet-0.1.0.dev6 → evonet-0.1.0.dev7}/evonet/mutation.py +8 -3
  3. {evonet-0.1.0.dev6 → evonet-0.1.0.dev7}/evonet.egg-info/PKG-INFO +1 -1
  4. {evonet-0.1.0.dev6 → evonet-0.1.0.dev7}/pyproject.toml +1 -1
  5. {evonet-0.1.0.dev6 → evonet-0.1.0.dev7}/LICENSE +0 -0
  6. {evonet-0.1.0.dev6 → evonet-0.1.0.dev7}/README.md +0 -0
  7. {evonet-0.1.0.dev6 → evonet-0.1.0.dev7}/evonet/__init__.py +0 -0
  8. {evonet-0.1.0.dev6 → evonet-0.1.0.dev7}/evonet/activation.py +0 -0
  9. {evonet-0.1.0.dev6 → evonet-0.1.0.dev7}/evonet/connection.py +0 -0
  10. {evonet-0.1.0.dev6 → evonet-0.1.0.dev7}/evonet/core.py +0 -0
  11. {evonet-0.1.0.dev6 → evonet-0.1.0.dev7}/evonet/enums.py +0 -0
  12. {evonet-0.1.0.dev6 → evonet-0.1.0.dev7}/evonet/io.py +0 -0
  13. {evonet-0.1.0.dev6 → evonet-0.1.0.dev7}/evonet/layer.py +0 -0
  14. {evonet-0.1.0.dev6 → evonet-0.1.0.dev7}/evonet/neuron.py +0 -0
  15. {evonet-0.1.0.dev6 → evonet-0.1.0.dev7}/evonet/utils.py +0 -0
  16. {evonet-0.1.0.dev6 → evonet-0.1.0.dev7}/evonet/visualize.py +0 -0
  17. {evonet-0.1.0.dev6 → evonet-0.1.0.dev7}/evonet.egg-info/SOURCES.txt +0 -0
  18. {evonet-0.1.0.dev6 → evonet-0.1.0.dev7}/evonet.egg-info/dependency_links.txt +0 -0
  19. {evonet-0.1.0.dev6 → evonet-0.1.0.dev7}/evonet.egg-info/requires.txt +0 -0
  20. {evonet-0.1.0.dev6 → evonet-0.1.0.dev7}/evonet.egg-info/top_level.txt +0 -0
  21. {evonet-0.1.0.dev6 → evonet-0.1.0.dev7}/setup.cfg +0 -0
  22. {evonet-0.1.0.dev6 → evonet-0.1.0.dev7}/tests/test_activation.py +0 -0
  23. {evonet-0.1.0.dev6 → evonet-0.1.0.dev7}/tests/test_core.py +0 -0
  24. {evonet-0.1.0.dev6 → evonet-0.1.0.dev7}/tests/test_nnet_io_and_forward.py +0 -0
  25. {evonet-0.1.0.dev6 → evonet-0.1.0.dev7}/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.dev6
3
+ Version: 0.1.0.dev7
4
4
  Summary: Evolvable neural network core for integration with EvoLib
5
5
  Author-email: EvoLib <evolib@dismail.de>
6
6
  License: MIT License
@@ -242,11 +242,16 @@ def remove_random_connection(net: Nnet) -> None:
242
242
  conn.target.incoming.remove(conn)
243
243
 
244
244
 
245
- def add_random_neuron(net: Nnet) -> None:
245
+ def add_random_neuron(net: Nnet, activations: list[str] | None = None) -> None:
246
246
  """
247
247
  Insert a new hidden neuron into a random layer.
248
248
 
249
249
  If the network has only input/output, a hidden layer is inserted.
250
+
251
+ Args:
252
+ net (Nnet): The target network.
253
+ activations (list[str] | None): Optional list of allowed activation functions.
254
+ If None, all registered activations are used.
250
255
  """
251
256
  if len(net.layers) < 2:
252
257
  return
@@ -254,7 +259,7 @@ def add_random_neuron(net: Nnet) -> None:
254
259
  if len(net.layers) == 2:
255
260
  net.insert_layer(1)
256
261
 
257
- # Ziel-Layer wählen (nicht Input, nicht Output)
262
+ # Choose target layer (not input, not output)
258
263
  candidate_layers = net.layers[1:-1]
259
264
  if not candidate_layers:
260
265
  return
@@ -263,7 +268,7 @@ def add_random_neuron(net: Nnet) -> None:
263
268
 
264
269
  net.add_neuron(
265
270
  layer_idx=net.layers.index(layer),
266
- activation="tanh",
271
+ activation=random_function_name(activations),
267
272
  role=NeuronRole.HIDDEN,
268
273
  connect_layer=True,
269
274
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: evonet
3
- Version: 0.1.0.dev6
3
+ Version: 0.1.0.dev7
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.dev6"
7
+ version = "0.1.0.dev7"
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