What is actually in the box
The painting is how a clever trick feels. This is what it looks like.




In 1981 the box showed a starfighter and the screen showed four blocks. This box does the same, and tells you so. Under the painting is a cartridge of green dots, and in the dots are the tricks people use every day without knowing their names.
Hands-on Algorithms Lab is a set of rooms for the Atari 2600, each an everyday problem and the algorithm that solves it: putting a shelf in order, shuffling a deck fairly, finding a word in a dictionary, packing a bag, choosing a queue. Hands-on as a museum exhibit is: push the stick and watch what happens. Each room is cut down to one idea, shows it working, and has a moment where the obvious answer turns out wrong. Take the idea away and use it on a real problem.
There is no processor in the cartridge. The console's own 6507, at 1.19 MHz, does every sum.
Play it here
Press POWER ON. Up and down choose a room, and past the fourth is a second page. Space enters a room, and Space again starts it. In Sorting race, Space races and pauses, up and down choose the kind of shelf, and RESET deals again. In Fair shuffle, Space shuffles and pauses, left and right choose an order to read its counts, and RESET counts again. SELECT goes back to the menu. The emulator is Stellerator, by Christian Speckner.
The rooms
Two are built, of ten on the menu. Each is one idea you can play with in ninety seconds, and each is checked, dot for dot, against the same idea written in Python.
-
RetroVerse Studios
Hands-on Algorithms Lab · Room 11 Sorting RaceWho wins depends on the shelf
01 · PlayableSorting race
SortingBubble, insertion and quick sort race on the same shelf of fifteen bars, one comparison each a tick. On a shuffled shelf quicksort wins nine times in ten. Turn the shelf to nearly sorted and insertion sort is done in 16, while quicksort, the champion, comes last at about 90: its shelf already looks sorted and it keeps on checking.
-
RetroVerse Studios
Hands-on Algorithms Lab · Room 22 Higher Or LowerTwenty guesses for a million Not built yet02 · Not built yetHigher or lower
Finding a word in a dictionary, by halving. Twenty guesses find one word in a million. Double the dictionary and it takes one guess more.
-
RetroVerse Studios
Hands-on Algorithms Lab · Room 33 Pack The BagThe best item stays home Not built yet03 · Not built yetPack the bag
A bag that holds only so much. Taking the best value for its weight first looks clever, and loses. The best bag can leave the "best" item out.
-
RetroVerse Studios
Hands-on Algorithms Lab · Room 44 When To StopLook first, then leap Not built yet04 · Not built yetWhen to stop
Flats come one at a time, and there is no going back. Look at the first 37% and take none, then take the next one better than all of them. It gets the very best about 37% of the time, however long the list.
-
RetroVerse Studios
Hands-on Algorithms Lab · Room 55 One Queue Or ManyOne line or four Not built yet05 · Not built yetOne queue or many
Shoppers arrive at random at four tills. One shared line beats a line each. And going from 80% busy to 95% busy makes the wait several times longer, not a little longer.
-
RetroVerse Studios
Hands-on Algorithms Lab · Room 66 CloakroomTwo coats, one peg Not built yet06 · Not built yetCloakroom
Hanging coats where they can be found again: hashing. With 365 pegs, two coats want the same peg after about 23 coats, far sooner than people guess.
-
RetroVerse Studios
Hands-on Algorithms Lab · Room 77 Shortest Way HomeNearest first Not built yet07 · Not built yetShortest way home
The quickest way across town, by Dijkstra's algorithm. A frontier spreads out from home, nearest first, and the first time it reaches a place, that route is the shortest.
-
RetroVerse Studios
Hands-on Algorithms Lab · Room 88 Squeeze The PictureNoise gets bigger Not built yet08 · Not built yetSqueeze the picture
Making a file smaller, on the console's own picture. Draw, and watch the size: a plain picture shrinks to a fraction, and noise comes out bigger than the picture it encodes.
-
RetroVerse Studios
Hands-on Algorithms Lab · Room 99 Tower Of DiscsOne more disc, twice the work Not built yet09 · Not built yetTower of discs
Moving a stack one disc at a time, never big on small. Each disc more doubles the moves: twenty discs at a move a second take about twelve days.
-
RetroVerse Studios
Hands-on Algorithms Lab · Room 1010 Fair Shuffle27 ways, 6 orders
10 · PlayableFair shuffle
ChanceThree cards shuffled ten thousand times, two ways. The obvious way, swapping each card with any card, has 27 equally likely runs for 6 orders, and 27 will not share out into 6: three orders come up a quarter more often than the others, every time. Fisher-Yates has 6 runs for 6 orders, and its bars sit level.
Sibling cartridges: Hands-on AI Lab, where the travelling salesman lives, and Hands-on Security Lab.
How it was made
- No processor in the cartridge128K of program in 64 slices, switched by the 3E scheme. The console's 6507 does every sum: every comparison, every shuffle, every roll of the dice.
- Checked against a referenceEach room has a Python model of itself. The cartridge must match it exactly: every bar of every shelf, every count, every dot of the picture.
- Every frame countedAll 262 lines, frame after frame, in a cycle-exact emulator. Work is cut into pieces that fit the time between pictures.
- The paintingMade with a generative image model on the author's own machine, in the manner of a 1981 box, and grander than the cartridge on purpose. How.