neet-0.4.0.0: A NEAT library for Haskell

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

Neet.Species

Contents

Description

 

Synopsis

Documentation

data Species Source

A NEAT Species.

Constructors

Species 

Fields

specSize :: Int
 
specOrgs :: [Genome]

All the organisms in this species

specScore :: SpecScore
 
lastImprovement :: Int

Number of gens ago the best score improved

Instances

data SpecScore Source

Scoring data

Constructors

SpecScore 

Fields

bestScore :: !Double
 
bestGen :: !Genome
 

Construction

newSpec :: Genome -> [Genome] -> Species Source

Creates a new Species with starter stats from a Genome and the rest

Update/Fitness

data TestResult Source

A result of evaluating a species

Constructors

TR 

Fields

trScores :: MultiMap Double Genome

The score of each organism

trSS :: !SpecScore

Result SpecScore

trAdj :: !Double

Total adjusted fitness

runFitTestWStrategy :: Functor f => (forall t. Traversable t => t Genome -> f (t Double)) -> Species -> f TestResult Source

Output the result of testing fitness. The first argument tells how to process each genome, with extra effects possible. If you don't need that, you can just fmap over your fitness function and put Identity over the result.

updateSpec :: SpecScore -> Species -> Species Source

Takes a new SpecScore and updates the metadata of a species

Statistics

maxDist :: Parameters -> Species -> Double Source

Gets the max distance between two genomes in a species

speciesComplexity :: Species -> Int Source

Total complexity of all member genomes

Debugging

validateSpecies :: Species -> Maybe [String] Source

Validates a species, possibly returning errors