hmep-0.1.1: HMEP Multi Expression Programming – a genetic programming variant

Safe HaskellNone
LanguageHaskell2010

AI.MEP.Types

Description

Core MEP data structures

Synopsis

Documentation

type Chromosome a = Vector (Gene a Int) Source

A chromosome is a vector of genes

data Gene a i where Source

Either a terminal symbol or a three-address code (a function and two pointers)

Constructors

C :: a -> Gene a i 
Var :: Int -> Gene a i 
Op :: F a -> i -> i -> Gene a i 

Instances

(Eq a, Eq i) => Eq (Gene a i) Source

Eq instance for Gene

(Show a, Show i) => Show (Gene a i) Source

Show instance for Gene

type F a = (Char, a -> a -> a) Source

A function and its symbolic representation

type Population a = [Chromosome a] Source

List of chromosomes

type Generation a = [Phenotype a] Source

Evaluated population

type Phenotype a = (Double, Chromosome a, Vector Int) Source

Loss value, chromosome, and the best expression indices vector