Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Records And Database Management

Authors: Jeffrey R Stewart Ed D, Judith S Greene, Judith A Hickey

4th Edition

0070614741, 9780070614741

More Books

Students also viewed these Databases questions

Question

1.who the father of Ayurveda? 2. Who the father of taxonomy?

Answered: 1 week ago

Question

Commen Name with scientific name Tiger - Wolf- Lion- Cat- Dog-

Answered: 1 week ago

Question

Why do HCMSs exist? Do they change over time?

Answered: 1 week ago