From 2d9840c51ba0ec6c0025e595be591db4067ef614 Mon Sep 17 00:00:00 2001 From: Rowan Torbitzky-Lane Date: Tue, 25 Feb 2025 18:53:52 -0600 Subject: [PATCH] skeleton done --- src/HushGP/GP.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/HushGP/GP.hs b/src/HushGP/GP.hs index 3bc4853..5879ee0 100644 --- a/src/HushGP/GP.hs +++ b/src/HushGP/GP.hs @@ -61,7 +61,7 @@ gpLoop' pushArgs generation evaluations population indexedTrainingData = do | otherwise = gpLoop' pushArgs (succ generation) (evaluations + (populationSize pushArgs * length (fst $ trainingData pushArgs)) + (if generation `mod` downsampleParentsGens pushArgs == 0 then length parentReps * (length (fst indexedTrainingData) - length (fst $ trainingData pushArgs)) else 0) + (if bestIndPassesDownsample then length (fst indexedTrainingData) - length (fst $ trainingData pushArgs) else 0)) (if elitism pushArgs then bestInd : replicate (populationSize epsilonPushArgs - 1) (newIndividual epsilonPushArgs evaledPop) else replicate (populationSize epsilonPushArgs) (newIndividual epsilonPushArgs evaledPop)) - (if enableDownsampling pushArgs then if (generation `mod` downsampleParentsGens pushArgs) == 0 then updateCaseDistances repEvaluatedPop indexedTrainingData indexedTrainingData (informedDownsamplingType pushArgs) (solutionErrorThreshold pushArgs / fromIntegral @Int @Double (length $ fst indexedTrainingData)) else indexedTrainingData else indexedTrainingData) + (if enableDownsampling pushArgs && ((generation `mod` downsampleParentsGens pushArgs) == 0) then updateCaseDistances repEvaluatedPop indexedTrainingData indexedTrainingData (informedDownsamplingType pushArgs) (solutionErrorThreshold pushArgs / fromIntegral @Int @Double (length $ fst indexedTrainingData)) else indexedTrainingData) nextAction where -- \| This will have downsampling added to it later.