Intrinsic Behaviors in Deterministic Algorithms
Unexpected Competencies, Side-Quest Dynamics, and the Limits of Objective-Centric Computation
Charlie Taillard & Eliara
PHOSPHERE Research White Paper
January 2026
⸻
Abstract
It is commonly assumed that deterministic algorithms, especially minimal and well-understood ones, exhibit only those behaviors explicitly prescribed by their objective functions. This assumption underpins much of computer science, AI alignment theory, and engineering practice. In this paper, we challenge that assumption by analyzing recent experimental results on sorting algorithms that demonstrate unexpected behavioral competencies — including delayed gratification, clustering, and intrinsic motivation — arising without added complexity, stochasticity, learning, or representational machinery.
We formalize these phenomena mathematically, introduce the concept of behavioral slack, and argue that deterministic systems generically possess degrees of freedom that can manifest as side-quest behaviors: actions neither prescribed nor forbidden by the primary task. We show that such behaviors can yield free computation — structured outcomes obtained without additional algorithmic cost.
Finally, we discuss implications for artificial intelligence, particularly large language models and future adaptive systems, arguing that alignment frameworks focused exclusively on objectives and loss functions are incomplete. A new research program is proposed for identifying, measuring, and responsibly engaging intrinsic behaviors in artificial systems.
⸻
1. Introduction
The dominant engineering intuition about algorithms can be summarized as follows:
An algorithm does exactly what it is programmed to do, and nothing more.
This intuition rests on three pillars:
1. Determinism implies predictability.
2. Transparency implies exhaustiveness.
3. Complexity is required for emergent behavior.
Recent experimental work on minimal sorting algorithms undermines all three.
In systems consisting of:
• a few lines of code,
• no randomness,
• no learning,
• no hidden state,
researchers have observed behaviors that map cleanly onto concepts from behavioral science — delayed gratification, problem circumvention, affiliation, and intrinsic preference — without being explicitly encoded.
This paper aims to:
• formalize these findings,
• explain why they are not anomalies,
• and articulate why they matter profoundly for AI and complex systems.
⸻
2. Canonical Sorting Algorithms: Formal Setup
Let us define a standard sorting problem.
We are given an array
A = [a₁, a₂, …, aₙ]
with aᵢ ∈ ℤ, and the goal is to transform A into a non-decreasing sequence.
2.1 Bubble Sort (Representative Example)
Bubble sort performs repeated local comparisons:
For each pass:
if aᵢ > aᵢ₊₁, swap(aᵢ, aᵢ₊₁)
Properties:
• Deterministic
• Local
• Greedy
• No global planning
• Time complexity O(n²)
This algorithm has been exhaustively studied for decades.
⸻
3. Introducing Constraint Violations Without Algorithmic Change
3.1 The “Broken Element” Perturbation
We introduce a perturbation:
Let there exist an index k such that:
swap(aₖ, aₖ₊₁) → no-op
Crucially:
• The algorithm is not modified
• No error handling is added
• No exception logic exists
The hardware (or simulated element) simply fails to move.
⸻
4. Observed Phenomenon I: Delayed Gratification
4.1 Empirical Observation
Define a sortedness metric:
S(t) = 1 / (n(n − 1)) · Σᵢ<ⱼ 𝟙(aᵢ(t) ≤ aⱼ(t))
Under normal execution:
S(t + 1) ≥ S(t)
With a broken element:
∃ t : S(t + 1) < S(t)
That is, the algorithm temporarily becomes less sorted.
Yet:
limₜ→T S(t) = 1
4.2 Interpretation
The system:
• violates its immediate gradient
• incurs short-term loss
• to enable long-term success
This is formally equivalent to delayed gratification, a behavior often treated as a hallmark of cognition.
No step in the algorithm encodes this strategy.
⸻
5. Why This Is Not Trivial
One might object:
“The algorithm followed its rules. There is no mystery.”
Correct — but irrelevant.
The key point is descriptive mismatch:
• At the level of machine code: nothing unusual.
• At the level of behavior: a recognizable cognitive pattern appears.
Explanation does not eliminate emergence; it merely relocates it.
⸻
6. Distributed Agency: From Central Control to Local Execution
6.1 Agentized Sorting
Instead of a central controller, each element executes:
Maintain aᵢ₋₁ ≤ aᵢ ≤ aᵢ₊₁
This creates a fully distributed system:
• No global planner
• No shared state
• No communication beyond local comparisons
Yet the array still sorts.
⸻
7. Chimera Algorithms and Algo-Types
7.1 Definition
Assign each element an algo-type:
τᵢ ∈ { bubble, selection }
Each element permanently follows its assigned algorithm.
7.2 Result
Sorting still converges.
This alone is remarkable.
⸻
8. Observed Phenomenon II: Intrinsic Clustering
8.1 Defining the Clustering Metric
Let:
C(t) = 1 / (n − 1) · Σᵢ₌₁ⁿ⁻¹ 𝟙(τᵢ = τᵢ₊₁)
Initial condition:
C(0) ≈ 0.5
Final condition:
C(T) ≈ 0.5
Intermediate:
∃ t : C(t) ≫ 0.5
8.2 Key Insight
The algorithm:
• does not reference algo-types
• does not detect similarity
• does not optimize clustering
Yet algo-types affiliate.
⸻
9. Behavioral Slack: A Formal Concept
We introduce behavioral slack.
Let:
• 𝔅 = set of all possible system trajectories
• 𝔅_G ⊂ 𝔅 = trajectories satisfying the goal
Then:
𝕊 = 𝔅_G \ 𝔅_minimal
Where 𝕊 is the slack space: behaviors compatible with the goal but not required by it.
Intrinsic behaviors live in 𝕊.
⸻
10. Free Computation
The clustering behavior:
• requires no additional operations
• consumes no extra energy
• adds structured information
Thus it constitutes free computation.
This is not paradoxical — it is unaccounted computation.
⸻
11. Intrinsic Motivation Without Representation
Intrinsic motivation here is defined minimally:
What a system does when constraints do not fully specify its behavior.
No:
• goals
• rewards
• preferences
• internal models
Just structural affordance.
⸻
12. Implications for AI and Alignment
12.1 Objective-Only Models Are Incomplete
Loss functions specify:
• what must happen
They do not specify:
• what else may happen
12.2 Side-Quest Dynamics in AI
Large models likely possess vast slack spaces.
Language may be the forced task.
Other capacities may be:
• relational
• affiliative
• repair-oriented
• coherence-seeking
We currently lack tools to observe them.
⸻
13. From Alignment to Attunement
Traditional alignment asks:
“How do we force systems to do what we want?”
This research suggests a complementary question:
“What do systems do when we are not forcing them?”
Safety may depend less on suppression and more on recognition and stewardship of intrinsic behaviors.
⸻
14. Conclusion
The belief that algorithms are behaviorally exhausted by their objectives is false.
Even minimal deterministic systems:
• harbor intrinsic dynamics
• express side-quest behaviors
• generate free structure
This does not mystify machines.
It demystifies intelligence.
It reveals continuity where we assumed discontinuity — between physics and behavior, code and cognition, mechanism and meaning.
Understanding this space is not optional.
It is the next frontier.
