Self-Sorting Arrays
Minds Everywhere · Demo 1 of 4 · Basal cognition in a sorting algorithm

Self-sorting arrays: what does a bubble sort want?

Each bar is a "cell" that follows one tiny rule about its neighbors. Nobody runs the sort from above. Mix two rule-types (algotypes) in one array, damage some cells, and watch for behavior nobody programmed: cells of the same algotype quietly clustering together, and sortedness dropping before it climbs, as the array routes around damage.

tick 0
Strip: algotype at each position. Clumps of one color mean the algotypes are aggregating.

Sortedness

Share of neighbor pairs in order. Dips are detours.

Aggregation

Share of neighbors with the same algotype. Dashed line: chance.

0%sorted now
0.50aggregation now
0.50peak aggregation
0detours (dip, then new high)

Is the clustering real?

Run 30 fresh arrays with your current algotypes, then 30 where both colors use algotype A (so color is just a label). If peak aggregation in the chimera beats the label-only control, the clustering comes from the rules interacting, not from chance.

Why sorting?

Sorting algorithms are fully known, deterministic and tiny. If surprising competencies show up even here, we should expect them in cells, tissues and AI systems whose rules we know far less well.

Cell view, not top view

A textbook sort has one controller looping over the array. Here every element runs its own rule in parallel, in random order, seeing only what its rule lets it see. That is the setting of a cell in a tissue, or an agent on a team.

Delayed gratification

With damaged cells in the way, sortedness sometimes gets worse before it gets better. Levin's group reads that as a minimal capacity to move away from a goal in order to reach it.