Turing Machine Demonstrator Mark 2 (TMD-2)

By Nicola King. Posted

As many will know, Alan Turing was a pioneering mathematician who created the renowned Turing machine in 1936, and is considered by many to be the father of modern computer science. Essentially, a Turing machine mathematically models a mechanical machine that operates on a tape. Over the years, others have developed their own iterations of this iconic machine.

Ontario-based Michael Gardi is one such maker who has now created two versions of his Turing Machine Demonstrator (TMD). Acknowledging that there are some other great implementations out there, he wanted to maintain a focus on the real purpose of a Turing machine. “In my humble opinion, the complexity of these excellent and imaginative solutions often detracted from the understanding of what a Turing machine actually does,” he tells us. “For TMD-1, my goal was to demonstrate the idea of a Turing machine with as much clarity as possible. I wanted to build a machine that was simple to program and easy to understand. I was really happy with the way that TMD-1 turned out. I believe it met the stated goals of ‘simple to program’ and ‘easy to understand’. To help accomplish those goals, the machine itself was limited to three states / three symbols, and a small ten-cell bounded tape.”

The next level

With the first version under his belt, Michael then decided to create a version with more potential depth for the Turing machine enthusiast, and TMD-2 was born. “For TMD-2 I wanted to ‘up the ante’,” he says. “My goal was to make a six-state / six-symbol machine with a large 100,000 cell tape. As much as possible, I tried to bring forward the simple-to-use, easy-to-understand principles from TMD-1.”

Mounted onto the back of the State Transition Table box, the articulated camera arm is a design by Chris Rogers

His TMD-2 makes use of a Raspberry Pi 3, an Official 7-inch Touch Display for the user interface, and a Camera Module mounted on an articulated arm above a ‘State Transition Table’ box. The latter can hold one of a selection of table cards 3D-printed by Michael, along with a set of alphanumerical tiles to place on them. The camera scans the current state of the machine, which is read using the Tesseract OCR (optical character recognition) library. The resulting computations are then shown on the Touch Display.

Python program

“At its heart, TMD-2 is a standalone program written in Python,” says Michael. “If you just want to try the application, it will run on any computer that supports Python (which is most machines). Running it on a Raspberry Pi is extremely easy, since both Python and the Pygame library it relies on are already part of the Raspbian [now Raspberry Pi OS] distribution.”

The computations are shown on screen, with the ‘tape’ at the top moving left and right to read and write zeroes and ones, as determined by the table of instructions

While Michael has had some great feedback on TMD-2 following his posts on Hackaday, Hackster, and Instructables, he says, “Unfortunately, with the Covid-19 restrictions here I have not been able to show these projects to friends at my local makerspace which is where I would normally get the best feedback (both good and bad!). My son and daughter-in-law worked through the Quick Start Guide for TMD-2 and ‘programmed’ some of the challenge exercises. They are both avid gamers and said that it was a lot of fun, ‘like a game’.”

His TMD-2 is a truly fascinating make based on a seminal invention that, arguably, laid a solid foundation for development of the computers that we use today. What could be more inspiring?

From The MagPi store