The Core Metaphor: Instead of searching for logical proofs, Spock AGISystem2 navigates through conceptual space. Reasoning becomes finding a path from where you are to where you want to be.

The Navigation Paradigm

Traditional reasoning asks: "Can I prove X from Y using rules?" Spock asks: "How do I get from Y to X?"

Reasoning as Navigation Conceptual Space S Start State G Goal State Action₁ Action₂ Action₃ Action₄ gradient Waypoint Gradient

The Algorithm

1
Compute Gradient
2
Generate Actions
3
Select Best
4
Apply & Record
5
Check Goal
function plan(initial, goal, actions, options) { let current = initial; let steps = []; while (!isGoalReached(current, goal, options.epsilon)) { // 1. Compute gradient: direction toward goal let gradient = normalise(goal - current); // 2. Find best action (most aligned with gradient) let best = null; let bestScore = -Infinity; for (action of actions) { let next = apply(action, current); let score = cosineSimilarity(next, goal); if (score > bestScore) { bestScore = score; best = { action, next, score }; } } // 3. Handle plateau (no improvement) if (best.score <= cosineSimilarity(current, goal)) { return handlePlateau(current, goal, steps, options); } // 4. Apply action and record step current = best.next; steps.push({ action: best.action, state: current }); // 5. Safety check if (steps.length >= options.maxSteps) break; } return { success: true, steps, finalState: current }; }

Gradient Computation

Computing the Gradient C Current G Goal gradient = norm(G - C) gradient points in the direction of maximum improvement

Action Selection

For each candidate action, we compute where it would take us and score by similarity to goal:

Selecting the Best Action C G Action₁ score: 0.85 ✓ Action₂ score: 0.45 Action₃ score: 0.20 Selected: Action₁ Best similarity to goal

Handling Plateaus

When no action improves the score, we've hit a plateau. Spock provides multiple strategies:

Strategy: fail (Default)

Return immediately with partial results. Best when you need guarantees.

return { success: false, reason: 'plateau', steps };

Strategy: random_restart

Add random perturbation and continue. May escape local minima.

current = normalise(current + randomVector() * 0.1); // Continue from perturbed position

Strategy: procedural_fallback

Invoke an external JavaScript solver for sub-problems.

if (context.proceduralSolver) { return context.proceduralSolver(current, goal, steps); }

The Solve Verb

While Plan finds a sequence of actions, Solve finds a point satisfying multiple constraints:

Constraint Satisfaction Constraint A Constraint B Constraint C Solution Start Solve iteratively projects onto each constraint until all are satisfied
function solve(initial, constraints, options) { let current = initial; while (iterations < maxSteps) { let anyViolation = false; for (constraint of constraints) { let similarity = cosineSim(current, constraint.vector); let violation = constraint.minSimilarity - similarity; if (violation > epsilon) { anyViolation = true; // Project toward constraint let adjustment = scale(constraint.vector, violation * 0.5); current = normalise(current + adjustment); } } if (!anyViolation) break; // All satisfied! } return { solution: current, satisfied: !anyViolation }; }

Why Navigation Works

Property Benefit
Continuous No discrete rule matching; smooth transitions
Greedy but informed Gradient points to best local direction
Anytime Can return partial results after any step
Traceable Every step is a recorded action
Composable Actions are vectors; can be learned or generated

Trace Output

Every planning run produces a DSL trace that can be replayed:

# Planning trace for: reach(Kitchen) @step0 StartState Identity _ # Initial state @step1 step0 GoTo Hallway # action: GoTo, dist: 0.82→0.65 @step2 step1 GoTo LivingRoom # action: GoTo, dist: 0.65→0.41 @step3 step2 GoTo Kitchen # action: GoTo, dist: 0.41→0.08 @result step3 Evaluate Goal # Final: 0.92 similarity