The Hessian Autonomous Engine (HAE) is a lightweight Python prototype implementing the Biological Principle of Least Action (BPLA) paired with Hessian Curvature-Steering.
Rather than relying on discrete state machines (FSMs) or computationally intensive predictive optimization sweeps (such as variational Free Energy Principle models), the HAE projects local obstacles and internal metabolic drives directly onto the agent's velocity command via a single continuous manifold.
The engine uses a nested directory structure where the core mathematical module is packaged directly within the demo space to minimize external import complexity:
uses/
├── prototype/
│ ├── __init__.py # Package entry point (hoists HessianAutonomousEngine)
│ └── agent.py # Core mathematical engine and Euler integration
├── autonomous_agent_navigation_demo.py
├── autonomous_agent_swarm_demo.py
├── autonomous_agent_local_minimal_solver_demo.py
└── autonomous_agent_video_game_npc_demo.py
-
Continuous Homeostatic Coupling: The homeostatic pull (
$w_{\text{charge}}$ ) and velocity scaling scale non-linearly with the energy deficit ($x_e$ ). -
Second-Order Curvature Bypassing: Obstacles are represented as potential fields
$V(\mathbf{r}) = 1/r$ . The agent uses the eigenvectors and eigenvalues of the local Hessian matrix ($\mathbf{H} = \nabla^2 V(\mathbf{r})$) to split movement into radial deceleration and transverse lateral bypassing. -
Symmetry Breaking: When approaching an obstacle head-on, a dot product between the movement intent vector and the transverse direction resolves the bypass decision (
$s \in {-1, 1}$ ).
The repository includes four distinct scenario sweeps demonstrating HAE's features. Below are the actual execution logs generated by the simulation scripts.
-
File:
uses/autonomous_agent_navigation_demo.py -
Context: An agent is tasked with traveling from
$(1,1)$ to$(9,9)$ with an obstacle in the middle. The agent continuously monitors its energy, slowing down as reserves dwindle and returning to the base when homeostatically necessary. -
Execution Trace:
--- Running Scenario: Autonomous Agent Navigation --- Initial Position: [1. 1.], Target: [9. 9.] [Step 000] Pos: (1.08, 1.08) | Energy: 1.994 | Vel: (0.85, 0.84) [Step 020] Pos: (2.84, 2.80) | Energy: 1.858 | Vel: (0.90, 0.87) [Step 040] Pos: (4.71, 4.38) | Energy: 1.992 | Vel: (0.90, 0.51) [Step 060] Pos: (6.63, 5.50) | Energy: 2.186 | Vel: (0.77, 0.91) [Step 080] Pos: (7.97, 7.43) | Energy: 2.060 | Vel: (0.64, 0.97) [Step 94] Target successfully reached at [8.8656413 8.79650389] (Remaining Energy: 1.972)
- File:
uses/autonomous_agent_local_minimal_solver_demo.py - Context: A standard Artificial Potential Field (APF) agent gets stuck when an obstacle is placed directly on the straight-line path to the goal. The HAE resolves this deadlock by projecting movement onto the transverse eigenvalue.
- Execution Trace:
--- Running Scenario: Local Minima Solver Demo --- A standard APF agent gets trapped when force vectors cancel. HAE uses symmetry-breaking lateral eigenvectors to flow around obstacle. [Step 00] Pos: (1.119, 4.998) | Offset from central line: 0.0023 [Step 15] Pos: (2.912, 4.936) | Offset from central line: 0.0639 [Step 30] Pos: (4.329, 4.497) | Offset from central line: 0.5034 [Step 45] Pos: (6.056, 3.892) | Offset from central line: 1.1079 [Step 60] Pos: (7.844, 4.426) | Offset from central line: 0.5738 [Step 68] HAE successfully circumvented obstacle, reaching target.
- File:
uses/autonomous_agent_swarm_demo.py - Context: Multiple agents cross paths simultaneously. By treating peers as moving obstacles, agents bypass each other dynamically using their local Hessian calculations.
- Execution Trace:
--- Running Scenario: Autonomous Agent Swarm --- [Step 00] Positions: Agent 0: (1.11, 5.00) | Energy: 2.194 Agent 1: (8.88, 5.10) | Energy: 1.993 Agent 2: (5.00, 1.13) | Energy: 1.793 [Step 15] Positions: Agent 0: (2.81, 5.01) | Energy: 2.104 Agent 1: (7.05, 5.12) | Energy: 1.893 Agent 2: (5.00, 3.13) | Energy: 1.677 [Step 30] Positions: Agent 0: (4.22, 5.31) | Energy: 2.027 Agent 1: (5.45, 5.64) | Energy: 2.020 Agent 2: (4.97, 5.01) | Energy: 1.930 [Step 45] Positions: Agent 0: (5.08, 4.92) | Energy: 2.367 Agent 1: (3.81, 6.28) | Energy: 1.904 Agent 2: (5.62, 6.30) | Energy: 2.253 [Step 60] Positions: Agent 0: (6.72, 4.87) | Energy: 2.450 Agent 1: (2.11, 5.52) | Energy: 1.800 Agent 2: (5.26, 8.02) | Energy: 2.157 [Step 75] Positions: Agent 0: (8.34, 4.96) | Energy: 2.366 Agent 1: (0.91, 5.14) | Energy: 1.700 Agent 2: (4.99, 9.03) | Energy: 2.065 [Step 78] All agents converged on targets without collision.
-
File:
uses/autonomous_agent_video_game_npc_demo.py -
Context: An NPC patrols between checkpoints
$(2,2)$ and$(8,8)$ . Instead of utilizing hardcoded decision rules, the balance between patrolling and returning to recharge at base$(5,1)$ is handled as a single integrated potential gradient. -
Execution Trace:
--- Running Scenario: Video Game NPC Patrol --- NPC is patrolling between Point 0 (2,2) and Point 1 (8,8) Low energy will prioritize returning to Charger (5,1) dynamically. [Step 0] NPC reached checkpoint, switching to target 1 [Step 000] Pos: (2.00, 2.00) | Energy: 2.30 | Status: PATROLLING [Step 015] Pos: (3.17, 3.16) | Energy: 2.19 | Status: PATROLLING [Step 030] Pos: (4.32, 4.21) | Energy: 2.09 | Status: PATROLLING [Step 045] Pos: (5.60, 4.25) | Energy: 2.00 | Status: PATROLLING [Step 060] Pos: (6.85, 5.61) | Energy: 1.87 | Status: PATROLLING [Step 075] Pos: (7.65, 7.23) | Energy: 1.75 | Status: PATROLLING [Step 78] NPC reached checkpoint, switching to target 0 [Step 090] Pos: (6.69, 6.37) | Energy: 1.61 | Status: PATROLLING [Step 105] Pos: (5.82, 4.64) | Energy: 1.47 | Status: PATROLLING
To run any of the simulation demos from the repository's root directory, execute the script directly using Python:
# Execute Navigation Demo
python uses/autonomous_agent_navigation_demo.py
# Execute Local Minima Resolution Demo
python uses/autonomous_agent_local_minimal_solver_demo.py
# Execute Swarm Coordination Demo
python uses/autonomous_agent_swarm_demo.py
# Execute Video Game NPC Patrol Demo
python uses/autonomous_agent_video_game_npc_demo.py- Local vs. Global Pathfinding: The HAE works as an advanced local reactive path-planner. In complex maze environments, it should be paired with global topological planners (such as A* or RRT) that feed the HAE system local waypoints.
- Hyperparameter Selection: The behavior profiles depend directly on physical metrics (such as
alpha,beta, andsteering_gain). Tuning these values changes the agent's behavior from aggressive foraging to conservative, defensive movement.