Haskell, Genetic Algorithm, Graph Theory, Programming.
< maximum t1 | d <- t2] && or [d > minimum t2 && d < maximum t2 | d <- t1] numBridges :: [Tile] -> Int numBridges tiles = length [ () | Tile a _ <- tiles ++ map flipTile tiles, needsBridge a ] dupScore :: [Tile] -> Int dupScore tiles = sum (map ((^ 2) . length) (group (sort sides))) where sides =