test: add 21 tests for 8 mathematical failure modes of gradient descent on ds²#44
Merged
Merged
Conversation
…nt on ds² Tests cover: Euler blow-up (η ≥ 2/L), gradient explosion near obstacles, kink chattering at obstacle boundary, local minimum traps from gradient cancellation, saddle/singularity stalling, infeasible constraints, scale domination, and topology/homotopy traps. Includes diagnostic instrumentation tests for Δds², gradient norm, and termwise balance. https://claude.ai/code/session_0187MTPaLWyWpKnRn95VBs6f
…in tests ds² is an invariant, not a cost function. The original tests framed all 8 conditions as "failures" — but modes 4-8 are the invariant correctly reporting the geometry: equilibria, singularities, infeasible constraints, scale separation, and topological obstructions. Part A (real failures): Euler blow-up, gradient explosion, kink chattering Part B (correct geometry): equilibrium, Jacobian singularity, infeasibility, component scale separation, topological obstruction Also discovered: exact singularity at θ₂=0 genuinely traps the flow (dist stays at 2.3m), while θ₂=0.01 escapes. Added test for this. https://claude.ai/code/session_0187MTPaLWyWpKnRn95VBs6f
3-DOF arm (ZYY convention) operating in 3D workspace where: - Jacobian is 3×3 with singularity manifolds (curves, not points) - Workspace covers 8 octants (closure at π/4) - Multiple obstacles create genuine topological obstruction Key findings from tests: - Singularity at θ₃=0 is a 1D manifold, not an isolated point - det(J) changes sign across the singularity manifold - 6-obstacle cage creates enclosed target that ds² correctly reports - Moderate Go (15-20) creates equilibria naturally in 3D (vs Go=50 in 2D) - Inner workspace hole (target at origin) is a new infeasibility mode Includes dimensional comparison tests: singularity codimension, octant coverage, and orientation-reversing det(J) sign changes. https://claude.ai/code/session_0187MTPaLWyWpKnRn95VBs6f
…lock 15 tests verifying ds² as the temporal coordinate in (3+1) state space: Time arrow: ds² monotonically decreases → natural ordering, unique trajectory identification, geometric simultaneity across trajectories. Regime discrimination: ds² components identify phase of motion (far-from-target, obstacle-encounter, convergence) without external labels. Adaptation signal: gradient direction, rate of change, and stopping criterion all derived from ds² — system is fully self-contained. Indefinite signature: spatial displacement Δθ² > 0 while Δds² < 0 at >90% of active steps. Extended interval dσ² = Δθ² - (Δds²)² is spacelike during motion. Causal bound |Δds²|/‖Δθ‖ is finite. Fixed-point indexing: moving targets create ds² staircase (jump at switch, descend to new plateau). Obstacle appearance shifts equilibrium. ds² discriminates octant positions. https://claude.ai/code/session_0187MTPaLWyWpKnRn95VBs6f
…l tests The system acts on ∇ds² (the differential) — it never evaluates ds². ds² (the value) is what the observer reconstructs from the trajectory. The indefinite (3+1) signature is the cost of self-reference: the system infers temporal information from spatial structure through the same invariant it's embedded in. Updated all section headers, class docstrings, and test docstrings to maintain this distinction throughout: - TestDs2AsTimeArrow: observer reconstructs ordering from ds² - TestDs2AsRegimeDiscriminator: observer decomposes, system follows ∇ds² - TestGradientAsSoleInput (renamed): ∇ds² is the system's only input - TestIndefiniteSignature: signature is consequence of self-reference - TestFixedPointIndexing: observer indexes equilibria, system follows gradient https://claude.ai/code/session_0187MTPaLWyWpKnRn95VBs6f
Single geometric invariant for Entry-Descent-Landing. No mode switching, no trajectory planner, no state machine. System acts on ∇ds² via multi-step rollout through dynamics. Euler makes soft landing. 7 test categories: timestep sweep, stiffness sweep, sensor dropout, unknown terrain injection, wind gust/impulse, fuel starvation, degenerate geometry. https://claude.ai/code/session_0187MTPaLWyWpKnRn95VBs6f
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.
Tests cover: Euler blow-up (η ≥ 2/L), gradient explosion near obstacles,
kink chattering at obstacle boundary, local minimum traps from gradient
cancellation, saddle/singularity stalling, infeasible constraints,
scale domination, and topology/homotopy traps. Includes diagnostic
instrumentation tests for Δds², gradient norm, and termwise balance.
https://claude.ai/code/session_0187MTPaLWyWpKnRn95VBs6f