Skip to content

Add q-gauge enumeration scan over topological ε-machines - #5

Open
Autoplectic wants to merge 1 commit into
mainfrom
cursor/q-gauge-enumeration-scan
Open

Add q-gauge enumeration scan over topological ε-machines#5
Autoplectic wants to merge 1 commit into
mainfrom
cursor/q-gauge-enumeration-scan

Conversation

@Autoplectic

Copy link
Copy Markdown
Member

Summary

Adds scripts/scan_q_gauge_enumeration.py, a brute-force search for the maximum of the pure-gauge term I[S+0 : X0 : S-1 | S-0, S+1] over uniform-outdegree topological ε-machines (Johnson et al., 2010). This is the script behind the n3k3 max-q-gauge machine.

Workers cap the reverse mixed-state size and arm SIGALRM, so machines with pathological reverse presentations fail fast instead of stalling the sweep. Progress is checkpointed to JSON as it runs.

While bringing it up to the repo's lint standard I removed the unused _patched_to_bidirectional helper. It built a capped mixed-state presentation and a reverse machine, discarded both, and returned the uncappedBidirectionalEpsilonMachine.from_forward(em) anyway — its own comment records the capped path as an unfinished intention. Nothing referenced it, and every unused-import and unused-variable warning in the file came from inside it. _q_gauge already calls em.to_bidirectional() directly, so behavior is unchanged.

Remaining lint fixes were mechanical: an explicit strict=True on zip, the _Alarm_AlarmError rename for N818, and import ordering.

Test plan

  • ruff check . and ruff format --check . clean across the repo
  • ty check at its 160-diagnostic baseline (no new diagnostics)
  • Smoke run --n 2 --k 2 --workers 2: enumerates all 7 machines, 0 failures, 0 timeouts, writes the JSON checkpoint

Made with Cursor

Brute-force search for the maximum of the pure-gauge term
I[S+0 : X0 : S-1 | S-0, S+1] over uniform-outdegree topological ε-machines
from Johnson et al. (2010). Workers cap the reverse mixed-state size and
arm SIGALRM so that machines with pathological reverse presentations fail
fast rather than stalling the sweep.
Drops the unused _patched_to_bidirectional helper, which computed a capped
mixed-state presentation and a reverse machine, discarded both, and returned
the uncapped BidirectionalEpsilonMachine.from_forward anyway. Nothing called
it, and every unused-import and unused-variable warning in the file came from
inside it; _q_gauge already goes through em.to_bidirectional() directly.
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@Autoplectic