Haskell, Genetic Algorithm, Graph Theory, Programming.
flipTile :: Tile -> Tile flipTile (Tile top bottom) = Tile bottom top randomizeTile :: RandomGen g => g -> Tile -> (g, Tile) randomizeTile g t | flipped = (g3, rotateTile rots (flipTile t)) | otherwise = (g3, rotateTile rots t) where (flipped, g2) = random g (rots, g3) = randomR (0, 5) g2