Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

imageimage

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

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_2

Step: 3

blur-text-image_3

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

Machine Learning For Business Analytics

Authors: Galit Shmueli, Peter C. Bruce, Amit V. Deokar, Nitin R. Patel

1st Edition

1119828791, 9781119828792

More Books

Students also viewed these Mechanical Engineering questions

Question

=+5. Briefly discuss in-links, out-links, and co-links.

Answered: 1 week ago