[trajectory-grader] Implement recurrence-laminarity - #55659
Merged
pelikhan merged 3 commits intoAug 25, 2026
Merged
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add recurrence-laminarity grader implementation
[trajectory-grader] Implement recurrence-laminarity
Aug 25, 2026
pelikhan
approved these changes
Aug 25, 2026
pelikhan
marked this pull request as ready for review
August 25, 2026 05:38
pelikhan
deleted the
copilot/trajectory-grader-implement-recurrence-laminarity
branch
August 25, 2026 05:38
Contributor
There was a problem hiding this comment.
Pull request overview
Adds the Tier 1 recurrence-laminarity trajectory grader for detecting stagnation through vertical recurrence structures.
Changes:
- Implements canonical state normalization and RQA LAM calculation.
- Handles short and non-recurrent trajectories.
- Marks the grader as implemented in the catalog.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/shared/graders/recurrence-laminarity.md |
Defines the importable grader and metric script. |
.github/workflows/shared/graders/README.md |
Updates implementation status. |
Review details
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Balanced
Contributor
|
🎉 This pull request is included in a new release. Release: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ships
recurrence-laminarity(Tier 1, rank 7) from the trajectory graders catalog. The original generating run produced the grader but failed to push, so the change is re-applied here.LAM isolates stagnation — consecutive steps all matching one earlier fixed state — which none of the built-in graders nor the two already-shipped recurrence graders measure:
recurrence-determinismcaptures ordered repeated subsequences (diagonal structure) andstate-revisit-probability-reponly counts revisits.Changes
shared/graders/recurrence-laminarity.md(new) — self-contained importable fragment with onegraders.recurrence-laminarityentry (unit: ratio,direction: lower_is_better,min: 0.0,max: 1.0) and a pure inline script. Builds the state-recurrence matrixR[i][j] = sequence[i] === sequence[j](line of identity excluded) over the canonical state sequence and returns vertical-line points (length ≥ 2) / all recurrent points. Column-wise scan, ordered-pair counting on both numerator and denominator — same convention asrecurrence-determinism.recurrence-determinism:states[].id,states[].firstEventIndex,events[].index, with fallbacks for string states and missing event indices.messageresult for fewer than four state visits; vacuous0when no recurrent pairs exist.shared/graders/README.md— status flipped toImplemented(7 of 25); no other rows touched.Behavior
The metric cleanly separates stagnation from ordered repetition:
Import with: