Skip to content

Full-featured cellular automaton simulator with 6 game modes including Conway's Game of Life, High Life, Immigration Game, Rainbow Game, Langton's Ant, and Custom Rules. Features 20+ built-in patterns, interactive drawing tools, symmetry modes, and pattern save/load.

License

Notifications You must be signed in to change notification settings

James-HoneyBadger/LifeGrid

Repository files navigation

LifeGrid

Python 3.11+ License: MIT Version

LifeGrid is an extensible cellular automaton simulator featuring a graphical user interface, robust pattern management, and a plugin system. Built with Python and Tkinter, it offers a rich environment for exploring Conway's Game of Life and many other automata variations.

Table of Contents

About

LifeGrid provides a powerful platform for simulating, analyzing, and visualizing cellular automata. Whether you are a student exploring emergence, a researcher testing new rules, or a hobbyist creating intricate patterns, LifeGrid offers the tools you need.

Features

  • Multiple Automata Modes:
    • Conway's Game of Life
    • HighLife
    • Immigration Game
    • Rainbow Game
    • Brian's Brain
    • Wireworld
    • Langton's Ant
    • Custom Rule Support (B/S notation)
  • Interactive GUI:
    • Drawing tools (Pen, Eraser, Toggle)
    • Symmetry modes (Horizontal, Vertical, Diagonal, Point)
    • Zoom and Pan controls
    • Real-time speed adjustment
  • Pattern Management:
    • Built-in library of diverse patterns
    • Load/Save functionality (supports RLE and JSON)
    • Pattern Browser with previews
  • Advanced Capabilities:
    • Undo/Redo history
    • Statistics tracking (Population, Density, Births/Deaths)
    • Export to Image (PNG) or Animation (GIF)
    • Plugin system for extensions

Installation

Prerequisites

  • Python 3.11 or higher
  • Git (optional, for cloning)

Steps

  1. Clone the repository:

    git clone https://github.com/James-HoneyBadger/LifeGrid.git
    cd LifeGrid
  2. Create and activate a virtual environment (recommended):

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install dependencies:

    pip install -r requirements.txt

Quick Start

Running the GUI Application

To launch the main simulator interface:

python src/main.py

Using as a Library

LifeGrid's core can be used in your own scripts for headless simulation:

from src.core.simulator import Simulator
from src.core.config import SimulatorConfig

# Initialize simulator
config = SimulatorConfig(width=100, height=100)
sim = Simulator(config)

# Setup a pattern (e.g., a Glider)
sim.initialize(mode='conway', pattern='glider')

# Run for 100 generations
for _ in range(100):
    stats = sim.step()
    print(f"Gen {stats[0]['generation']}: Pop {stats[0]['population']}")

Documentation

Full documentation is available in the docs/ directory.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Copyright (c) 2026 Honey Badger Universe

About

Full-featured cellular automaton simulator with 6 game modes including Conway's Game of Life, High Life, Immigration Game, Rainbow Game, Langton's Ant, and Custom Rules. Features 20+ built-in patterns, interactive drawing tools, symmetry modes, and pattern save/load.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages