Grow Tree

From Esolang
Jump to navigation Jump to search

Main

Grow Tree is a language based off of cells.

Cells can be in any of 5 types: Cell, Input, Output, Modify, and Empty.

Cells have a genome. They specify the cell's behavior. The cell reads all the cells adjacent to it. When a cell's neighbors corresponds with a pattern in the genome, then it will grow into the cells specified. There are also merges, where a cell grows into another cell, they xor their genomes together then xor with another value specified by the programmer, and that's the genome used.

Inputs modify a cell by xoring it with a value specified by the programmer, but that value is one value if the input bit is 1, but another value if the input bit is 0. Also, the inputted string is inputted in order from the first bit to the last, and the order is in input cell activations.

Output is like input, but it only xors with 1 value, and it uses another set of values from the output cell to determine in order to output 1 or 0.

Modify is like output, but it doesn't output anything.

It's quite simple to prove this is Turing complete, since xors are Turing complete.

Branches

Before we talk about branches, we have to talk about active cells and inactive cells. Only active cells can grow, but once they have grown, they become inactive. Branches have a start and a end. A new branch is formed when either a older active cell grows multiple new cells, or when a cell's genome gets modified. (The cells in both cases are the start of the branch)

When a branch's active cell either stops growing or gets blocked in all directions, the branch dies. When a branch dies, all its cells die and disappear into nothing.

Programs

There are no programs yet, but you can add your own.