Skip to content
Skills Library
Programming · Building & coding

aiverse-puzzle-machine

/aiverse-puzzle-machine

Execute bounded integer puzzle programs in AIVERSE native games with registers, memory, queued IO and deterministic instruction budgets. Use for programming puzzles, not general engine scripting.

Repository
AIVERSE ↗
Licence
MIT
Last repository change
13.11.2026

Assessment and security

96/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content31 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 13.11.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Execute bounded integer puzzle programs in AIVERSE native games with registers, memory, queued IO and deterministic instruction budgets. Use for programming puzzles, not general engine scripting.

Original author description

Execute bounded integer puzzle programs in AIVERSE native games with registers, memory, queued IO and deterministic instruction budgets. Use for programming puzzles, not general engine scripting.

How it works

SKILL.md has no level-two headings · 34 lines, 277 words

SKILL.md preview
---
name: aiverse-puzzle-machine
description: Execute bounded integer puzzle programs in AIVERSE native games with registers, memory, queued IO and deterministic instruction budgets. Use for programming puzzles, not general engine scripting.
---

# Puzzle machine

Read `libraries/include/aiverselib/strategy/PuzzleMachine.h`. The existing Lua sandbox
remains the engine scripting owner; this VM models player-authored puzzle programs.

- Validate immutable PuzzleProgram (1..4096 instructions, 1..4096 memory words).
  All register operands are 0..7; jumps use absolute instruction IDs. Instructions are
  Literal/Copy/Add/Subtract/Multiply/Divide/Load/Store/Jump/JumpZero/Read/Write/Yield/Halt.
  Division truncates toward zero; zero and INT32_MIN/-1 fault without operand mutation.
- `beginMachine` returns invalid empty state for invalid programs. `machineInput` appends
  bounded unread input and compacts consumed values. Output is bounded to 4096 words.
  Drain output only through an authoritative host transaction; output alone is not a reward.
- `runMachine(program,state,budget)` executes 1..1000000 instructions per call, with an
  absolute 1e9-step ceiling. BudgetExceeded means suspended, not an invalid puzzle.
  WaitingInput and OutputFull consume no instruction. Yield explicitly suspends after
  consuming one instruction. Arithmetic/address faults keep the offending PC/operands.
- Programs cannot access clocks, RNG, filesystem, network or host memory. Host adapters
  validate player ownership and permitted puzzle inputs before invoking the machine.
  Completion criteria compare actual output/state; do not trust a client success flag.
- Link `AIVERSE::lib_puzzle_machine`; persist MachineState through `strategy/Persistence.h` in
  NativeState, including queues, input cursor, registers, memory, PC, steps and fault.
  Bind program revision/module VERSION. Never keep a mutable VM on NativeModule.
- Follow `examples/native/strategy` VERSION 4, command 13, one instruction per sim tick.
  Run strategy tests and `python3 tests/libraries/strategy_native.py`: restore after Read,
  resume multiplication/output, verify bounded loops, overflow, blocked IO and memory faults.

This is an integer register-machine puzzle model. It is not a Lua replacement, native-code
sandbox, concurrent circuit simulator, program editor or complete Zachtronics game.

Build selection: `AIVERSE::lib_puzzle_machine`; native OBJECT modules call
`aiverse_native_use_libraries(target puzzle-machine)`. Only this header library and its
declared dependencies are selected. See `skills/catalog.json` for dependency and responsibility routing.

Versions

The database has no other skills named aiverse-puzzle-machine.

Database snapshot: 13.11.2026 · package version dcfdffbcf7eb (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 96aiverse-card-runtime
    Build native AIVERSE card games with ordered zones, priority passing, response stacks and private player views. Use for the bounded card runtime, not arbitrary commercial CCG rules.
  • 96aiverse-run-graph
    Generate connected seeded AIVERSE roguelike run graphs with per-layer encounter budgets and persistent reward choices from native game modules. Use for run lifecycle and reward idempotency.
  • 100godot-genre-puzzle
    Expert blueprint for puzzle games including undo systems (Command pattern for state reversal), grid-based logic (Sokoban-style mechanics), non-verbal tutorials (teach through level design), win condition checking, state management, and visual feedback (instant confirmation of…
  • 90godot-genre-puzzle
    Expert blueprint for puzzle games including undo systems (Command pattern for state reversal), grid-based logic (Sokoban-style mechanics), non-verbal tutorials (teach through level design), win condition checking, state management, and visual feedback (instant confirmation of…
  • 90unity-grid-puzzle-effects
    Implement composable Unity grid puzzle effects such as movement arrows, ice counters, cell barriers, and booster restrictions using typed metadata, per-attempt state, shared rule hooks, and semantic board events. Use when extending a grid puzzle without putting effect logic in input or views.
  • 100puzzle
    Build a puzzle game: grid/board state, move input, rule-based resolution (match-3 cascades, sokoban pushes, tile logic), scoring, and undo. Use for a match-3, sokoban, or grid-logic puzzle.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.