Fix selection method not being selected in Main

This commit is contained in:
David Pätzel 2020-05-02 17:47:43 +02:00
parent 3976e09506
commit 3800d06d5e

View File

@ -33,6 +33,7 @@ options =
<> help "Population size" <> help "Population size"
) )
optionsWithHelp :: ParserInfo Options
optionsWithHelp = optionsWithHelp =
info (helper <*> options) info (helper <*> options)
( fullDesc ( fullDesc
@ -44,7 +45,9 @@ main :: IO ()
main = execParser optionsWithHelp >>= \opts -> do main = execParser optionsWithHelp >>= \opts -> do
hSetBuffering stdout NoBuffering hSetBuffering stdout NoBuffering
pop <- population (populationSize opts) (I prios []) pop <- population (populationSize opts) (I prios [])
pop' <- runEffect $ for (run 2 1 (5 / 100) pop (steps $ iterations opts)) log pop' <-
runEffect
$ for (run (tournament 2) 2 1 (5 / 100) pop (steps $ iterations opts)) log
(res, _) <- bests 5 pop' (res, _) <- bests 5 pop'
sequence_ $ format <$> res sequence_ $ format <$> res
where where