Versions in this module Expand all Collapse all v2 v2.9.3 Apr 21, 2022 v2.9.2 Jan 9, 2022 v2.9.1 Jan 9, 2022 v2.9.0 Jan 7, 2022 Changes in this version + var ErrMaximalNetDepthExceeded = errors.New("depth of the network exceeds maximum allowed, fallback to maximal") + var ErrNetExceededMaxActivationAttempts = errors.New("maximal network activation attempts exceeded") + var ErrNetUnsupportedSensorsArraySize = errors.New("the sensors array size is unsupported by network solver") + var ErrZeroActivationStepsRequested = errors.New("zero activation steps requested") + func PrintAllActivationDepthPaths(n *Network, w io.Writer) error + func PrintPath(w io.Writer, paths [][]graph.Node) (err error) type Link + ConnectionWeight float64 + func (l *Link) Attributes() []encoding.Attribute + func (l *Link) From() graph.Node + func (l *Link) IDString() string + func (l *Link) ReversedEdge() graph.Edge + func (l *Link) To() graph.Node type NNode + func (n *NNode) AddIncoming(in *NNode, weight float64) *Link + func (n *NNode) AddOutgoing(out *NNode, weight float64) *Link + func (n *NNode) Attributes() []encoding.Attribute + func (n *NNode) ConnectFrom(in *NNode, weight float64) *Link + func (n *NNode) ID() int64 + func (n *NNode) PrintDebug() string type Network + func (n *Network) BaseNodes() []*NNode + func (n *Network) ControlNodes() []*NNode + func (n *Network) Edge(uid, vid int64) graph.Edge + func (n *Network) From(id int64) graph.Nodes + func (n *Network) HasEdgeBetween(xid, yid int64) bool + func (n *Network) HasEdgeFromTo(uid, vid int64) bool + func (n *Network) IsControlNode(nid int) bool + func (n *Network) MaxActivationDepth() (int, error) + func (n *Network) MaxActivationDepthFast(maxDepth int) (int, error) + func (n *Network) Node(id int64) graph.Node + func (n *Network) Nodes() graph.Nodes + func (n *Network) To(id int64) graph.Nodes + func (n *Network) Weight(xid, yid int64) (w float64, ok bool) + func (n *Network) WeightedEdge(uid, vid int64) graph.WeightedEdge v2.8.2 May 9, 2021 v2.8.1 May 8, 2021 Changes in this version + var NetErrDepthCalculationFailedLoopDetected = errors.New("depth can not be determined for network with loop") + var NetErrExceededMaxActivationAttempts = errors.New("maximal network activation attempts exceeded") + var NetErrUnsupportedSensorsArraySize = errors.New("the sensors array size is unsupported by network solver") + func ActivateModule(module *NNode, a *neatmath.NodeActivatorsFactory) error + func ActivateNode(node *NNode, a *neatmath.NodeActivatorsFactory) error + func NeuronTypeName(nlayer NodeNeuronType) string + func NodeTypeName(nType NodeType) string + type FastControlNode struct + ActivationType neatmath.NodeActivationType + InputIndexes []int + OutputIndexes []int + type FastModularNetworkSolver struct + Id int + Name string + func NewFastModularNetworkSolver(biasNeuronCount, inputNeuronCount, outputNeuronCount, totalNeuronCount int, ...) *FastModularNetworkSolver + func (s *FastModularNetworkSolver) Flush() (bool, error) + func (s *FastModularNetworkSolver) ForwardSteps(steps int) (res bool, err error) + func (s *FastModularNetworkSolver) LinkCount() int + func (s *FastModularNetworkSolver) LoadSensors(inputs []float64) error + func (s *FastModularNetworkSolver) NodeCount() int + func (s *FastModularNetworkSolver) ReadOutputs() []float64 + func (s *FastModularNetworkSolver) RecursiveSteps() (res bool, err error) + func (s *FastModularNetworkSolver) Relax(maxSteps int, maxAllowedSignalDelta float64) (relaxed bool, err error) + func (s *FastModularNetworkSolver) String() string + type FastNetworkLink struct + Signal float64 + SourceIndex int + TargetIndex int + Weight float64 + type Link struct + AddedWeight float64 + InNode *NNode + IsRecurrent bool + IsTimeDelayed bool + OutNode *NNode + Params []float64 + Trait *neat.Trait + Weight float64 + func NewLink(weight float64, inputNode, outNode *NNode, recurrent bool) *Link + func NewLinkCopy(l *Link, inputNode, outNode *NNode) *Link + func NewLinkWithTrait(trait *neat.Trait, weight float64, inputNode, outNode *NNode, recurrent bool) *Link + func (l *Link) IsEqualGenetically(ol *Link) bool + func (l *Link) String() string + type NNode struct + Activation float64 + ActivationSum float64 + ActivationType math.NodeActivationType + ActivationsCount int32 + Id int + Incoming []*Link + NeuronType NodeNeuronType + Outgoing []*Link + Params []float64 + PhenotypeAnalogue *NNode + Trait *neat.Trait + func NewNNode(nodeId int, neuronType NodeNeuronType) *NNode + func NewNNodeCopy(n *NNode, t *neat.Trait) *NNode + func NewNetworkNode() *NNode + func (n *NNode) Depth(d int) (int, error) + func (n *NNode) Flushback() + func (n *NNode) FlushbackCheck() error + func (n *NNode) GetActiveOut() float64 + func (n *NNode) GetActiveOutTd() float64 + func (n *NNode) IsNeuron() bool + func (n *NNode) IsSensor() bool + func (n *NNode) NodeType() NodeType + func (n *NNode) Print() string + func (n *NNode) SensorLoad(load float64) bool + func (n *NNode) String() string + type Network struct + Id int + Name string + Outputs []*NNode + func NewModularNetwork(in, out, all, control []*NNode, netId int) *Network + func NewNetwork(in, out, all []*NNode, netId int) *Network + func (n *Network) Activate() (bool, error) + func (n *Network) ActivateSteps(maxSteps int) (bool, error) + func (n *Network) AllNodes() []*NNode + func (n *Network) Complexity() int + func (n *Network) FastNetworkSolver() (Solver, error) + func (n *Network) Flush() (res bool, err error) + func (n *Network) ForwardSteps(steps int) (res bool, err error) + func (n *Network) IsRecurrent(inNode, outNode *NNode, count *int, thresh int) bool + func (n *Network) LinkCount() int + func (n *Network) LoadSensors(sensors []float64) error + func (n *Network) MaxDepth() (int, error) + func (n *Network) NodeCount() int + func (n *Network) OutputIsOff() bool + func (n *Network) PrintActivation() string + func (n *Network) PrintInput() string + func (n *Network) ReadOutputs() []float64 + func (n *Network) RecursiveSteps() (bool, error) + func (n *Network) Relax(_ int, _ float64) (bool, error) + type NodeIdGenerator interface + NextNodeId func() int + type NodeNeuronType byte + const BiasNeuron + const HiddenNeuron + const InputNeuron + const OutputNeuron + func NeuronTypeByName(name string) (NodeNeuronType, error) + type NodeType byte + const NeuronNode + const SensorNode + type Solver interface + Flush func() (bool, error) + ForwardSteps func(steps int) (bool, error) + LinkCount func() int + LoadSensors func(inputs []float64) error + NodeCount func() int + ReadOutputs func() []float64 + RecursiveSteps func() (bool, error) + Relax func(maxSteps int, maxAllowedSignalDelta float64) (bool, error) Other modules containing this package github.com/yaricom/goNEAT/v3 github.com/yaricom/goNEAT/v4