Rewind through the descent history #114

Open
Vectornaut wants to merge 2 commits from Vectornaut/dyna3:rewind-history into main
Member

On the incoming branch, you can rewind through the descent history of the last realization using the Step control that's been added to the diagnostics panel.

The starting value of the Step control depends on the realization status. After a successful realization, we show the realized state (the last step). After an unsuccessful realization, we show the initial guess (step zero).

Shortcomings

Awkward factorization of realization results

On the incoming branch, the application gets all the configuration information it needs from the history field of the Realization structure that realize_gram returns. The config field in Realization::result is never read. In fact, the config field is never read from any ConfigNeighborhood structure.

The config field is still used in tests and examples, however, so we compile it conditionally to avoid a dead code warning.

If the history rewind feature ends up being a long-term part of the application, we should refactor the Realization structure to avoid this awkward orgnization. Since this feature is engine-dependent, however, I don't think we should plan for its long-term presence yet.

Nudging from previous steps

On the main branch, nudging requires a valid tangent space. Right now, we only have a valid tangent space for the last step of a successful realization and (usually) the initial step of a failed realization. On the incoming branch, this raises the question of what to do when we try to nudge from other steps. I've chosen an expedient answer: simply disable nudging from other steps.

We can revisit this shortcoming if we find that it might be useful to nudge from other steps, or if we redesign the tangent space system (which I think we should consider at some point).

On the incoming branch, you can rewind through the descent history of the last realization using the *Step* control that's been added to the diagnostics panel. The starting value of the *Step* control depends on the realization status. After a successful realization, we show the realized state (the last step). After an unsuccessful realization, we show the initial guess (step zero). ## Shortcomings ### Awkward factorization of realization results On the incoming branch, the application gets all the configuration information it needs from the `history` field of the `Realization` structure that `realize_gram` returns. The `config` field in `Realization::result` is never read. In fact, the `config` field is never read from any `ConfigNeighborhood` structure. The `config` field is still used in tests and examples, however, so we compile it conditionally to avoid a dead code warning. If the history rewind feature ends up being a long-term part of the application, we should refactor the `Realization` structure to avoid this awkward orgnization. Since this feature is engine-dependent, however, I don't think we should plan for its long-term presence yet. ### Nudging from previous steps On the main branch, nudging requires a valid tangent space. Right now, we only have a valid tangent space for the last step of a successful realization and (usually) the initial step of a failed realization. On the incoming branch, this raises the question of what to do when we try to nudge from other steps. I've chosen an expedient answer: simply disable nudging from other steps. We can revisit this shortcoming if we find that it might be useful to nudge from other steps, or if we redesign the tangent space system (which I think we should consider at some point).
Vectornaut added 1 commit 2025-08-23 04:10:38 +00:00
Rewind through the descent history
All checks were successful
/ test (pull_request) Successful in 3m47s
36036141b5
Owner

This all looks reasonable. Two things:

  • when you're not allowed to nudge and you hit the nudge key, there's no feedback that you just tried to do something that failed. The situation can be confusing because sometimes it's tricky to observe the result of nudging.
  • When the search fails and you are looking at step 0, it seems as though you can't nudge from there, even though presumably it's the same configuration as the result of the last operation, from which you could nudge. This limitation is of practical interest because quite possibly you had a line search failure from too much symmetry in the previous configuration (say two coinciding points that you constrain to have positive distance), and so you just want to nudge to break the symmetry. Instead you have to do some other operation to get back in the nudge-able state, then nudge, then re-try your new constraint.

If either of these is a reasonably quick and simple fix, please go ahead. Otherwise just file (prospective) issues for them (and in any case file a prospective issue for the "awkward factorization" point above) and let me know, and I will merge this PR. Thanks!

This all looks reasonable. Two things: * when you're not allowed to nudge and you hit the nudge key, there's no feedback that you just tried to do something that failed. The situation can be confusing because sometimes it's tricky to observe the result of nudging. * When the search fails and you are looking at step 0, it seems as though you can't nudge from there, even though presumably it's the same configuration as the result of the last operation, from which you could nudge. This limitation is of practical interest because quite possibly you had a line search failure from too much symmetry in the previous configuration (say two coinciding points that you constrain to have positive distance), and so you just want to nudge to break the symmetry. Instead you have to do some other operation to get back in the nudge-able state, then nudge, then re-try your new constraint. If either of these is a reasonably quick and simple fix, please go ahead. Otherwise just file (prospective) issues for them (and in any case file a prospective issue for the "awkward factorization" point above) and let me know, and I will merge this PR. Thanks!
Vectornaut added 1 commit 2025-08-28 07:54:58 +00:00
Nudge from initial step of failed realization
All checks were successful
/ test (pull_request) Successful in 3m36s
43a65eba65
Author
Member

The code now allows nudging from the initial step of a failed realization. I've updated the pull request description accordingly.

The description no longer mentions issue #100, because I noticed that it may already have been fixed by pull request #105. Since #100 no longer has a working reproduction procedure, we can't tell how this pull request might affect it.

The code now allows nudging from the initial step of a failed realization. I've updated the pull request description accordingly. The description no longer mentions issue #100, because I noticed that it may already have been fixed by pull request #105. Since #100 no longer has a working reproduction procedure, we can't tell how this pull request might affect it.
Author
Member

when you're not allowed to nudge and you hit the nudge key, there's no feedback that you just tried to do something that failed. The situation can be confusing because sometimes it's tricky to observe the result of nudging.

I've now filed issue #115, which covers this.

> when you're not allowed to nudge and you hit the nudge key, there's no feedback that you just tried to do something that failed. The situation can be confusing because sometimes it's tricky to observe the result of nudging. I've now filed issue #115, which covers this.
Author
Member

(and in any case file a prospective issue for the "awkward factorization" point above)

This is now filed as issue #116, so I think the pull request should be ready to merge!

> (and in any case file a prospective issue for the "awkward factorization" point above) This is now filed as issue #116, so I think the pull request should be ready to merge!
All checks were successful
/ test (pull_request) Successful in 3m36s
Required
Details
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u rewind-history:Vectornaut-rewind-history
git checkout Vectornaut-rewind-history
Sign in to join this conversation.
No description provided.