Game of Life
SkillDev toolsUse this skill when the user wants to play Conway's Game of Life, Rainbow Life, a Mosaico life demo, paint living tiles on the LCD, or launch an interactive mosaic / cellular automata game.
Use Game of Life in Claude, ChatGPT or Ahel Desktop
Free. Sign in, add Game of Life and connect your AI. About a minute.
Also: Claude Code · Cursor · Codex
Then ask your AI: use the Game of Life skill
Details
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; Ahel provides instructions and does not run this skill.
No other account needed.
Add Ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.
About this skill
ESP-Claw Skills Lab
What this skill tells your AI
The instructions your AI receives, as published by espressif/esp-claw-skills-lab in skills/game_of_life/SKILL.md and read by Ahel’s review.
Use this skill when the user wants to play Conway's Game of Life, Rainbow Life, a Mosaico life demo, paint living tiles on the LCD, or launch an interactive mosaic / cellular automata game.
Requires a display. Tuned for Mosaico QSPI AMOLED (command-mode GRAM): each frame uses begin_frame, draw, present, end_frame; avoid present_full and clear=false partial paths on current firmware. Chrome-less full-screen ink canvas — no HUD buttons and no generation/status text. Uses LCD touch gestures when available; otherwise falls back to a button. IMU shake is optional and soft-required via pcall(require, "imu"). On current Mosaico firmware the Lua imu module is not registered, so shake-to-scatter is temporarily unavailable even though the board has a hardware IMU. When imu is present and the board declares imu_sensor (or args.imu_device is set), shaking still scatters life. Audio is not required.
Run exactly one script with lua_run_script unless the user explicitly asks to run another application.
If lua_run_script returns an error, report that error directly to the user. Do not retry with changed arguments unless the user asks.
Launch
Tool call:
{"path":"{CUR_SKILL_DIR}/scripts/mosaico_life.lua","args":{}}
Mosaico / QSPI notes
- Target panel: 480x480 QSPI AMOLED (CO5300-class GRAM). A full RGB565 frame is about 450 KB, so refresh uses paced full-frame present rather than RGB-style continuous scanout.
- Safe Lua display path on current Mosaico image: begin_frame({ clear = true }) then draw then present() then end_frame().
- Shake/IMU: code keeps optional IMU support, but without the Lua imu module shake does nothing until firmware enables it.
Optional long-running launch (preferred for interactive play so the agent stays responsive):
{"path":"{CUR_SKILL_DIR}/scripts/mosaico_life.lua","args":{},"exclusive":"display","replace":true,"name":"game_of_life"}
Use lua_run_script_async for the async form when available.
Optional args:
{"path":"{CUR_SKILL_DIR}/scripts/mosaico_life.lua","args":{"imu_device":"imu_sensor","shake_sensitivity":1.0,"touch_ms":4,"display_ms":36,"step_ms":110,"target_cells":240,"cell_px":16}}
imu_device: board_manager device name for the IMU (defaultimu_sensor). Use this only when the board YAML uses a non-default device id — never hard-code a board product name.shake_sensitivity: number > 0 (default1.0). Higher = easier to trigger physical shake.touch_ms: touch/button poll interval in ms (default4, ~250 Hz). Lower = snappier strokes.display_ms: visual refresh interval in ms (default25on RGB framebuffer panels,80on SPI/QSPI panels).step_ms: Life generation interval (default90on RGB framebuffer panels,150on SPI/QSPI panels).target_cells: soft budget for grid tiles (default900on RGB framebuffer panels,240on SPI/QSPI panels). Larger panels grow cell pixels instead of denser grids.cell_px: force tile pixel size (overridestarget_cellssizing). Use only for manual tuning.
Recommended flow
- Activate the
board_hardware_infoskill and confirm a display is declared. LCD touch is preferred; a button is enough for pause / reset / shake. If an IMU is declared (commonlyimu_sensor), physical shake is available automatically. - Run
{CUR_SKILL_DIR}/scripts/mosaico_life.luawith an emptyargsobject unless a non-default IMU device name is required. - Tell the user the chrome-less controls:
- Drag: paint living cells (drag over a live cell to erase).
- Tap: place the next seed pattern.
- Long-press ≈ 700 ms: reset and reseed.
- Physically shake the board when IMU is present.
- Button-only boards: hold ≈ 700 ms to reset and reseed; physical shake requires an IMU.
- If the display is missing, say so and do not run the script. Missing IMU is not fatal — shake still works via button hold on button-only boards.
- On script error, report the error text and stop.
Gameplay notes
- Rule: classic B3/S23 Conway Life with Rainbow hue inheritance.
- Shake moves life in 3×3 blocks (1–3 steps) and plants viable sparks so the board does not die instantly.
- Physical shake detection is relative to resting acceleration (scale-free), so it works across IMU backends without per-chip thresholds.
- A restrained colored background and edge feedback add atmosphere without particle halos or on-screen chrome.
- Tile density is panel-aware: about 900 cells on RGB framebuffer panels and about 240 on SPI/QSPI panels.
- SPI/QSPI panels automatically use horizontal dirty-band presents, final-state transitions, and a lower default cadence; RGB framebuffer panels retain the richer high-frame-rate path.
- Single-device port of the original web demo; multi-tile linking is out of scope for this Lua skill.
References
- Play and control details:
read_file("{CUR_SKILL_DIR}/references/gameplay.md")
Signals
- GitHub stars
- 34
- Forks
- 17
- Last commit
- Sep 2026
Advanced
- Item type
- skill
- Key
game-of-life- Source
- github.com/espressif/esp-claw-skills-lab
github.com/espressif/esp-claw-skills-lab