• Question: What happens if the code in a robot malfunctions?

    Asked by mjs11 to Anna, Brian, Jacob, Jun, Lin, Mackenzie, Nick, Valerie, Yee Whye on 19 Nov 2019.
    • Photo: Valerie Bradley

      Valerie Bradley answered on 19 Nov 2019:

      Lots of things! It depends on the specific code and how it malfunctions. I think the most likely outcome would probably be that the robot stops working or gets stuck on a line of code and can’t move past that. Or, it could be that the robot responds unexpectedly to some situation or input (eg. the robot hits a wall and starts turning in circles instead of, as you expected, just turning enough to keep moving forward). Malfunctions could also happen when a robot encounters a situation or set of conditions that you didn’t anticipate when coding, so responds in some logical (according to the code), but illogical (according to human logic) way.

    • Photo: Nick Hawes

      Nick Hawes answered on 20 Nov 2019:

      I think the key thing is not to think of a code malfunction, since that implies the code itself is wrong. Instead consider that most autonomous robots are collections of tens or hundreds of separate software components, each solving a particular task. A typical malfunction is that one of these components encounters an input/situation in which it doesn’t work as intended so its output is also not as intended. This can then cascade through the system. Other components are working fine, but the inputs they are getting are wrong so the whole system starts to behave in ways that are not what the designer expects.