September 24, 2019

What Robotics enthusiasts can learn from model railroad



On the first look, both domains have nothing in common. Robotics is focussed around artificial intelligence, and writing software for a real robot is only one applications under many. In contrast, model railroad is primarely a mechanical toy not equipped with artificial intelligence. Both domains have weaks and strength which fits together very well. For example, the robotics community has the problem, that they have developed advanced software for creating neural networks, experts systems and AI programming languages, but they have no idea what to do with the technology in a real project. In contrast, model railroad experts are well equipped with practical applications but what is missing is a theoretical concept.

It's obvious to combine both domains into a single one. In the literature it is called a rail guided robot, or a digital model railroad. It depends from which point of view the subject is discussed. One option is to put existing AI technology into a model railroad. That means to control the trains with neural networks. The other option is, to put existing train tracks into a robotics project. this results into railway guided vehicles.

The reason why a combination make sense is because the foreign domain can solve the issue from the home domain. Let us give some examples. In robotics, the main problem has to do with the large state space. Suppose, a walking robot was constructed which contains of 20 dof. THe problem is, that nobody knows how to control such a complicated device. Sure, the AI Community has developed many frameworks but using them for control a concrete robot is complicated. The situation will become much easier if the idea is not to control a walking robot, but an electric train. A train is equal to a half degree of freedom. The speed value can become zero or slow moving ahead. More is not needed.

Now, let us observe the situation from the perspective of model railroad experts. A typical model railroad contains of 10 different trains, plus 20 switches on the train track. The problem is, that the average train expert has no idea how to control this system. He can press the buttons manual, but this become a stressful job after a time. The problem is, that within in the railroad community there are no things available like programming languages, cognitive architectures nor neural networks. In most cases the model railroad can't run autonomously. Exactly the missing features are provided by the AI Community. They have developed lots of tool which can control 10 trains plus a handful switches easily. That means, for AI experts, a train track is a very easy problem, which is less sophisticated what they are trained.

Example

A basic setup which can be realized with any model railway system is a locomotive which drives in a circle. From a technical point of view, the motor in the locomotive accepts electric current and this drives the vehicle on the track. The interesting point is, that the locomotive drives in the circle without a steering wheel. All what is needed is the forward movement. This hardware setup can be utilized by AI engineers for realizing a control system. The neural network has to mainstain the speed parameter of the locomotive constant. The result is a neural network controlled electric vehicle. It's a practical application which is useful in reality and it can be realized with a minimum effort of know how.

The most interesting feature is, that each community which is AI experts, and model railroad enthusiasts are not aware that their knowledge is relevant for solving the task. From the perspective of model railroad, a simple circle without any swichtes and with a single locomotive is very easy to realize. They do not assume, that this kind of problem is relevant. And from the other perspective, the AI experts, a neural network which is working with the propagation algorithm is also a bread and butter technology which seems not relevant on the first look. Combinging both technologies together results into something new which is very advanced.

Take a look at the weakness

For understanding why both domains can be combined easily, it's important to take a look at the weakness of each domain. In the model railroad domain there are some tutorials available about how to use virtual model trains and program the vehicles. A short look into the tutorial comes to the conclusion, that the quality is low. That means, railroad experts are bad programmers, they have no idea how to create software, nor how to build artificial intelligence.

The model railroad community is not the only one who has a deficit. In short look into the AI Community and neural networks experts shows, that some documentation is available about how to build physical robots and even cars. The problem here is, that the AI experts have no idea how to realize the mechanical parts nor the electric component. The reason is, that Artificial Intellligence is mainly a software driven technology, but is not located in the reality.

So in general, both domains have a large weakness and the foreign domain can add the missing feature easily. It's important to communicate between both areas back and forth to get access to the missing knowledge.

Entry projects in classical robotics

Before it make sense to explain why model railroad is a good starting point, there is a need to describe low entry projects in robotics. A beginner friendly project which is not too complicated is the Micromouse competition. The aim is to control a wheeled robot in a maze to the goal. Another easy to realize robotics projects is a line following robot which can be build with Lego Mindstorms. The interesting point is, that with model railroads, the entry barrier can be lowered much more.

The reason is, that a micromouse robot is compared to a train controlled robot and advanced machine. Because the micromouse can drive backward, forward, rotate to the left, rotate to the right. And addtionally, there are obstacles available. Creating the control algorithm which can handles there requirements is compared to a biped robot an easy problem, but compared to model train controller and advanced task. Model railroad trains are interesting because they are lowering the control requirements to the minimum. They are more beginner friendly than a micromouse challenge.

Railway as a graph



The reason why model trains can be controlled much easier than a micromouse is because a railway network is forming a graph. If we abstract from different sizes and switches, every railroad can be converted into nodes which are connected by arrows. Modelling this in a computer program is a beginner task and routing a packet through the graph is more easier than driving a normal robot to the goal.

The sown graph contains of a small number of train blocks which are connected with switches. What the operator can do is to drive a train on the network and adjust the position of the switches. In contrast to a normal robotics problem, the remote control vehicle has a reduced amount of decisions. The train is not allowed to decide anything, but the path is given by the environment. From a computer science perspective this is a very easy to solve task, much easier than normal AI problems which have a very large state space. Most normal AI problems are open ended tasks. That means, the robot can decide anything and the problem is not specified in detail. In contrast, a routing problem in a graph which on which a vehicle is cruising is the perfect task for AI newbies. Even if they have no idea about reinforcement learning, neural networks or PDDL they can solve the routing problem easily.

A second advantage is, that the hardware for realizing the given graph in reality is available out of the box. All the model train manufactoring companies are able to deliver the needed parts in a great quality. And even more, the consumer can decide between a locomotive in the green color which is older, or new engine which is given in the black color which is available in the reality as well.

What i want to explain is, that railway model is the perfect testbed for teaching Artificial Intelligence to the newbies. It's much better than Lego Mindstorms or the micromouse challenge.