(Renamed from "Astral" in v0.9.5; the current name is still not satisfactory to me; a final name will be decided before v1.0)
https://github.com/achabense/moody
This program helps to explore a set of cellular automaton rules known as "MAP rules". In short, MAP rules are 2-state rules in the range-1 Moore neighborhood. They are a strict superset of isotropic rules and outer-totalistic (aka life-like) rules, the most famous one being Conway's Game of Life. Below are some discoveries found by this program.
The program supports a series of subsets. You can easily identify which subsets a rule belongs to, and explore rules in the subsets or their intersections (e.g., self-complementary isotropic rules). You can get random rules in the Random
window, or test all rules in the set with the Traverse
window (practical if the set is reasonably small), or modify existing ones - with the help of preview windows (Preview
), it's easy to discover interesting rules around a given rule.
Also, the program is able to extract value constraints from patterns, and generate rules under the constraints (for example, rules allowing for gliders). (v0.9.7: temporarily removed, as the old implementation was terrible; will re-support in the future.)
The program saves rules and patterns as common MAP-strings and RLE-strings, which can further be tested by other programs like Golly.
There are a lot of rules collected during the development of this program, available here. You may download and have a look at some of them using the Files
or Clipboard
window.
The binary built for Windows 10 is available at the latest-release page. (If you are using a different system, you may try building the project yourself; see the "building" section below.)
It's recommended to place the program in a separate folder, as it will create an "imgui.ini" file in the same directory, and for example, you can download those rule lists to a subdirectory, then it will be easy to find them in the Files
window.
To get familiar with the program, in the program: press H
to enter help mode; check the tooltips; check the Documents
for the concepts and workflow. Below are some basic operations for saving/loading rules and patterns (listed for convenience; all of them are recorded within the program):
- Saving rules: right-click the MAP-string to save to the clipboard. (Also, you can right-click a preview window to copy the previewed rule.)
- Loading rules: open the
Clipboard
window and clickRead clipboard
to load rules from the clipboard. The equivalent shortcut isW
. - Saving patterns: select area in the space window with right mouse button, and press
C
to save the entire area, orI
to identify and save the pattern (limited to oscillators and spaceships). - Pasting patterns: hover over the space window and press
V
to paste.
The project is written in C++20 using the ImGui and SDL2 libraries, and uses CMake for building. ImGui is included in this project; SDL2 will be fetched automatically by CMake.
The project is developed on Windows 10. In my experience, it should be easy to open and build the project with Visual Studio (CMake tools required). Alternatively, to build the project directly with command line, assuming the project is to be built in the Build
subdirectory, run:
cmake -B Build -S .
cmake --build Build --config Release
There is no explicit dependency on OS-specific features, so the project may also work on some other systems.