Algorithm 2
Jump to navigation
Jump to search
The behavior that the window cleaning robot should perform when using algorithm 2 can be divided
in the following rough steps:
- The robot is placed at a random position on the window.
- The robot moves to the upper edge of the window.
- The robot cleans the upper row of the window like in the default algorithm and moves to the second row.
- The robot cleans this row once but keeps track of where any dirty spots are left.
- It will turn at the end of the row, go back over all the dirty spots in the middle of the row, turn again and repeat this motion until all the dirty spots in the middle of the row are gone.
- The robot cleans the entire row once again in order to get rid of any stripes, and continues to the next row.
- The 3 steps above will be repeated until the robot reaches the bottom row, which will be cleaned like the top row.