CULET: Cubelet Lego Turing Machine

In this paper, we show the construction of CULET: a robot that simulates the execution of any 2-symbols Turing machine. CULET is constructed with Cubelets (small autonomous robot-cubes used for teaching basic robotics and programming for kids) and Lego bricks. Cubelets are a kind of high level programming where you do not use traditional code but rather achieves different robots trough the concatenation of blocks, i


Introduction
In the history of Turing machines an ample number of physical mechanical devices have been developed. Indeed, during the Turing's 100th birthday, Lego built an autonomous mechanical Turing machine adding binary numbers in 2012 year 1 . So we, inspired in the idea of machines self-reproducing from cellular automata theory 2 , construct the robot CULET, a robot based in small robots-cube Cubelets and some pieces Lego. The main feature of this proposal is that it is the first machine constructed with robots and bricks. This way, this robotic machine is able to simulate the function of other machine: machines simulating machines. Cubelets, helped with pieces Lego, proof how a robotic machine is able to simulate an abstract computable machine. The brain of this robot is concentrated in a cube which can read and other two cubes that move the head and the arm (write). Of course, these cubes need be re-programed for each table of transitions.
For the implementations we programming two special Turing machines. The first one is a universal Turing machine able to simulate the behaviour of a complex elementary universal cellular automaton known as Rule 110 3 . The second Turing machine programmed in CULET doubles the number of ones in the tape. The paper has the next structure. In Section 2 we introduce quickly the Cubelet robots and describe the Turing machines implemented. Section 3 describes the design (hardware and software) and finally in Section 4 we give some final remarks.

The Cubelets
The Cubelets are small cubes designed to teach fundaments of robotics and programming to kids. Each cube has a different functionality; the general idea is to construct robots only through the concatenation of different cubes, this way Cubelets can be represented as a formal language, where every valid construction is a valid expression in the language, thus we can see an unlimited number of possible robots. This can be seen as a high level of programming: the child does not modify the original program of each cube, but instead, use this program together with the interaction among cubes for produce a new robot. The different cubes are classified in three categories 4 :  Input sensors: cubes used for obtain data from the environment. The most common are the distance and light sensors.  Actuators: cubes used for make movements, e.g. drives or rotators.  Thinkers: cubes for make computations. Some of them are inverters, maximum, minimum, etc. A single cube communicates with his neighborhoods through a shared channel that is established in the concatenation of blocks. The input sensors publish his reading thought the channel; the thinkers obtain these readings, make his computation, and send the information to the actuators.
Another, less popular, approach is to reprogram the cubes for obtain different behaviors. This reprogramming is done in C or Scratch-like code. The CULET, which is described in the next section, follows this approach. In Ref 5 is described the API for programming the cubes.

Universal Turing machines
The Turing machines was invented by Turing in 1936 6 to solve problems about completeness and decidability. A Turing machine is a finite-state machine associated with an external memory medium, an infinite tape divided in a Some other standard literature, like Ref. 8, defines the machine in terms of quadruples instead of quintuples.
squares. The machine move in the tape and the head read the value in each square sequentially 7 . Formally, the Turing machine is a set of quintuples of the form: Where q is the set of states, s is the set of symbols and d indicates the direction of movement of the head in the tape (right or left); i is the time step. So, the first two elements of the quintuple indicate the current state and symbol, the next two elements indicate the following state and symbol, and the last one indicates the direction of movement a .
One of the greatest achievements of Turing's work is the conceptualization of the so called universal machines. A universal machine U can do everything that any machine can do. U receives as input two things, a description of a machine A, and the input for that machine M; and, as output U puts on the tape the same thing that the machine A would put when have as input M.

