prevent duplicate sample of next generation
This commit is contained in:
parent
1ae23c20ee
commit
62cf1acc6d
|
@ -258,8 +258,7 @@ run select nParents nX pElite pop term = do
|
||||||
then return currPop'
|
then return currPop'
|
||||||
else do
|
else do
|
||||||
let nextPop = stepSteady select nParents nX pElite currPop'
|
let nextPop = stepSteady select nParents nX pElite currPop'
|
||||||
nextPop' <- lift $ sampleFrom mwc $ nextPop
|
let fBest = fitness $ NE.head $ fst $ bests 1 currPop'
|
||||||
let fBest = fitness $ NE.head $ fst $ bests 1 nextPop'
|
|
||||||
Pipes.yield (generation, fBest)
|
Pipes.yield (generation, fBest)
|
||||||
x nextPop (generation + 1)
|
x nextPop (generation + 1)
|
||||||
x pop 0
|
x pop 0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user