Skip to content

Add cancellable deep permuter searches for one function - #137

Merged
RetroGameDeveloper merged 1 commit into
mainfrom
feat/single-function-deep-permuter
Oct 28, 2026
Merged

RetroGameDeveloper merged 1 commit into
mainfrom
feat/single-function-deep-permuter

Conversation

@RetroGameDeveloper

Copy link
Copy Markdown

Summary

Add Deep permuter · this function to the function drawer, with a time limit, candidate-compile limit, live counters and Stop button.

  • Uses the selected function's saved/scored C, in ROM and imported project modes.
  • Bypasses the background instruction ceiling and per-function turn limit for this explicit search only.
  • Visits the full currently generated local candidate list (the background's 20-candidate cap stays unchanged), then runs ordinary random permutations.
  • All improvements and exact matches use the normal compiler/link or imported object judge and save immediately.
  • Scoped cached misses are skipped across deep jobs; failed builds remain retryable, and cached improvements must be rejudged. Scalar cache entries cannot replace measured baseline instruction evidence.
  • Cancellation/time/compile limits release claims and close the generator. The UI retains logs and clears its progress indicator on success, error and cancellation.

The UI and docs explicitly state that arbitrary C rewriting cannot exhaust every possible source program or compiler option. This is a bounded deeper search, not an exhaustive proof.

Investigation

A private N64 project remained at 1,704 matches after the user's latest autopilot pass: zero new matches. Its latest recorded reuse phase ran 120 seconds with zero fresh candidate attempts. All 153 eligible normal near misses had reached their four-turn cap. This feature provides an explicit route beyond that cap without changing global settings or starting paid agents.

A separate warning-enabled compile on a private copy identified an uninitialized pointer in a saved near miss. Advisory compiler diagnostics and faster traversal of cached/indexed reuse work are useful next improvements; they are not claimed as implemented here. No game source, ROM, database or transcript is included.

Validation

  • 93 focused permuter, GUI lifecycle and route tests passed; the final baseline-evidence test also passed in the complete 14-test deep-search module.
  • Tests cover ROM/imported judge routing, keeping improvements, time/compile limits, cancellation, generator cleanup, busy/matched/unscored functions, cache behavior and retryable compile failures.
  • Real compiler/link replay on a private project copy: two four-compile jobs stopped at the requested cap; the second skipped previously judged misses and advanced to new candidates; claims were released.
  • Ruff and git diff --check passed.

@github-actions github-actions Bot added the enhancement New feature or request label Oct 28, 2026
@RetroGameDeveloper
RetroGameDeveloper merged commit 070cc4f into main Oct 28, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant