Question: For the final task we return to the assumption that the cleaner has Vacuuminator has complete knowledge of the world around it . Create a
For the final task we return to the assumption that the cleaner has Vacuuminator has complete knowledge of the world around it Create a function optimalvacuuminatorworld Your function should return a list of moves that will clean all the dirt in the world in the fewest moves possible. The Vacuuminator does not need to return to its starting position after cleaning the dirt.
PYTHON:To obtain any marks for this question, there must never exist a shorter path than the one your function returns for a given world. As this is a bonus question, no partial marks will be awarded.
If the Vacuuminator is unable to clean all of the dirt in the world eg because there is dirt that is completely blocked by walls it should return None.
For this task, you may assume that both the width and length of the world are less than tiles. Example calls: optimalvacuuminatorXED
rr
optimalvacuuminatorXDDDEE
durr
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
