Cellular Automata

For creating 1D, 2D (including Conway's Game of Life) and 3D cellular automata.

Education

Download (688 KB)

How do I install this?

A minetest mod for growing various cellular automata, including conway's game of life and giant procedural trees.

Installation

like any minetest mod just install the mod as "automata" in your mods folder

What it Adds

2 Node types, 1 Tool, 1 Chat command

Depends on

Nothing, optionally depends on WorldEdit in order to use chat command "//owncells ( see https://github.com/Uberi/Minetest-WorldEdit )

This mod provides a "Programmable" Cellular Automata block (Inactive Cell) which you place, then you select the Remote Control tool and punch it to bring up the activation form. Once activated, Inactive Cells become Active Cells and start growing according to the rules you've set. Active Cells turn into Inactive Cells when dug.

screenshot_171106351 screenshot_170757605

The Rules Form

"Using" the Remote will bring up a form. Cstom rules can be entered in "code" in the survival/birth format, for example, conway cells are 8 neighbors, rule 23/3 which means if there are 3 neighbors an empty cell turns on, and already-active cells stay on if they have two or three neighbors, otherwise they turn off. (there are many online collections of Game of Life entities: http://www.argentum.freeserve.co.uk/lex.htm )

Remember that zero is a valid option (for survival at least, not birth -- in this version it is ignored) so that single nodes will grow with rules like n=4, 01234/14. The rest of the form fields also have defaults, but if set allow you to control the direction of growth, the plane that the automata operate in, the trail of dead cells they leave behind (can be set to "air"), etc.

1D automata follow the NKS "rules" as per: http://www.wolframscience.com/nksonline/page-53 . They also require an additional parameter for the calculation axis, obviously the growth axis and calculation axis can't be the same. 2D automata only need the growth axis set, even if growth is set to zero, because the calculation plane is implied by the growth axis (perpendicular to it). 3D automata actually have less options since their growth and calculation directions are all axis. For automata to grow properly, their trail should either be set to air, or they need to be set to "destructive" so that any trail they leave doesn't impede their natural growth in a later iteration.

Trees are an example of a 3D automata with non-totalistic rules meaning that not just the total neighbor count is considered but rather specific neighbor states are considered like in the case of 1D automata. Trees are also probabilistic and these probabilities can be adjusted in the form to get different growth characteristics.

The remote now has a "Manage" tab which allows you to see your own patterns and pause or resume them. Exporting from that tab is soon to come.

Mode 1, activating inactive cells you have placed in the map:

When you hit "Activate" all inactive cells you have placed will start growing (this option will be missing if no inactive cells have been placed).

Mode 2, activating a single node at your current location

When you hit "Single" a single cell will be placed at your current location and the rules you have filled out will be applied. This means the cell will die unless it has a zero in the survival rules: 0xx/xxx eg, 01234/14

Mode 3, importing a Game of Life entity from the supplied .LIF collection

Alternatively you can select a Game of Life pattern from the right-hand list. Double clicking will give a description. Some of these patterns are extremely large and are actually more like huge machines made of smaller patterns set in precise relation to eachother. Clicking "Import" will create the selected pattern, with the selected rules, relative to your current location. (Most of these patterns are intended for standard Conway 23/3 rules but some are intended for variations on these rules. If that is the case the alternate rules, or any you have entered, will be used -- .LIF collection by Al Hensel http://www.ibiblio.org/lifepatterns/lifebc.zip )

Mode 4, using WorldEdit to set up patterns, import patterns, set up random field, etc.

If worldedit is installed, this mod adds a chat command, "//owncells" which allows capturing abandoned automata blocks (active or inactive, abandoned by player or game quit/crash) as well as capturing blocks created by worldedit (which until now have not been useful). This means that by marking a worldedit region, using "//replace stone automata:inactive" or "//mix air automata:inactive", etc, following up with "//owncells" will add these blocks to your "inactive blocks" so that you can activate them with the remote control. You can also mark a reqion around an aborted set of active blocks, or inactive blocks, and as long as they are not owned by a player still in the game (which they won't be if the game was quit and restarted) they also will be added to your inactive blocks to be activated by remote. (note: digging individual blocks does not respect ownership in any way, and manually digging an active block will remove it from whatever pattern it is part of as long as the pattern isn't already past that block in a current grow cycle, as will an inactive block that is dug be removed from any other player's inactive blocks.)

Known Issues

  • Large patterns (particularly 3D patterns, can cause serious lag)
  • zero-neighbor birth rules ( odd numbered NKS codes ) are implemented for cells inside the pattern's rectangular extent, not, obviously, for the entire infinite field. ways of faking this might be addressed in future releases but it is disclosed here that this implementation will have a unique effect on such rules' patterns compared to software that assumes an infinite field for each iteration...

Next Steps in Development (for v.0.2.0 milestone)

  • importing from a larger library of saved patterns (.rle, .cells and .lif v1.06 support) http://conwaylife.com/wiki/Main_Page and showing a summary in the form
  • an "Admin" tab visible to ops
  • a priv for using this mod at all, or using destructive mode at least
  • improve import / export / persistence functionality
  • detection of dead (stable) patterns or sections of patterns
  • other efficiency improvements to make calculations go faster

  • non-totalistic rules for 2D and 3D where exact combinations of neighbors can be specified (ambitious)

  • neighborhoods of depth greater than 1, as well as definable neighborhood shapes
  • wireworld automata
  • continuous automata and colorized automata
  • zero neighbor birth rules applied to the entire "infinite field" rather than current approach
  • cells that can change their own rules or use different rules give iteration number
  • automata based on foldings, transformations, scale-repetitions, etc

License

Author: bobomb, License: WTFPL

Screenshots

"Single" mode

screenshot_2030436717

screenshot_2030482649

"Import" mode

screenshot_2030594267

screenshot_2030616024

screenshot_11245761

"Activate" mode

screenshot_2030738253

screenshot_2030806016

1D Automata (uses NKS rules 0-255) (using RAINBOW mode)

screenshot_32765381

3D Automata

screenshot_168375193

"Manage" tab

screenshot_168492531

Reviews

Review

Do you recommend this mod?

  • Nice for contemplating the mathematical reality and (maybe) good for some minigames.

    To be used in a minigame where the player would be required to run from the deadly abnormally fast growing cells, the blocks would have to damage any bystander. Overall, cool, but 3D automata slows down significantly after a few cycles, according to my observations.

    0 comments

Used By