Question: Tasks 4: Matlab code for predicting the average time Goal: Develop a Matlab code that is able to predict the average time that your

Tasks 4: Matlab code for predicting the average time Goal: Develop aMatlab code that is able to predict the average time that your

Tasks 4: Matlab code for predicting the average time Goal: Develop a Matlab code that is able to predict the average time that your robot will be able to complete a randomly created maze. You must state in your report what this time is for your robot. For simplicity the Matlab maze will be made up of a 5X5 square (each square is 12"x12") with the start in the lower left end and the end in the upper right as shown in the figure below. By saying that each square besides the start square and the end square can either be an obstacle or open space there are 223 (8,388,608) possible mazes that could be created. However, only a fraction of these can physically completed by the robot. The robot can be modeled as a finite dot going through the maze. You need to first create a matrix filled randomly with zeros (obstacles) and ones (possible paths) to represent the maze in Matlab. You want to input the set of rules and timing your robot acts on (for example, a "wall-following" logic) and then the time it to go through all the mazes that can be completed by the robot (obviously must leave out the impossible mazes). This will give you an average completion time over the entire set of possible mazes. By tweaking the rules and timing of how your robot functions you will be able to see how average performance changes. Robot starts Direction of robot Direction of IR sensor Robot ends Code should account for all the timing of the robot to make it as accurate as possible. Such as giving time to: Traveling straight at prescribed speed Making turn Moving IR sensor to identify wall Processing time This model can act as a powerful tool in setting up how to most efficiently transverse through a random maze, and therefore prepare you for the competition lab. It is easy to make a robot be efficient for traveling through a specific maze but it is much more difficult to make it be efficient for any given maze. You can use imshow(Maze,'InitialMagnification', 15000) to plot the maze. "Maze" will be the maze matrix you create in Matlab. For example,

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mechanical Engineering Questions!