Copyright | (c) Leon Medvinsky, 2015 |
---|---|
License | GPL-3 |
Maintainer | lmedvinsky@hotmail.com |
Stability | experimental |
Portability | ghc |
Safe Haskell | None |
Language | Haskell2010 |
- data Population = Population {
- popSize :: Int
- popSpecs :: !(Map SpecId Species)
- popBScore :: !Double
- popBOrg :: !Genome
- popBSpec :: !SpecId
- popCont :: !PopContext
- nextSpec :: !SpecId
- popParams :: Parameters
- popParamsS :: Parameters
- data PopM a
- data PopContext
- runPopM :: PopM a -> PopContext -> (a, PopContext)
- data PopSettings = PS {
- psSize :: Int
- psInputs :: Int
- psOutputs :: Int
- psParams :: Parameters
- psParamsS :: Parameters
- newPop :: Int -> PopSettings -> Population
- trainOnce :: (Genome -> Double) -> Population -> Population
- trainN :: Int -> (Genome -> Double) -> Population -> Population
Documentation
data Population Source
A NEAT Population
Population | |
|
PopM
Custom state monad
runPopM :: PopM a -> PopContext -> (a, PopContext) Source
Construction
data PopSettings Source
Settings for creating a new population
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.