MOMA Simulation Engine
A library for creating and running dynamic systems, such as cellular automata, using the MOMA (Moving Origin Modular Arithmetic) framework as the core update rule.
This crate provides the tools to build simulations where the evolution of the system is governed by the complex, non-linear, and deterministic patterns generated by MOMA.
The Core Idea
Most simulations, like cellular automata, use simple, fixed rules to determine the next state of a cell (e.g., "if the left neighbor is black and the right is white, the new cell is black").
The MOMA Simulation Engine replaces these simple rules with a MomaRing. The state of a cell evolves based on the MOMA residue of its current state, where the "moving origin" is determined by the state of its neighbors.
This introduces a rich, complex, and deeply interconnected dynamic, allowing for the generation of intricate and emergent patterns that are unique to the chosen MOMA strategy.
Features
CellularAutomaton: A simple 1D cellular automaton that uses MOMA for its update logic.- Strategy-Driven Rules: The behavior of the simulation is determined by the
OriginStrategypassed to it. This means you can create vastly different "universes" just by changing the strategy. - Extensible: Designed to be a foundation for more complex simulations, such as 2D automata or dynamic graph-based systems.
Getting Started
To use this engine in your own project, add it to your Cargo.toml.
[]
= "0.1.4" # Or the most recent version
or just use cargo add moma_simulation_engine from the terminal
Quick Start: Running a 1D Automaton
Here is a simple example of how to create, run, and display a MOMA-powered cellular automaton.
use strategy;
use CellularAutomaton;
use ;
Future Directions
This crate is the first step in exploring MOMA as a tool for modeling complex systems. Future plans include:
- 2D Cellular Automata.
- Dynamic Graph models where node states are updated via MOMA rules.
- Tools for analyzing the patterns generated by different strategies.
License
This project is licensed under either of:
- Apache License, Version 2.0
- MIT license
at your option.