WARNING FLASHING LIGHTS

warning, this games contains flashing lights, please be careful.


Controls

You can zoom with the mouse scroll wheel. This will impact the number of cell when the simulation is restarted. Otherwise, you can interact with this simulation through it's menu.


Simulation's rules


This small "game" is a visualisation of the puzzle given in the day 11 of the 2021 Advent of Code :
https://adventofcode.com/2021/day/11

You can read the full premise of the puzzle on this AoC website. I will give you a short summary below :

Octopuses are neatly arranged in a  grid. Each octopus slowly gains energy over time and flashes brightly when its energy is full. When an Octopus flashes, the energy level of it's neighbors are increased by one, thus potentialy making them flash.


A more formal description of the computation of each step :

  • First, the energy level of each cell increases by 1.
  • Then, any cell with an energy level greater than it's energy threshold flashes. This increases the energy level of all adjacent cells by 1.If this causes a cell to have an energy level greater than it's energy threshold, it also flashes. This process continues as long as new cells keep having their energy level increased beyond their energy threshold. (An cell can only flash at most once per step.)
  • Finally, any cell that flashed during this step has its energy level set to 0.<br>

Interaction with the simulation

The controls over the simulation are the following :

  • Simulation speed : speed at wich each step is processed.
  • Energy threshold : energy that a cell must reach before flashing.
  • Neighbor simple / double : how many neighbors each cell considers.<br>
  • Grid Type
  • <br>

As an addition to the original puzzle, this simulation can be performed on an hexagonal grid and on a cairo grid.

GridNumber of simple neighbor
Number of double neighbor
square48
hexagonal36
cairo57

Leave a comment

Log in with itch.io to leave a comment.