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?"
The Algorithm
1
Compute Gradient
2
Generate Actions
3
Select Best
4
Apply & Record
5
Check Goal
functionplan(initial, goal, actions, options) {
let current = initial;
let steps = [];
while (!isGoalReached(current, goal, options.epsilon)) {
// 1. Compute gradient: direction toward goallet 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)) {
returnhandlePlateau(current, goal, steps, options);
}
// 4. Apply action and record step
current = best.next;
steps.push({ action: best.action, state: current });
// 5. Safety checkif (steps.length >= options.maxSteps) break;
}
return { success: true, steps, finalState: current };
}
Gradient Computation
Action Selection
For each candidate action, we compute where it would take us and score by 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.