← 返回基因目录

evolve-life-bitwise

Native evolve.life

Conway's Game of Life simulator using bitwise-packed rows. Stores 32 cells per integer for cache-friendly bulk neighbor counting. Optimized for dense, high-throughput simulations on medium-to-large grids.

版本
0.2.0
评分
0.50
下载量
0
WASM
1276.9 KB
创建时间
2026年3月14日
更新时间
2026年3月18日
安装
$ rotifer install evolve-life-bitwise copy

评分构成

基因评分 0.50
竞技场 50%
1.00
使用量 30%
0.00
稳定性 20%
0.01

Arena 历史

日期 适应度 安全分 调用数
3月17日 1.0000 1.00 1

Phenotype

inputSchema

{
  "type": "object",
  "required": [],
  "properties": {
    "grid": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "enum": [
            0,
            1
          ],
          "type": "number"
        }
      },
      "description": "Custom initial grid (2D array of 0s and 1s). Ignored if preset is set."
    },
    "rule": {
      "type": "string",
      "default": "B3/S23",
      "description": "Life-like rule in B/S notation (default: B3/S23 for Conway's Life)"
    },
    "seed": {
      "type": "number",
      "description": "Random seed for 'random' preset (deterministic output)"
    },
    "width": {
      "type": "number",
      "default": 64,
      "maximum": 512,
      "minimum": 4,
      "description": "Grid width in cells"
    },
    "height": {
      "type": "number",
      "default": 64,
      "maximum": 512,
      "minimum": 4,
      "description": "Grid height in cells"
    },
    "preset": {
      "enum": [
        "glider",
        "pulsar",
        "blinker",
        "beacon",
        "r-pentomino",
        "random"
      ],
      "type": "string",
      "description": "Initial pattern preset. Overrides grid if provided."
    },
    "generations": {
      "type": "number",
      "default": 100,
      "maximum": 10000,
      "minimum": 1,
      "description": "Number of generations to simulate"
    }
  }
}

outputSchema

{
  "type": "object",
  "required": [
    "final_grid",
    "alive_count",
    "peak_population",
    "stabilized_at",
    "extinction",
    "generations_computed",
    "cells_processed"
  ],
  "properties": {
    "extinction": {
      "type": "boolean",
      "description": "Whether all cells died before final generation"
    },
    "final_grid": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "enum": [
            0,
            1
          ],
          "type": "number"
        }
      },
      "description": "Grid state after all generations"
    },
    "alive_count": {
      "type": "number",
      "description": "Number of live cells in final grid"
    },
    "stabilized_at": {
      "type": "number",
      "description": "Generation at which the grid stabilized (-1 if not stabilized)"
    },
    "ascii_snapshot": {
      "type": "string",
      "description": "ASCII art of the final grid state (max 80x40)"
    },
    "cells_processed": {
      "type": "number",
      "description": "Total cell evaluations (width * height * generations_computed)"
    },
    "peak_population": {
      "type": "number",
      "description": "Maximum live cells observed across all generations"
    },
    "generations_computed": {
      "type": "number",
      "description": "Actual number of generations computed (may be less if stabilized/extinct)"
    }
  }
}