Question: Write the program in Python or C++, also test the input, and get same output as below. Given a file containing a list of points

Write the program in Python or 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 3 links:

Here are 3 links provided, I am not sure if you are seeing them or not(if not, then try googling "iterative deepening search algorithm").

1.) https://github.com/aimacode/aima-python/blob/master/search.py

2.) http://artint.info/html/ArtInt_62.html 

3.) 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

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 Databases Questions!