A robot turns relative to its facing
Distinguish movement from turning and check the instructions in order.
The video could not load. Check your connection and try again, or download it directly.
Download video
Open Chinese transcript
- 机器人站在左下角的A一格,先面向右。每走一格,就到旁边一格,不能斜走。
- 第一条,前进两格。先到A二,再到A三。前进两格,要移动两次,不能把起点也数进去。
- 第二条,左转。左转时先不走,只转身。它原来面向右,转向自己的左边后,就面向上。
- 第三条,再前进一格。现在面向上,所以从A三走到B三。这就是终点。
- 左转,说的是机器人自己的左边。不是让它直接往画面的左边走。先看朝向,再决定怎样转。
- 把三条连起来检查:右走两格,原地左转,再向上走一格。每条指令都做到了,才算走对。
Sources for this explanation
Logical thinking
Left is relative to the robot. Turning changes its facing while leaving its cell unchanged.
Worked example
In a 3×3 grid, row A is at the bottom and C at the top; columns run left to right. Start at A1 facing right: forward two, turn left, forward one.
Move through A2 to A3, turn to face up, then move to B3.
Try one question
Turning does not move it; the final upward step takes it from A3 to B3.