Elementary cellular automata
Cellular automata were invented by von Neumann in Ref.
2 as, ironically, a mean for study decentralized systems and been able of design non-von-Neumann-style computers. The cellular automata consist of a grid of square cells, each of which is a finite-state automaton (the same rules for all the cells simultaneously) and where the state of each cell in the next generation depends on his current close neighborhood. Von Neumann was developed a very complex automaton with 29 states evolving in two dimensions.
Another important event in cellular automata history is the popularization of Conway's Game of Life in the 70's 9 . This is a cellular automaton with only two states and a neighborhood of eight cells (Moore neighbourhood). The popularity of this automata comes given his very complex and unpredictable behavior from simple rules. Conway demonstrated the universality of this automata constructing a register machine in Ref. 10.
In the 80's years, Wolfram invented the elementary cellular automata as an effort for understanding the dynamics of cellular automata 11 . This is an extremely simplified version of the previous studies: the space is unidimensional (a row of cells) and the neighbourhood consist exclusively on the two closest cells of each.
Wolfram hypothesis was that if we cannot understand such minimal models, then we could never understand bigger ones. The interesting part comes when even in those small automatons are still, in some of them, very complex behavior.

Universal ECA: rule 110
In Ref. 12 Cook proofed that the elementary cellular automaton Rule 110 is universal. The proof consists in showing how, with particle interactions 13 typical of the rule, emulate the operation of a cyclic tag system. This one is the smallest cellular automaton proofed computationally universal simulating a very sophisticated sequential machine by particle collisions in one dimension. This way, a new machine was invented to simulate a computable function known as cyclic tag system in this automaton, for details see Ref. 12  (1, S11, R) X The Table 1 shows the transition table of the machine implemented. Every generation in which the head of the machine reaches a right end, a new generation of the rule 110 is computed. There are some considerations with respect to this machine: the initial condition and the representation of the cellular automata symbols. The initial condition of the machine must be, from left to right, an infinite string of zeros, the encoded version of the initial that the machine is going to emulate, and an infinite repetition of the string "10". A "1" of the cellular automata is represented like "11" in the machine, and a "0" like "00"; the symbol "10" is used like a blank symbol.

A duplicator Turing machine
A duplicator Turing machine was used by Rendell as part of the Turing machine constructed in the Game of Life cellular automaton, for details see Ref. 17. We implement this machine in CULET. In Fig. 1, we show a 3-symbols version: it starts advancing to the right, for each one scanned, it put another one in the left until there is no more ones to the right. For the implementation in the CULET we used a 2-symbols version of this machine.

General description
In the Fig. 2.1 we show a snapshot of CULET. The tape is represented as an array of Lego blocks over rectangles of black paper; the position of the block (front or back) indicates the symbol on the cell (zero or one respectively). The Cubelet car moves through the tape reading and writing in the tape; the read process is achieved with a distance sensor that test the position of the Lego block under scanning; the writing is done with a lever of Lego and a rotate cube: depending on the desired symbol, the leaver push or pull the block of the tape. The movement across the tape is done with a couple of wheels that move in right or left direction. In the backwards of the car is attached a rail that helps to maintain the alienation of the car with respect to the tape.

Hardware
In the Fig 2.2 we show a picture of the cubes needed by the CULET: a couple of batteries, a couple of drives, two distance sensors, one rotator, one passive and one light. In figure 2.3 are shown the Lego components needed (from left to right): a rail of 4 blocks width; a stabilizer car (it must go over the rail); a leaver; the symbols of the

Software
As we point out in the previous section, we reprogram some of the cubes for obtain the desired behavior. The central cube, the one that has encoded the production rules of the Turing machine, is the rotator. In the state diagram of the Fig. 3 we show the stages of the program of this cube. The scan operation is achieving reading the value of the sensor that is pointing to the cell; the other sensor, the one that is pointing up, control the movement of the leaver: it stablishes when stop moving the rotator motor; both sensors have the original program. The other two cubes that have custom programs are the motors; they receive instructions from the rotator: if they receive a 1, they move to the right; if they receive a 2, they move to the left; a 0 indicates stop moving.
The car starts with a cell below the reading sensor; it scans the position of the block and determine the next action: write a one, write a zero, or doesn't write anything; then, it moves left or right and start over again. The decisions of this automaton (the symbols to write, the directions to move) are determined accordingly to the automaton of the machine that is being executed; thus, in any moment, there are two descriptions of the program working at different levels: the low level one, that determines the behavior of the hardware components (move left, move right, scan, write); and the high level one, which is given by the rules of the Turing Machine.

Final Remarks
We develop a robotics Turing machine named CULET, able to simulate any 2-symbols Turing machine. CULET is constructed with autonomous cube robots Cubelets