Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write the program in C++, also test the input, and get same output as below. Given a file containing a list of points (x,y) in
Write the program in C++, also test the input, and get same output as below. Given a file containing a list of points (x,y) in the plane, write a program to do an iterative deepening search to the depth of the number of points, with the path cost the total distance. To keep the search space manageable only include the 4 nearest unvisited points as successors when you expand a node. You may assume that x and y are non-negative integers. Each line of input will be the x and y coordinates for a point; keep reading until end of file. You may assume there will be no more than 7000 points and that the input file will be named Test.txt. The test points will need to be read from that file. For example, if the input file(Test.txt) contains:
0 0 0 1 1 1 1 2 the output to the should be: 0 0 0 1 1 1 1 2 4.828 <-Shortes Path Length
To see the algorithm of iterative deepening search, heres two links:
1.) http://artint.info/html/ArtInt_62.html
2.) https://stackoverflow.com/questions/7861132/iterative-lengthening-pseudo-code-for-traversal-of-all-the-nodes
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started