hgalib-0.2: Haskell Genetic Algorithm LibrarySource codeContentsIndex
Chromosome.GP
Description
Genetic Programming as strictly-evaluated s-expressions
Synopsis
data Op a s = Op {
callback :: [a] -> State s a
arity :: Int
name :: String
}
data Node a s = Node (Op a s) [Node a s]
mseFitness :: Fractional a => [(s, a)] -> Node a s -> a
mutate
eval :: Node a s -> State s a
random
config
Documentation
data Op a s Source
An operator in the syntax tree of the GP
Constructors
Op
callback :: [a] -> State s aThe function for evaluating this node
arity :: IntThe number of children of this node
name :: StringThe name of the node when shown
show/hide Instances
Show (Op a s)
data Node a s Source
A node in the syntax tree of the GP
Constructors
Node (Op a s) [Node a s]
show/hide Instances
Show (Node a s)
mseFitness :: Fractional a => [(s, a)] -> Node a s -> aSource
Calculates fitness based on the mean square error across a list of examples The examples are a list of tuples of (inputs state, correct output)
mutate
eval :: Node a s -> State s aSource
Statefully evaluates a given GP
random
config
Produced by Haddock version 2.4.2