Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
ca_hashlife_example.cc File Reference

A guided tour of Aleph::CA::Hashlife_Engine (Phase 10). More...

#include <chrono>
#include <cstdint>
#include <iomanip>
#include <iostream>
#include <string>
#include <vector>
#include <tpl_ca_hashlife.H>
Include dependency graph for ca_hashlife_example.cc:

Go to the source code of this file.

Functions

int main ()
 

Detailed Description

A guided tour of Aleph::CA::Hashlife_Engine (Phase 10).

The example walks through three classic Conway's Game of Life patterns to illustrate what the Hashlife engine does, why it scales to enormous generation counts, and how the user-facing API is meant to be used:

  1. Glider — the canonical 5-cell traveler. Drawn frame-by-frame so you can watch it move.
  2. R-pentomino — a tiny chaotic seed that stabilises around step 1103 with 116 cells. We show the population trajectory.
  3. Gosper glider gun — the first known finite, infinitely-growing pattern. We chain exponential advances to step 2^20 and report the population, bounding box and cache stats — work that would take the dense synchronous engine many minutes.

Run: ./build/Examples/ca_hashlife_example

No command-line arguments. No external assets — patterns are coded as cell sets so the example is self-contained.

Definition in file ca_hashlife_example.cc.

Function Documentation

◆ main()

int main ( void  )