Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python question 5) Unfortunately, in a practical scenario, the robot does not always start fully charged. Modify your code by implementing a third state Error

Python question
image text in transcribed
image text in transcribed
5) Unfortunately, in a practical scenario, the robot does not always start fully charged. Modify your code by implementing a third state "Error" when no feasible plan is possible that will make the robot reach the charging station without completely draining the battery. In "Error" state, the robot aborts any search strategy. The output of the code should be a sequence of translations as described in Question 4 including the state of the robot. You should allow the user to input the starting node number, and the initial battery level. \# Sample output Enter starting node: 8 Enter starting battery level in Wh: 3 8 (Charging, 3 Wh) 6 (Charging, 2 Wh) 4 (Charging, 1 Wh) 11 (Error, OWh) Note: the sample output results were provided for illustration purpose only. The actual output of your program may be different depending on your graph representation. Hence, don't rely on the sample output as a test cases to check your program correctness. Encode the FSM with the search strategy. The robot should execute the strategy in Question 3 when in "Cleaning" state, and another strategy to navigate to the charging station when in "Charging" state. Assume that vising node 12 will increase battery level to 12Wh instantly. Also assume the robot starts with fully-charged battery. The output of the code should be a sequence of translations as described in Question 3 including the state and battery level of the robot. You should allow the user to input the.starting node number

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Discuss the states of accounting

Answered: 1 week ago