arci

package module
v0.0.0-...-a0f9047 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: AGPL-3.0 Imports: 1 Imported by: 0

README

arcI

circular intelligence

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Intelligence

type Intelligence struct {
	InputNodes    []*Node
	TrainingNodes []*Node
	Circles       [][]*Node
	OutputNodes   []*Node
}

func CreateIntelligence

func CreateIntelligence(numInput uint, numCircles uint, circleSize uint, numOutput uint, inpActivationFunc func(float64) float64, outActivationFunc func(float64) float64, defaultWeight float64, defaultThresh float64) Intelligence

func (Intelligence) Run

func (intel Intelligence) Run(input []float64) []float64

func (Intelligence) Train

func (intel Intelligence) Train(data []TrainingData, circularDefault float64, learningRate float64, granularity uint, rewardFunc func([]float64) float64)

type Node

type Node struct {
	Output        float64
	CalculatedOut bool
	ActivThresh   float64
	Weights       map[*Node]*float64
	SecondWeights map[*Node]*float64
	Children      []*Node
	InpActivFunc  func(float64) float64
	OutActivFunc  func(float64) float64
	GlobalFWeight float64
	GlobalSWeight float64
}

func (*Node) AddChild

func (n *Node) AddChild(node *Node, weight float64)

func (*Node) CalculateOutput

func (n *Node) CalculateOutput()

func (*Node) SetOutput

func (n *Node) SetOutput(out float64)

func (*Node) Train

func (n *Node) Train(learningRate float64, granularity uint, getReward func() float64)

type TrainingData

type TrainingData struct {
	Input []float64
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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