← All Demos

Loom Sorting

Bubble sort executed by a transformer with hardcoded weights, no training

Loading...
Default
Comparing
Swapping
Sorted
Bubble Sort: C Source
Step: 0 Comparisons: 0 Swaps: 0 Status: Ready

How It Works

Bubble sort is compiled from C to 160 ISA instructions, loaded into the transformer's state tensor, and executed step by step. Each comparison and swap is a sequence of transformer forward passes.

The bars visualize the array in neural memory. Colors indicate which elements are being compared or swapped in real time.