An Instruction of Robot Arms' Movement

An Instruction of Robot Arms' Movement


In this section, you will meet a highly-simplified computer. It can be programmed to perform a variety of task within limited capabilities. The instruction set for the robot computer severely restricts the kinds of movement it can make. Nonetheless, you can create a sequence of instructions causing the robot arm to move diagonally across its domain. Here is the robot puzzler. Write a program for the robot that will cause it begin at the upper right corner of the domain and proceed diagonally across the space until it reaches the lower left corner. The robot should stop there with its arms down, facing a wall. Assume the space is square and that there are no doorways. Being limited in its capabilities, our robot can function only in its own special environment. Before we can understand the robot or tell it what to do, we must first have a clear mind of robot's domain, or environment in which it operates.

We gonna continue the last article. After we have a clear mind of robot's domain, like you can imagine, first, an empty room, there is none of furniture or other obstructions. The room is rectangular, having four walls. We will refer to any openings as doors, although technically they are doorways with no means of being closed. The floor of the room is paved in square tiles. Lines delineating the tiles run parallel to the walls and are easy for us to see. Any doors present are exactly one tile wide. Most of the robot arms' movement and capabilities are closely related to the characteristics of its domain. For example, when the robots takes a step, it move from one square floor tile to an adjacent tile. When it turns, it pivots its body but remains standing on the same tile. Just like the sorting robot in express delivery industry, China already had the robot for sorting the package from different address.