Convergence & Singularity Handling
In any vector or tension-field-based control system, two major failure modes exist:
- Deadlocks: Opposing forces balance perfectly (e.g. an obstacle directly between the agent and its target), causing zero net force and stuck states.
- Singularities: Mathematical division by zero or infinite gradients (e.g. when distance $d \to 0$ in divisor terms).
Spatioz resolves these issues geometrically.
1. Deadlock Resolution
When opposing force vectors cancel out:
$$\sum{j} T{ij} \mathbf{u}_{ij} = \mathbf{0}$$
Spatioz detects this state by monitoring the derivative of the system's kinetic energy residual. If the residual drops below a threshold $\epsilon$ while the goal remains unsatisfied, a Non-Euclidean Geodesic Perturbation is triggered.
sequenceDiagram
participant E as Engine
participant G as Graph Logic
E->>G: Check Kinetic Energy Residual
alt Energy < epsilon AND Goal incomplete
E->>G: Inject Geometric Perturbation
G->>G: Twist Manifold Metric Tensor g_ij
E->>G: Resubscribe Forces
else Stable Flow
E->>G: Keep Normal Execution
end
The metric tensor $g_{ij}$ is temporarily perturbed by a minor curl field (rotational vector), twisting the manifold. This shifts the balance of forces, allowing the agent to slip around the deadlock barrier.
2. Singularity Handling (Anti-Divergence)
To prevent infinite gradients when a sensor distance is zero, Spatioz enforces soft boundary conditions using a regularization parameter $\delta$:
$$T(d) = \frac{w}{\sqrt{d^2 + \delta^2}}$$
Even when $d = 0$, the denominator evaluates to $\delta$, keeping forces finite and preventing system crashes.