PrimeWorld is an experimental artificial chemistry simulation that explores whether simple mathematical rules can give rise to complex, emergent behavior. In this universe, integers are treated as particles: prime numbers are stable, while composite numbers are reactive, interacting according to arithmetic properties.
Atoms move randomly across a 2D grid, collide, react, and evolve over time. The simulation investigates how local interactions governed by number theory can produce persistent structures and patterns.
- Efficient prime number generation using the Sieve of Eratosthenes.
- Random movement of atoms on a toroidal (wrap-around) grid.
- Prime-based reaction and decay mechanics.
- Simulation visualization with Matplotlib and optional animation frame generation.
Run the notebook in Google Colab or Jupyter, adjust the simulation parameters (grid size, number of atoms, iterations), and execute the cells to observe the evolving system.