Haskell, Genetic Algorithm, Graph Theory, Programming.
[d | (d, i) <- zip [N .. NW] nums, i == n] a = map (trail (take 6 trailNums)) [0 .. 3] b = map (trail (drop 6 trailNums)) [0 .. 3] postproc :: [Trail] -> [Trail] postproc = normalize . filter (not . null) where normalize trails = minimum [ simplify ts | ts <- take 6 (iterate (map (map clockwise))