Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

ts-hashlife

jadhaidar129BSD-2-Clause0.1.18TypeScript support: included

Efficient TypeScript implementation of HashLife, an optimized algorithm for simulating Conway's Game of Life with memoization and quadtree-based compression.

hashlife, game-of-life, typescript, conway, cellular-automata, simulation

readme

ts-hashlife

Efficient TypeScript implementation of HashLife, an optimized algorithm for simulating Conway's Game of Life with memoization and quadtree-based compression.

Installation

npm install ts-hashlife
# or
yarn add ts-hashlife
# or
pnpm add ts-hashlife

Features

  • Implements the HashLife algorithm for Conway's Game of Life
  • Written in TypeScript with full type definitions
  • Supports both Node.js and browser environments
  • Highly optimized for simulating large, sparse patterns
  • Includes utilities for drawing and importing/exporting Life patterns

Credits

This implementation is based on copy/life by Fabian Hemmer, a JavaScript implementation of the HashLife algorithm. The original project provided the foundation and core algorithm that this TypeScript implementation builds upon.

License

BSD-2-Clause

This project contains code from the copy/life project, which is also licensed under the BSD-2-Clause license.