Haskell, Genetic Algorithm, Graph Theory, Programming.
two-sided tile needs 24 bits, and a full set of 20 tiles needs 480 bits. Here’s the code to encode a stack of tiles this way starting from the earlier representation: encodeTile :: Tile -> [Bool] encodeTile (Tile a b) = concat [ encodeBinary (0 :: Int, 3) (trailNum side dir) | side <- [a, b], dir