Fix selection method not being selected in Main
This commit is contained in:
parent
3976e09506
commit
3800d06d5e
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user