
Imagine a search space of 2^512 ≈ 1.34 × 10^154 possible cellular automata (CA) rules—more than the 10^80 atoms in the observable universe. If you checked one rule per second since the Big Bang, you’d have explored just 4.35 × 10^17 by now—a cosmic needle in an infinite haystack. The Cellular Automata Evolution Simulator wields genetic algorithms to conquer this vast frontier, evolving CA rules to uncover behaviors no one has ever seen. This is not just a tool; it’s a portal to the uncharted, transforming the chaotic static of raw CA into patterns that pulse with emergent complexity.
Built with Node.js for relentless computation and JavaScript/HTML5 for vivid visualization, this simulator evolves 200 CA rules—each a 512-bit string for a binary Moore neighborhood—across configurable grids. It’s designed to chase any user-defined behavior, from oscillators to novel dynamics, with flexible fitness functions and scalable dimensions. This project is a passion-fueled odyssey, driven by a need to decode the universe’s hidden patterns, shared on GitHub to showcase a soul crafted through code.
draw_node.js) drives simulation and evolution, leveraging Int8Array for memory efficiency and high performance.testpop_from_file.html, testpop_from_file.js) renders CA grids live, supports manual rule selection, and displays population genotypes as a 512x200 pixel map.visualize.html) plots fitness distributions across epochs, exportable as PNG, to track evolutionary progress.repl.js provides a command-line interface for direct manipulation, empowering rapid rule experimentation.cellular-automata-evolution/
├── docs/
│ ├── article.md # Translated 2019 article with experiments and visuals
│ └── legacy.md # Archived experimental code from draw_node.js
├── draw_node.js # Server-side CA simulation and genetic algorithm
├── testpop_from_file.html # Client-side visualization and manual selection UI
├── testpop_from_file.js # Client-side logic for CA rendering and evolution
├── visualize.html # Fitness heatmap visualizer
├── repl.js # REPL interface for server-side control
├── storage/ # JSON storage for population, fitness, and heatmaps. As an example.
│ ├── population.json
│ ├── fitness.json
│ ├── heatmap.json
│ ├── heatmapAverage.json
│ ├── bestPopulation.json
│ ├── bestAverageFitness.json
│ └── config.json
├── style.css # Styling for client-side UI
└── README.md # Project documentation
git clone https://github.com/xcontcom/cellular-automata-evolution.git
cd cellular-automata-evolution
npm install
storage/ directory if not present:
mkdir storage
node repl.js
n iterations:
> cell.evil(n)
cell.recreate(): Initialize a new population.cell.resize(x, y): Set grid dimensions.cell.mutate(percent, genes): Adjust mutation parameters.cell.restoreBestPopulation(): Reload the best population.cell.printBestIndividual(): Display the top rule.npx http-server
http://localhost:8080/testpop_from_file.html in a browser.visualize.html in a browser after running cell.evil to generate heatmap.json.Int8Array for grid storage and bitmasking for neighborhood computations, enabling efficient simulation across large, flexible grids.draw_node.js) from client-side rendering (testpop_from_file.js), with JSON persistence for robust data handling.This project is a burning quest to unveil the unseen—a relentless drive to tune the white noise of cellular automata into patterns that resonate with the universe’s deepest mysteries. The genetic algorithm is the star, slicing through a 2^512 rule space with surgical precision to reveal behaviors that defy imagination. This isn’t about building tools for others; it’s about satisfying a soul-deep need to witness the impossible, to see what lies beyond the static. Shared on GitHub, this simulator stands as a monument to computational creativity, proving that the boldest ideas—fueled by passion—can reshape our understanding of complexity and emergence.
The horizon beckons with one ambition: porting the simulator to CUDA for massive parallelization, unleashing the full potential of genetic algorithms to explore even vaster CA landscapes in real time.
MIT License. See LICENSE for details.
Serhii Herasymov
sergeygerasimofff@gmail.com
https://github.com/xcontcom