Runaway (1984): When robot experts say they use APL, runaway

September 10, 2018

 

Recommendation: Explore programming languages for robots while letting your inner Crow T. Robot savor this MST3K-worthy Michael Crichton robot movie starring Tom Selleck, Kristie Alley, and KISS’ Gene Simmons

 

Robots: variety of non-anthropomorphic service robots, menacing spider robots

 

 

What’s that you say, Tom Servo?  That Michael Crichton wrote and directed a robot movie that starred Tom Selleck, Kristie Alley, and the obnoxious KISS member with the big tongue, Gene Simmons? Who knew? Pretty much none of us, because it’s a clunker of a movie.

 

In a 20-minutes-into-the-future trope, non-anthropomorphic service robots are everywhere. There are agricultural robots, manufacturing robots, construction robots, and housekeeping robots- and it is great to see robots who aren’t humanoids, where form follows function and there are economic cost constraints.  And when one of those bazillion of everyday robots start to malfunction, the robot unit at the local police force (not a repair shop) is called in to apprehend and deactivate the robot. Apparently requiring off buttons, like the really big red ones mandated by the AUSVI competitions since the 1990s, or better yet remote wireless off buttons will be too complicated in the future.

 

But for the first few minutes of the movie, it seems like Crichton has produced another techno-thriller, worth of the Andromeda Strain and its scary accuracy. Then Tom Selleck’s new partner, the forgettable Cynthia Rhodes, announces she had learned APL in preparation for the job.

 

Game over, man. Game over!

 

APL, the functional programming language developed in the 1960s for handling multi-dimensional arrays, was pretty much dead by then, wheezing out a few breaths on life support on defense contractors’ machines. Crichton had resorted to dropping names rather than crafting a real science narrative. Speaking of a lack of a science narrative, later in the movie, the movie falls back on cheesy spider robots that crawl up walls and then leap onto people and inject acid into their jugular. (see https://youtu.be/bodOMl_o-3g) The pace of the movie is so slow you have plenty of time to wonder how the robots with their sharp pointy metal legs are able to climb the walls and hang upside down. It wouldn’t be until the 2018 reboot of Lost in Space that we would witness such a blatant disregard of physics in a big budget entertainment.

 

So what language do roboticists use to program a robot? Lisp? C++? Python? APL?

 

The answer is “it’s complicated.” Robots are not necessarily programmed with a single language. As explained in software architecture and Vinge’s Long Shot segment in my forthcoming book Robotics Through Science Fiction: Artificial Intelligence Explained Through Six Classic Short Stories, robot software is usually organized into layers, much like with the spinal cord, cerebellum, and cerebrum in a human’s central nervous system. The rapid update rate of the lower layers of reactive behaviors favor a procedural language like C or C++ or the more sophisticated Python. The upper deliberative layers where the robot would be performing more planning and reasoning favor a functional programming language like Lisp developed specifically for those types of applications. If the reasoning is using logic, then those modules might be more efficient using Prolog, a language created specifically for logic. One of the many advantages of a modular approach to programming a robot is that the modules can be in different programming languages, and even run on different processors.

 

One language that has not been used for a serious robot endeavor is APL. APL, or A Programming Language, was developed for mathematical manipulation of arrays and matrices—structures common to image processing and computer graphics. It was part of the gold rush of language development in computer science in the 1960s and 1970s where everyone was building their own language that was explicitly designed to be “more intuitive” to program or execute more efficiently for a particular application. Remember, computer science started off with specialized languages: FORTRAN was for mathematical formula translation and COBOL was for businesses and payroll processing.

 

APL is unique among programming languages for several reasons. One is that it was a functional programming language, a language where the programmer writes expressions similar to recursive mathematical notation- more of a stream of consciousness vibe. Most practical programming languages are procedural, where the programmer declares each variable and specifies each step, often avoiding recursion because it can create problems in memory management. APL used a special keyboard since it represented every function that you perform on an multi-dimensional array with a symbol—both to mirror the mathematical symbology and, theoretically, to make it quicker and easier than typing out “dot_product(a1, a2).” Learning the symbols and finding them on the rubber keypad that you had to overlay on the keyboard was a joy. Not!  The biggest problem was that even for a computer vision imaging problem, there was more to the problem than the complex computations on the image array. For example, you might want to visualize the results, label regions, manipulate your input and output files, cause your robot move, and other niceties. Good luck with that in APL.

 

Figure 1 shows a snippet of APL code to compute prime numbers. It is not intuitive to read. But, on the other hand, it looks like something that would be used in science fiction movie by that the aliens who just blew up the White House.

 

 

While roboticists have not converged on a single language, and are not expected to, there is a movement to converge on a library of algorithms, called ROS, short for Robot Operating System. ROS is not an operating system but rather a framework or toolkit- an App Store for robots if you will. If your programming modules fit the framework, then they could be run in a common simulator and, in theory, be ported to a suite of defense and commercial robots. ROS is open source but the foundation sells their time and effort, mostly to government agencies, in getting existing code into the framework or expanding the framework. Side note: in the DARPA Robotics Challenge, the government furnished ROS simulator didn’t keep up with the changes being made to the government furnished robots and thus if you got your code to work in the simulation, it might not work on the real robot. Kind of defeated the purpose of a simulator. I got to witness a lot of normally milquetoast roboticists forcefully expressing discontent to the ROS representative at a meeting of the competitors.

 

Runaway is a must-see for robot fans just because it is so terrible; it misses the science and a decent plotline by just a little bit and so becomes painfully funny. Some bad robot movies should be avoided at all costs (like Robot Revolution), but this one deserves to be embraced with a crowd of family and friends ready to mock every scene and cheer on those robot spiders! In the meantime, stick with C++ or Python as the most general purpose robot languages.

 

- Robin

 

For a video version of this review, simply click below...

 

 

 

 

Share on Facebook
Share on Twitter
Please reload

  • Grey Twitter Icon
  • Grey Facebook Icon
  • Grey YouTube Icon
  • Grey Instagram Icon
  • Grey Pinterest Icon