Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A skeleton code is provided at: https://www.cs.uic.edu/pub/CS211/ProjectS18/maze.c As well as sample input files: https://www.cs.uic.edu/pub/CS211/ProjectS18/mazeData1.txt (simple 10x20 maze) https://www.cs.uic.edu/pub/CS211/ProjectS18/mazeData2.txt (simple 20x20 maze) https://www.cs.uic.edu/pub/CS211/ProjectS18/mazeData3.txt (a maze with

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

A skeleton code is provided at: https://www.cs.uic.edu/pub/CS211/ProjectS18/maze.c As well as sample input files: https://www.cs.uic.edu/pub/CS211/ProjectS18/mazeData1.txt (simple 10x20 maze) https://www.cs.uic.edu/pub/CS211/ProjectS18/mazeData2.txt (simple 20x20 maze) https://www.cs.uic.edu/pub/CS211/ProjectS18/mazeData3.txt (a maze with errors in the input) https://www.cs.uic.edu/pub/CS211/ProjectS18/mazeData4.txt (a maze with no solution)

Maze Solving For this project, write a C program that will find its way through a maze using the depth-first search algorithm. This program takes input from a file where the filename is specified in the command line arguments. The input file will only contain two integer values per line of input: The first valid line gives the size of the 2-D maze (the number of rows given by the first number, then the number of columns given by the second number), valid values are > 1 The second valid line gives the coordinates of the starting position in the maze The third valid line gives the coordinates of the ending position in the maze The remaining valid lines in the file give the coordinates of blocked positions in the maze . . . . If the command line arguments do not contain a valid filename, you should print an error message to STANDARD ERROR and quit the program. This could be because there was not a name given or the name given did not match that of a valid file. If the command line arguments contains multiple names, we leave it up to you to come up with a "good solution". Ideas on such a "good solution" could be Use one of the names as the input file and proceed (pick which name makes most sense to use Give an error message stating that too many names were given and quit. Run the program to solve the maze given with each filename . . The following shows an example of such an input file. The coordinates are given with the row listed first and the column listed second. A maze of NxM has rows numbered from 1 to N and columns number from 1 to M 10 20 10 20 4 2 1 10 3 8 8 3

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

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books

Students also viewed these Databases questions

Question

How does a market neutral hedge fund expect to make profits?

Answered: 1 week ago

Question

If you were a bank, would you lend money to Apple?

Answered: 1 week ago

Question

Understand the roles of signs, symbols, and artifacts.

Answered: 1 week ago

Question

Discuss the key ambient conditions and their effects on customers.

Answered: 1 week ago

Question

Be familiar with the integrative servicescape model.

Answered: 1 week ago