last changes

This commit is contained in:
2026-02-21 10:58:05 +01:00
parent 841bc7c805
commit 0902732f60
136 changed files with 10387 additions and 2015 deletions

View File

@@ -12,6 +12,24 @@ def tanh(x): return math.tanh(x)
class Neuron(Actor):
"""
Neuron actor implementing a weighted-sum neuron with an activation function
and optional recurrent inputs.
The Neuron receives input vectors from upstream neurons, accumulates them
according to its weight configuration, applies an activation function,
and forwards the resulting output to downstream actors.
It supports:
- feed-forward and recurrent connections
- bias handling
- asynchronous message-based execution
- weight backup, restoration, and stochastic perturbation (mutation)
- cycle-based updates for recurrent networks
This actor is designed to be used inside a cortex/agent actor network,
where synchronization and evolution are coordinated externally.
"""
def __init__(self, nid, cx_pid, af_name, input_idps, output_pids, bias: Optional[float] = None):
super().__init__(f"Neuron-{nid}")
self.nid = nid