E12 Switching Bug 0 Algorithm 25 Points 10 Points Draw Flowchart Following Pseudo Code Im Q43826820
E1.2 A switching Bug 0 algorithm (25 points). (i) (10 points) Draw a flowchart for the following pseudo-code implementation of the switching Bug 0 algorithm: 1: choose an initial direction (either left or right) 2: while not at goal : move towards the goal if hit an obstacle : 3: 4: while not able to move towards goal : take a step along the obstacle boundary moving in the chosen 5: 6: direction if hit the hitting point again : 7: switch direction 8: switch the choice of direction 9: (ii) (5 points) Draw an environment for which the switching Bug 0 algorithm never reaches the goal location, even though a path from start to goal does exist. Include both start and goal locations along with arrows indicating the path of the robot. Label several notable points along the path with the letters (A, B, C,…). (iii) (5 points) Sketch a graph of the distance between the robot and the goal location along the path you drew for part (ii). Use the labels from part (ii) to clarify the distance to the goal at the several notable points along the path. Show transcribed image text E1.2 A switching Bug 0 algorithm (25 points). (i) (10 points) Draw a flowchart for the following pseudo-code implementation of the switching Bug 0 algorithm: 1: choose an initial direction (either left or right) 2: while not at goal : move towards the goal if hit an obstacle : 3: 4: while not able to move towards goal : take a step along the obstacle boundary moving in the chosen 5: 6: direction if hit the hitting point again : 7: switch direction 8: switch the choice of direction 9: (ii) (5 points) Draw an environment for which the switching Bug 0 algorithm never reaches the goal location, even though a path from start to goal does exist. Include both start and goal locations along with arrows indicating the path of the robot. Label several notable points along the path with the letters (A, B, C,…). (iii) (5 points) Sketch a graph of the distance between the robot and the goal location along the path you drew for part (ii). Use the labels from part (ii) to clarify the distance to the goal at the several notable points along the path.
Expert Answer
Answer to E1.2 A switching Bug 0 algorithm (25 points). (i) (10 points) Draw a flowchart for the following pseudo-code implementat…
OR