Add primitive iteration count CLI argument
This commit is contained in:
parent
303120f54a
commit
958bbf25b7
|
@ -12,9 +12,11 @@ mkPop = population 100 (I prios [])
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
main = do
|
main = do
|
||||||
|
args <- getArgs
|
||||||
|
let t = fromMaybe 100 $ headMay args >>= readMaybe
|
||||||
hSetBuffering stdout NoBuffering
|
hSetBuffering stdout NoBuffering
|
||||||
pop <- mkPop
|
pop <- mkPop
|
||||||
pop' <- runEffect $ for (run 2 1 pop (steps 100)) log
|
pop' <- runEffect $ for (run 2 1 pop (steps t)) 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