September 21, 2019

Short introduction into railroad modelling

The amount of information about model railroad is large because the subject has a long history and a large support of commercial companies. In general we can say, that former analog control is working with blocks. A part of the train track can become activated by current and this forces the train to drive forward.

The more modern technology is called digital control. This is working with a data transmission protocol. The current is combined with information packet and both are received by the decoder in the train. It is working very similar to a local area network and each train has a network interface card. The technology is a bit different from normal computer networks because the electric current and the networking information are combined into the same signal. In computer terms it's called powerline https://en.wikipedia.org/wiki/Power-line_communication

What makes model railroad a bit difficult to grasp is because each manufactorer has developed it's own data transmission protocol. Some recent developments are working the Arduino micocontroller but there is a need for a decoder in each train for receive the informations. A possible standard is called Digital Command Control (DCC).

From the outside perspective, DCC is working similar to a WLAN device. Each trains has an imaginary WLAN adress and it's possible to send a signal to it. The difference is, that in case of model railroads the signals are transmitted not over the air, but inside the train track. The reason is, that all the trains are driven by an electric motor and this needs electric current. This is perhaps to most obvious difference to Lego Mindstorms robotics, which are working with onboard batteries. The advantage is, that an electric train can work 24/7.

Model trains for teaching artificial intelligence

From the classical perspective artificial intelligence is teached in the universities with robotics applications. The famous Lego Mindstorms kit is a well known programming environment for creating practical robots. The problem with the robot machinery is, that nobody can define what a robot is. In the history of films, a robot is some kind of futuristic device which comes from outer space. A famous humanoid robot is Lt. Commander Data from Startrek, but the T-800 in Terminator is also a robot.

On the first look the idea of using a robot as an education tool to teach artificial Intelligence make sense, because intelligent machinery is something not available today but should be invented in the future. The disadvantage is that it remains unclear, what a robot is and how to program it.

The better idea is to search for different platform for teaching Artificial Intelligence which is not a robot but a railroad model. A short look into train models have shown, that this kind of toy has a long history. The first electric models were build around 1900 and the time before, purely mechanical railroads were used. Also the community is growing. The latest technological advancement is called DCC control which was invented in the late 1980s. It's a network packet protocol similar to the Ethernet standard for addressing individuals motors on the track.

The normal pattern of utilizing model trains is by manual control. But with a computer in the loop it's possible to automate the process. That is what the tech model railroad club have done in the 1950s. So we can say, that model railroads are an ideal testbed for creating complicated Artificial Intelligence control systems which are working with symbolic reasoning, neural networks, image recognition and so forth. The dominant advantage over the sad Lego mindstorms product is, that model railroads are supported very well by commercial manufactorers. There are endless numbers of starter kits, add ons and realistic model trains available. That means, the community is already there and doesn't need to invented from scratch. In contrast, there is no robotics playing community, because it's harder to do with a robotics kit something useful.

On the first look, it's sounds like too much of complexity to figure out the details of model railroads if the aim is to introduce model predictive control. The advantage is, that even the AI part of the project fails, the model train will work quite well. It's possible to run a model railroad without artificial intelligence in the loop, this makes it easier to approach the subject slowly. Let us compare this with Lego Mindstorms. A robot has the tendency, that without programming the device, the toy will do nothing. If the self written Java code has an error, the Mindstorms robot won't move a single millimeter. This is frustrating and results into failed projects. In case of railroad models, the chance of failure is lowered. The low end education goal is to teach the basics of electrics and physics. And the higher goal is to explain what artificial Intelligence is. This makes a model railroad the natural choice for increased difficulty.