synapse

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HebbianEngine

type HebbianEngine struct {
	// contains filtered or unexported fields
}

HebbianEngine implements Hebbian learning for synapse formation "Neurons that fire together, wire together"

func NewHebbianEngine

func NewHebbianEngine(matrix *core.Matrix) *HebbianEngine

NewHebbianEngine creates a new Hebbian learning engine

func (*HebbianEngine) DecayAll

func (h *HebbianEngine) DecayAll()

DecayAll applies decay to all synapses

func (*HebbianEngine) GetConnectedNeurons

func (h *HebbianEngine) GetConnectedNeurons(neuronID core.NeuronID, minWeight float64) []core.NeuronID

GetConnectedNeurons returns all neurons connected to a given neuron

func (*HebbianEngine) GetSynapseWeight

func (h *HebbianEngine) GetSynapseWeight(from, to core.NeuronID) float64

GetSynapseWeight returns the weight between two neurons

func (*HebbianEngine) OnNeuronFired

func (h *HebbianEngine) OnNeuronFired(neuronID core.NeuronID)

OnNeuronFired is called whenever a neuron fires It checks for co-activation with recently fired neurons

func (*HebbianEngine) PruneDeadSynapses

func (h *HebbianEngine) PruneDeadSynapses() int

PruneDeadSynapses removes synapses that have decayed below threshold

func (*HebbianEngine) SelfTune

func (h *HebbianEngine) SelfTune()

SelfTune adjusts learning parameters based on matrix state

func (*HebbianEngine) Stats

func (h *HebbianEngine) Stats() map[string]any

Stats returns Hebbian engine statistics

func (*HebbianEngine) UpdateFractalClusters

func (h *HebbianEngine) UpdateFractalClusters()

UpdateFractalClusters runs a full pass of fractal spatial clustering over all synapses whose weight exceeds 0.3. Called by the reorg daemon — safe to call concurrently with read/write operations because each sub-call acquires only neuron-level locks (no matrix lock held during writes).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL