makebecisionForTask2() function in this ta: n this task, the exit may be to the left or to the right of the robot n the previous task, the exit can only be on the right so this task is a little more difficult to do than th Previously, the robot searches for the exit by turning to the right only Now, in this task, rather than just the right hand side, you also need to make the robot search the le You can extend the idea from the previous task to something like this Step 1. The robot moves north until there is a wall above a If the robot sees a wall above, it turns east (go to step 2) and searches for the exit Step 2. The robot moves east, searches for the exit until there is a wall on the east a If the exit is found (ie. no wall above), the robot will go north (back to step 1) and movet b. If the robot sees a wall on the east, it turns around (go to step 3) and searches for the ex Step 3. The robot moves west and searches for the exit a If the exit is found (i e. no wall above), the robot will go north (back to step 1) and move t You need to add one more state which asks the robot to move west, with the appropriate transition Then, the above logic can be represented by the following state diagram Action: NONE Condition: If connot move north Go north Go east Action: EAST Action: NORTH Action: NONE Action: NONE Condition: If can move north Condition: If cannot move east Action: NONE Condition: If can move north Go west Action: WEST
makebecisionForTask2() function in this ta: n this task, the exit may be to the left or to the right of the robot n the previous task, the exit can only be on the right so this task is a little more difficult to do than th Previously, the robot searches for the exit by turning to the right only Now, in this task, rather than just the right hand side, you also need to make the robot search the le You can extend the idea from the previous task to something like this Step 1. The robot moves north until there is a wall above a If the robot sees a wall above, it turns east (go to step 2) and searches for the exit Step 2. The robot moves east, searches for the exit until there is a wall on the east a If the exit is found (ie. no wall above), the robot will go north (back to step 1) and movet b. If the robot sees a wall on the east, it turns around (go to step 3) and searches for the ex Step 3. The robot moves west and searches for the exit a If the exit is found (i e. no wall above), the robot will go north (back to step 1) and move t You need to add one more state which asks the robot to move west, with the appropriate transition Then, the above logic can be represented by the following state diagram Action: NONE Condition: If connot move north Go north Go east Action: EAST Action: NORTH Action: NONE Action: NONE Condition: If can move north Condition: If cannot move east Action: NONE Condition: If can move north Go west Action: WEST
Chapter8: Advanced Method Concepts
Section: Chapter Questions
Problem 8RQ
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,