neuron

package
v0.0.0-...-77aaf0f Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2020 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Layer

type Layer []Neuron

Layer represents a layer of neurons

type NeuralNet

type NeuralNet interface {
	GetActions() []string
	GetChild(int) NeuralNet
	GetSensors() []string
	GetNeurons(int) []Neuron
	Compute(map[string]float64) (map[string]bool, error)
	Save(io.Writer) error
	String() string
}

NeuralNet represents a neural net

func LoadNet

func LoadNet(input io.Reader) (NeuralNet, error)

LoadNet load a new neural net from an I/O reader

func NewNeuralNet

func NewNeuralNet(sensors, actions []string, neurons []Layer) (NeuralNet, error)

NewNeuralNet instantiate a new neural net

type Neuron

type Neuron interface {
	Compute(...float64) int
	Equals(Neuron) bool
	GetSize() int
	GetGene(int) int
	Marshal() <-chan byte
	Child(int) Neuron
	String() string
}

Neuron represents a neuron

func NewNeuron

func NewNeuron(data interface{}) (Neuron, error)

NewNeuron create a new neuron

Jump to

Keyboard shortcuts

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