| Crates.io | amari-automata |
| lib.rs | amari-automata |
| version | 0.17.0 |
| created_at | 2025-10-06 20:45:59.970034+00 |
| updated_at | 2026-01-11 22:37:42.067366+00 |
| description | Cellular automata, inverse design, and self-assembly using geometric algebra |
| homepage | https://github.com/justinelliottcobb/Amari |
| repository | https://github.com/justinelliottcobb/Amari |
| max_upload_size | |
| id | 1870830 |
| size | 276,030 |
Cellular automata, inverse design, and self-assembly using geometric algebra.
amari-automata implements geometric cellular automata where cells contain multivectors instead of simple states. This enables rich spatial relationships, natural rotation handling, and automatic differentiation through evolution steps. The crate combines three mathematical frameworks:
Add to your Cargo.toml:
[dependencies]
amari-automata = "0.12"
[dependencies]
# Default features
amari-automata = "0.12"
# With serialization
amari-automata = { version = "0.12", features = ["serde-support"] }
# With GPU acceleration
amari-automata = { version = "0.12", features = ["gpu"] }
use amari_automata::{GeometricCA, Evolvable};
use amari_core::Multivector;
// Create a 2D geometric cellular automaton (64x64 grid)
let mut ca = GeometricCA::<3, 0, 0>::new_2d(64, 64);
// Set initial configuration with multivector cells
ca.set_cell_2d(32, 32, Multivector::basis_vector(0)).unwrap();
ca.set_cell_2d(33, 32, Multivector::basis_vector(1)).unwrap();
// Evolve the system one step
ca.step().unwrap();
// Get cell state
let cell = ca.get_cell_2d(32, 32).unwrap();
Traditional CA cells hold discrete states (0, 1, 2, ...). Geometric CA cells hold multivectors, enabling:
Find seeds that evolve to target patterns:
use amari_automata::inverse_design::InverseDesigner;
let designer = InverseDesigner::new(&target_pattern);
let seed = designer.find_seed(max_iterations)?;
Uses dual numbers to compute gradients through time evolution.
Polyomino tiling with geometric constraints:
use amari_automata::self_assembly::Assembler;
let assembler = Assembler::new(tiles, constraints);
let solution = assembler.assemble(target_region)?;
Interpret CA evolution as paths in a Cayley graph:
use amari_automata::cayley_navigation::CayleyNavigator;
let navigator = CayleyNavigator::new(&group);
let path = navigator.find_path(start, target)?;
Use max-plus algebra to linearize discrete constraints:
use amari_automata::tropical_solver::TropicalSolver;
let solver = TropicalSolver::new(constraints);
let solution = solver.solve()?;
| Module | Description |
|---|---|
geometric_ca |
Core geometric cellular automata implementation |
inverse_design |
Find seeds producing target configurations |
self_assembly |
Polyomino tiling with constraints |
cayley_navigation |
CA as Cayley graph navigation |
tropical_solver |
Max-plus constraint solving |
ui_assembly |
Self-assembling UI primitives |
traits |
Core traits (Evolvable, etc.) |
error |
Error types |
Traditional CA:
cell ∈ {0, 1, 2, ...} (discrete states)
Geometric CA:
cell ∈ Cl(P,Q,R) (multivector states)
Benefits:
To find a seed s that evolves to target t:
s + εdsE(s + εds) = E(s) + εE'(s)·ds∂L/∂s = E'(s)ᵀ · ∂L/∂E(s)s ← s - α · ∂L/∂sDiscrete constraints like "cell A must be adjacent to cell B" become linear in tropical algebra:
max(A, B) = threshold → A ⊕ B = threshold
This enables efficient constraint propagation.
Licensed under either of Apache License, Version 2.0 or MIT License at your option.
This crate is part of the Amari mathematical computing library.