Skip to content

Mixed-state presentation: index beliefs by a generic projection - #52

Merged
Autoplectic merged 1 commit into
mainfrom
msp-belief-index
Nov 13, 2026
Merged

Autoplectic merged 1 commit into
mainfrom
msp-belief-index

Conversation

@Autoplectic

Copy link
Copy Markdown
Member

Summary

build_mixed_state_presentation finds a known belief equal to a new one by bisecting a sorted index of numeric beliefs keyed by their first coordinate. When many beliefs share that coordinate (often exactly 0), every lookup scans most of the states, which is quadratic. On some 4-state survey processes the reverse inference then ran for many minutes before reaching its state cap. Those cases hit the survey's 1500 s hard timeout before the (budgeted) pipeline even started.

The index now uses the projection onto fixed positive weights that sum to 1. Beliefs equal coordinatewise to within the matching tolerance (rtol=1e-9, atol=1e-12) project to within the same 1e-9 window, so no match is missed, but ties become rare. The symbolic/numeric split now checks every coordinate rather than only the first.

  • Regression process (4 states): reverse inference reaches a 5,000-state cap in 2.5 s instead of 135 s.
  • Reverse ε-machines (state counts and statistical complexities) of all 100 finite 3-state survey processes are identical to main.

Test plan

  • New test_infinite_reverse_presentation_reaches_its_cap_quickly (fails on main at 135 s, passes in 2.5 s).
  • Mixed-state, ε-machine, bidirectional and properties suites: 209 passed.
  • ruff, ty.

Made with Cursor

Co-authored-by: Cursor <cursoragent@cursor.com>
@Autoplectic
Autoplectic merged commit a3d10ca into main Nov 13, 2026
10 checks passed
Sign up for free to 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