Hexagonal Tetris

The ICFP 2015 Contest required contestants to play a tetris-like game on a hexagonal grid, to maximise their scores over various problems. Various shapes appear at the top of a playing area, and need to be tightly packed together. Once a horizontal line is fully packed, the whole line disappears, making way for more shapes to be packed in. In addition, special "movement combos" known as "power phrases" could be invoked to gain additional points. The following are some examples from the contest, and their solutions.

Choose a problem to replay:

FAQ

  1. What is this?
    These are examples of several historical games, as played by my simple computer AI during the ICFP 2015 programming competition.
  2. What is the ICFP Contest?
    The International Conference on Functional Programming sponsors a yearly programming competition. For the latest contest and other details, please see their website.
  3. Why are the piece movements "jiggly"? Wouldn't a straight path be fastest?
    The jiggles invoke power phrases which award higher scores.
  4. Is it possible for the pieces to pass through each other?
    Yes, certain pieces may rotate about a pivot point that is so far away that they appear to jump or skip about, even passing through obstacles.
  5. Can I play this game?
    That would be a good idea to implement in the future! For now, this display only plays back previously recorded games.
  6. How does your AI play this game?
    First, we decide where to place each piece based on a heuristic (a rough score) based on completing horizontal lines, and avoiding overhangs. Once we have a few possible positions for each piece, we try to move the piece there using A* search.
  7. How do I learn more about your program?
    Write to me! Here's my [[You must enable Javascript is required to view this email, and this website in general.]].