Answered You can hire a professional tutor to get the answer.

QUESTION

Project 2 - Pathnding Engr 101 F14, revision 1.1 Due October 6, 9 pm 1 Introduction A few years ago, a series of earthquakes in southwest China...

Basically, I have to edit this program to make the robot more efficient. The robot has to go to the survivor's position, using the smallest amount of fuel as possible. If there is rubble in the way, the robot has to decide whether to go around it or to clear its path. Attached are the Project Intro/Specifications and also the provided files. Below is the robot.m file that I have to edit in order to make a more efficient robot. function move = robot(direction, sensors, crumbs, time, fuel, fuelstart)drow = direction(1);dcol = direction(2);N = 1; E = 2; S = 3; W = 4; drill=4;move = 0;if abs(drow) >= abs(dcol)if drow > 0move = S;elseif drow < 0move = N;elsemove = 0;endendif abs(drow) < abs(dcol)if dcol < 0move = W;elseif dcol > 0move = E;elsemove = 0;endendif move == N && sensors(1,2)>= 20move = N+drill;elseif move == E && sensors(2,3) >= 20move = E+drill;elseif move == S && sensors(3,2) >= 20move = S+drill;elseif move == W && sensors(2,1) >= 20move = W+drill;end

  • Attachment 1
  • Attachment 2
  • Attachment 3
  • Attachment 4
  • Attachment 5
  • Attachment 6
  • Attachment 7
  • Attachment 8
  • Attachment 9
Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question