From d2d20c8df5b6741aebb4986404e20a7c70df6fd8 Mon Sep 17 00:00:00 2001 From: Quinten Kock Date: Sun, 19 Dec 2021 10:05:39 +0100 Subject: [PATCH] day19: reduce tracing --- 2021/day19.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2021/day19.hs b/2021/day19.hs index 337e4d9..2c523e5 100644 --- a/2021/day19.hs +++ b/2021/day19.hs @@ -65,7 +65,7 @@ merge (diffs, known) (overlappingNew, scanner) = (diff:diffs, nub $ sort $ known discover :: [Coord] -> [Coord] -> [[[Coord]]] -> ([Coord], [Coord], [[[Coord]]]) discover diffs known [] = (diffs, known, []) -discover diffs known aux = trace ("total: " ++ show (length newKnown) ++ "; best: " ++ show (map (length.fst) bestPer)) $ +discover diffs known aux = trace (show (map (length.fst) bestPer)) $ if bestScore < 12 then (diffs, known, aux) else (diffs ++ fst newKnown, snd newKnown, newAux) where overlapKnown = map (map (\x -> (findOverlap known x, x))) aux bestPer = map (maximumBy (\x y -> compare (length $ fst x) (length $ fst y))) overlapKnown