On the Subject of Game of Ants

The Circle rules your life.

  • On this module is a 5×5 grid of cells that can be white or black. Within this grid, there are up to five red ants.
  • This is the initial state of a cellular automaton. To defuse the module, determine the state of the grid after the following steps have been performed.
  1. Perform one iteration of Game of Life on the cells of the grid, ignoring the ants.
  2. All ants simultaneously move one space forwards, toggling the state of cell it exited from.
  3. If two or more ants end up on the same cell, apply these steps in order:
    • If the ants are facing in different directions, all move another space forwards.
    • If the ants are facing the same direction, all but one ant move another space forwards.
  4. If any ant leaves the grid, skip to step 6.
  5. Each ant turns to its left if ends up on a black cell, or to its right if it ends up on a white cell. Repeat steps 2 to 5.
  6. Perform another iteration of Game of Life on the resulting grid, once again ignoring the ants.

To change the state of the grid, select a cell within it.

  • If the blinking button is active, selecting a cell toggles its state.
  • If the ant button is active:
    • Selecting an empty cell will place an ant on it in the orientation of the button.
    • Selecting a cell with an ant in a different orientation to the button changes the ant’s orientation to match.
    • Selecting a cell with an ant in the same orientation as the button removes the ant from the cell.
  • Selecting either the blinking or ant button will activate that button and deactivate the other.
    • Selecting the ant button while it is active rotates it 90° clockwise.
  • Selecting an arrow marks a location where at least one ant left the grid.
    Doing so will also activate the ant button and set its orientation to the direction of the arrow.