What is it?

Inspired by the Turing machine described by Alan Turing and other simple computational models like the lambda calculus or rewriting logic we’re providing a simple device that explains theoretical computer models to the normal non-geek guy or gal in an easy to understand and visible way.

Final Presentation

Well, at least that was the idea. The real implementation turned out to be painstakingly difficult, so we settled on something more achievable in the given frame of time: A primitive sorting machine that can separate black and white wooden tokens. The idea behind this was to keep the original plan of the computational machine, while simplifying the software and cutting the necessary hardware in half. The machine in its current state can therefore be seen as a proof of concept that could be connected with an identically manufactured copy of itself, requiring only minimal software changes to simulate simple computational models in a physically observable form.

Watch The Ambient Stack Machine in Tech & Gaming  |  View More Free Videos Online at Veoh.com

How does it work?

In our scenario we’re working with black and white mill stones known from the famous mill board game. The mill stones rotate in a carousel and are being sorted out under certain circumstances. Our very first goal was to just sort out the black mill stones and leave the white ones within the cycle. So how did we accomplish our goal and how does the machine work?

First prototype made out of cardboard

First of all we cut a round perspex plate on where the stones can rotate in a cycle. Several layers of perspex plates follow on top of that, each with a different shape to provide borders and sockets for the rest of the machine to build upon. In order to push the mill stones there’s an electric motor (actually extracted from an old printer) in the center of the platform which drives a small gear on the outside of the machine, which then drives a giant gear in the middle of the plate, thereby transforming the motor’s fast but weak spin into a slow but powerful movement. On top of the bigger gear we’ve installed something like a broom that pushes the stones. We would’ve never thougt that this simple mechanism turned out to be the most time consuming part of our project, but compared to the electronics and the software, the mechanical construction took up most of our time.

The motor spins - but waaay to fast...

But once the carousel was up and running, we needed to figure out the sorting algorithm: In order to remove the appropriate stone from the carousel we labeled every token with QR-Bar-Codes. Then we cut an exit at one point of the perspex plate and placed a web cam over this position. Finally we built a little gate and a kick-mechanism to kick the mill stone through the gate out of the cycle.

Example tokens with QR codes

For instance when a black mill stone comes across the web cam reads the QR-Code, the carousel stops and the kick-meachnism kicks the stone through the open gate. Then the gate closes and the carousel starts rotating again. After a few rounds all black stones are removed and just the white ones remain. As a funny feature we installed a push button known from game shows to be able to start and stop our carousel.

Values and Potentials

While the value of separating white and black tokens may seem dubious at first, the prototype in its current incarnation does indeed offer a lot of potential. It has been proved that the hardest part (the mechanics and general construction) can be made to work, which enables further experiments with the software. The separation of the tokens was the only application that could be implemented in the remaining time after construction, but it should be seen as a placeholder rather than as the final destiny. With the QR code camera recognition and the sorting actuators in place, the machine can after all act like any kind of (primitive) computer. It therefore bridges the gap between the rather theoretical, complex underpinnings of modern software and the physical world. A user could place any sequence of tokens in the loop, which represent functions or instructions from the perspective of the computer. These tokens/instructions are then read and processed by the camera – just like in a real personal computer – but the evaluation of these tokens instructions can be witnessed by the user in a way not possible in circuits.

The machine in action

The possible underlying computational models are many: A primitive stack machine makes a lot of sense, where tokens represent instructions and the sequence of tokens is the computer’s stack. Instructions can then be pushed/popped from the stack until evaluation halts. Another possible model would be term rewriting, where tokens represent mathematical functions and for every turn of the machine one expression is reduced. Such a kind of term rewriting could even explain abstract theoretical concepts like the Y combinator in a fashion that is immediately understandable for non-computer scientists. A computation becomes a form of play where the computer can be influenced by the placement of simple tokens and no syntax error is ever possible.

Next Steps

Even though the mechanics of the machine worked good enough for the final presentation, the most important next step would be a refinement of the whole construction. Less tape and more perspex would enable a construction that is much more solid, durable and most importantly reproducible. With two identical copies of the machine, the original plan of a stack machine / rewriting machine could be turned into reality without “faking” the buffer of unused tokens by manually adding and removing them from the loop. A different software behavior could then easily simulate different kinds of computing metaphors simply by changing the program and using different QR codes.

3D mockup of decorative stack machine

The ultimate goal would be to turn the machine into some kind of an “ambient computer”: A stylish object with changing patterns of wooden tokens in the two loops that would constantly “rewrite” these patterns. An observer could then appreciate the whole mechanism simply for its aesthetics without any knowledge of the correspondence to a real computer. Whenever the observer removes or adds tokens, the pattern would change, sometimes coming to a halt (= the evaluation/rewriting has finished), sometimes changing constantly (= an infinite loop/recursion). The possibility to “look behind the aesthetics” always remains, but the user does not have to. The machine would therefore transform the abstract concepts of theoretical computer science into a form of decorative art and close the chasm between these two seemingly unrelated fields.