Smolder

From Esolang
Jump to navigation Jump to search
This is still a work in progress. It may be changed in the future.

Smolder is a cellular automaton invented by User:Aadenboy created from a failed attempt at recreating Burn.

Structure

Smolder is held on a 2D space of cells. Each cell has three channels, blue, green, and red, however the red channel can be left empty. Channels can range from 0 to 3. Cells with a value in the red channel are immutable.

Each step, cells that aren't 00 without a red channel and next to any other cell with a red channel follow these rules:

  • Keep track of running totals , and .
  • Check all four of your orthogonally adjacent neighbors. If they have a red component greater than zero, add each of their channels to the total, modulo 4.
  • Store the difference between the total and the cell.
  • Update the channels of the cell according to these formulas:

Single-cell example

As an example, consider this setup:

101
10

The rightmost cell, 10, calculates this:

The board updates to this state:

101
101

This is a basic example of flood-fill.

Multi-cell example

In this example:

112
112
01
112
01

The middle cell adds all the cells neighboring it together, modulo 4. With the total, it computes:

112
112
203
112
01

Interactions

Decay

Certain wires when flood-filling can undergo decay, where the red channel slowly decreases.

103
11
11
11
11

In this scenario, the difference between either channel equates in a total difference of 1, leading to the red channel decreasing by one each step.

103
012
101
010
11

Oscillation

Similarly, certain wires may oscillate between a set of values.

202
11
11
11
11

In this scenario, the total difference is zero, allowing the red channel to remain unaffected.

202
022
202
022
202