mcmc-synthesis-0.1.2.2: MCMC applied to probabilistic program synthesis

Safe HaskellNone

Language.Synthesis.Mutations

Synopsis

Documentation

mutateInstruction :: Eq a => Distr a -> Mutation [a]Source

Given a distribution over instructions, mutates a random instruction.

mutateInstructionAt :: Eq a => Distr a -> Int -> [a] -> Distr [a]Source

mutateInstructionsAt :: Eq a => Distr a -> [Int] -> [a] -> Distr [a]Source

swapInstructions :: Eq a => Mutation [a]Source

Swaps 2 random instructions.

mix :: [(Mutation a, Double)] -> Mutation aSource

Given (mutation, weight) list, mixes the mutations.

type Mutation a = a -> Distr aSource