hgalib-0.2: Haskell Genetic Algorithm LibrarySource codeContentsIndex
Chromosome.Bits
Description
Chromosomes represented as a bit field
Synopsis
mutateBits :: Double -> [Bool] -> GAState c p [Bool]
bits2int :: [Bool] -> Int
randomBits :: Int -> GAState c p [Bool]
pointCross :: [a] -> [a] -> GAState c p ([a], [a])
config :: ChromosomeConfig [a] p
Documentation
mutateBits :: Double -> [Bool] -> GAState c p [Bool]Source
Randomly flips fits with a specified probability
bits2int :: [Bool] -> IntSource
Converts a list of Bool's to it's integer representation
randomBits :: Int -> GAState c p [Bool]Source
Generates i random bits
pointCross :: [a] -> [a] -> GAState c p ([a], [a])Source
Single point cross at a random location
config :: ChromosomeConfig [a] pSource
The config for a chromosome of a list of bits. User must defined fitness and mutate.
Produced by Haddock version 2.4.2