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.Population

Contents

Description

 

Synopsis

Documentation

data Population Source

A NEAT Population

Constructors

Population 

Fields

popSize :: Int

Size of the population

popSpecs :: !(Map SpecId Species)

The species

popBScore :: !Double

Best score so far

popBOrg :: !Genome

Best genome so far

popBSpec :: !SpecId

Id of the species that hosted the best score

popCont :: !PopContext

Tracking state and fresh values

nextSpec :: !SpecId

The next species ID

popParams :: Parameters

Parameters for large species

popParamsS :: Parameters

Parameters for small species

Instances

PopM

Construction

data PopSettings Source

Settings for creating a new population

Constructors

PS 

Fields

psSize :: Int

How big the population should be

psInputs :: Int

Number of inputs

psOutputs :: Int

Number of outputs

psParams :: Parameters

Parameters for large species

psParamsS :: Parameters

Parameters for small species

Instances

newPop :: Int -> PopSettings -> Population Source

Generates a fully connected starter population, given a seed.

Training

trainOnce :: (Genome -> Double) -> Population -> Population Source

Advances the population one generation with the fitness function.

trainN :: Int -> (Genome -> Double) -> Population -> Population Source

Train the population n times. Values less than 1 return the original.