From 43071b9b1e8ce5f3f0caaea9e48c50d9e9d4ddc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20P=C3=A4tzel?= Date: Tue, 22 Oct 2019 07:09:17 +0200 Subject: [PATCH] Remove unnecessary 'ga'' function --- src/GA.hs | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/GA.hs b/src/GA.hs index 16c1c10..ac17600 100644 --- a/src/GA.hs +++ b/src/GA.hs @@ -166,20 +166,6 @@ The @k@ best individuals in the population. bests :: (Individual i, Monad m) => N -> Population i -> m [i] bests = flip bestsBy fitness -{-| -Runs the GA and prints the @nResult@ best individuals. --} -ga' nParents nX pop term nResult = do - pop <- run nParents nX pop term - res <- bests nResult pop - sequence $ format <$> res - where - -- TODO this has to be done nicer - format :: (Individual i, MonadIO m, Pretty i) => i -> m () - format s = do - f <- liftIO $ fitness s - putText $ show f <> "\n" <> pretty s - -- TODO add top x percent selection (select n guys, sort by fitness first) step