Skip to content

Add Puzzle #6: Perbug Sequence Forge (node-seeded, modular sequence puzzle) - #385

Open
ercmine wants to merge 1 commit into
mainfrom
codex/implement-perbug-sequence-forge-puzzle-type
Open

Add Puzzle #6: Perbug Sequence Forge (node-seeded, modular sequence puzzle)#385
ercmine wants to merge 1 commit into
mainfrom
codex/implement-perbug-sequence-forge-puzzle-type

Conversation

@ercmine

@ercmine ercmine commented Mar 27, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Introduce a sixth, modular puzzle type (Perbug Sequence Forge) that plugs into the existing node/puzzle lifecycle and is deterministically seeded from node latitude/longitude.
  • Provide a sequence-focused puzzle family supporting numeric and symbolic rules, transformation layers, concealed steps, and plausibly misleading decoys to enable varied difficulty tuning.
  • Reuse and extend the shared puzzle framework so future sequence/math/logic variants can plug into the same generator/session/result model without duplicating abstractions.

Description

  • Add a lightweight shared puzzle framework with stable seed derivation from node id + lat/lng, puzzle instance/session/result models, difficulty model, and a generator interface (app/lib/features/home/puzzles/puzzle_framework.dart).
  • Implement the Sequence Forge generator module with deterministic family selection, multi-layered rule generators (arithmetic, multiplicative, alternating, symbolic cycle), hidden-step placement, deterministic answer choice / decoy generation (with optional misleading symmetry), difficulty knob weighting, debug metadata and submission validator (app/lib/features/home/puzzles/sequence_forge_puzzle.dart).
  • Wire Sequence Forge into the Perbug flow by extending PerbugGameState to hold puzzle session state and events, adding lifecycle actions (generate, start, select answer, submit, reset, abandon), telemetry & simple reward hook in PerbugGameController, and a polished in-page UI section to generate/show difficulty and solve the puzzle (app/lib/features/home/perbug_game_models.dart, app/lib/features/home/perbug_game_controller.dart, app/lib/features/home/perbug_game_page.dart).
  • Register the new puzzle type in a registry and add focused unit tests that assert determinism, difficulty scaling, hidden-index validity, decoy quality, and validator correctness (app/lib/features/home/puzzles/puzzle_registry.dart, app/test/sequence_forge_puzzle_test.dart).

Testing

  • New automated tests were added covering deterministic generation, node variance, difficulty score response to knobs, hidden-index validity and decoy uniqueness, and submission validation (app/test/sequence_forge_puzzle_test.dart and updated app/test/perbug_game_models_test.dart).
  • Tests were not executed in this environment because Flutter tooling is not available here (flutter: command not found), so no test run succeeded or failed in this rollout.
  • To run the added tests locally or in CI, run: cd app && flutter test test/sequence_forge_puzzle_test.dart test/perbug_game_models_test.dart.

Codex Task

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant