<commit_before>module Evolution
    (
       EvolutionRules (EvolutionRules, mutation, breeding, selection, deaths, expression, optimumForGeneration)
    , evolution
    ) where

import           Data.Random
import           Data.Functor ()

import           Population
import           Phenotype
import           Expression

data EvolutionRules =
       EvolutionRules
           { mutation             :: ![Mutation]
           , breeding             :: ![Phenotype -> Int -> Breeding]
           , selection            :: ![Phenotype -> Selection]
           , deaths               :: ![Int -> PopulationChange]
           , expression           :: !ExpressionStrategy
           , optimumForGeneration :: !(Int -> Phenotype)
           }

step :: [PopulationChange] -> RVar [Individual] -> RVar [Individual]
step changes population = foldl (>>=) population changes<commit_msg>minor: reformat<commit_after>module Evolution
    ( EvolutionRules
        ( EvolutionRules
        , mutation
        , breeding
        , selection
        , deaths
        , expression
        , optimumForGeneration
        )
    , evolution
    ) where

import           Data.Random
import           Data.Functor ()

import           Population
import           Phenotype
import           Expression

data EvolutionRules =
       EvolutionRules
           { mutation             :: ![Mutation]
           , breeding             :: ![Phenotype -> Int -> Breeding]
           , selection            :: ![Phenotype -> Selection]
           , deaths               :: ![Int -> PopulationChange]
           , expression           :: !ExpressionStrategy
           , optimumForGeneration :: !(Int -> Phenotype)
           }

step :: [PopulationChange] -> RVar [Individual] -> RVar [Individual]
step changes population = foldl (>>=) population changes
{'fraction_non_alphanumeric': 0.090311986863711, 'fraction_numerical': 0.0, 'mean_word_length': 1.6921944035346097, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3843580', 'n_tokens_mistral': 451, 'n_tokens_neox': 407, 'n_words': 108}