neet-0.1.0.0: A NEAT library for Haskell

Copyright(c) Leon Medvinsky, 2015
LicenseGPL-3
Maintainerlmedvinsky@hotmail.com
Stabilityexperimental
Portabilityghc
Safe HaskellNone
LanguageHaskell2010

Neet.Network

Contents

Description

 

Synopsis

Sigmoid

modSig :: Double -> Double Source

Modified sigmoid function from the original NEAT paper

Network

data Network Source

Sparse recurrent network, like those made by NEAT

Constructors

Network 

Fields

netInputs :: [NodeId]

Which nodes are inputs

netOutputs :: [NodeId]

Which nodes are outputs

netState :: Map NodeId Neuron
 
netDepth :: Int

Upper bound on depth

Instances

Neuron

data Neuron Source

A single neuron

Constructors

Neuron 

Fields

activation :: Double

The current activation

connections :: Map NodeId Double

The inputs to this Neuron

yHint :: Rational

Visualization height

Instances

Construction

Updates

stepNeuron :: Map NodeId Double -> Neuron -> Neuron Source

Takes the previous step's activations and current inputs and gives a function to update a neuron.

stepNetwork :: Network -> [Double] -> Network Source

Steps a network one step. Takes the network and the current input, minus the bias.

snapshot :: Network -> [Double] -> Network Source

Steps a network for at least its depth

Output

getOutput :: Network -> [Double] Source

Gets the output of the current state