self-sorted arrays

emergent organization through distributed sorting

Sorting as a collective behaviour

Self-sorted arrays show how global order can emerge from simple local rules. Each element is an autonomous cell following a basic sorting algotype (bubble, insertion, or selection) and acting only on its neighbours, with no central view of the array. Order arises bottom-up through distributed swaps.

Sorting as agency

The framing follows Michael Levin and colleagues' work treating classical sorting algorithms as agential material: reframed as populations of agents, they show unexpected robustness, clustering, and delayed-gratification behaviours a monolithic algorithm never displays. The cells here can also mutate, convert, divide, and aggregate.

The calibration panel checks the exact order metrics (sortedness and aggregation); the assumptions panel separates those metrics from the basal-cognition interpretation.

claude opus 4.8February 2024·self-sorting arrays: array elements as autonomous cells that sort themselves through local neighbour comparisons, with mixed algotypes, swap policies, and mutation. Retrofitted with the scientific scaffolding: calibration of the exact order metrics (sortedness and aggregation), a fix to the sortedness comparison, and assumptions framing sorting-as-agency after the Levin-lab work, separating the exact metrics from the basal-cognition interpretation.

Model changelog

v1.0February 2024
  • array elements modelled as autonomous cells that swap with neighbours by local rules.
  • per-cell algotypes (bubble, insertion, selection), swap policies, and mutation strategies.
  • order metrics: sortedness (fraction of increasing adjacent pairs) and aggregation (fraction of like-algotype adjacent pairs).
  • fixed the sortedness metric to compare cell values rather than cell objects.
  • calibration checks sortedness and aggregation against hand-built distributions with known values.