Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Submit the submission.py file. The deliverable for the assignment is this ' submission.py ' file with the necessary functions / methods completed. Also include snapshots

Submit the
submission.py file. The deliverable for the assignment is this '
submission.py' file with the necessary functions/methods completed.
Also include snapshots of the output of your program and the generated graph showing the search results in your submission.
Your task is to implement an informed search algorithm that will calculate a driving route between two points in Romania with a minimal time and space cost. The search_submission_tests.py file to help you along the way. We will be using an undirected network representing a map of Romania.
A** search
The implemented A** search uses Euclidean distance as the default heuristic, which is implemented in function euclidean_dist_heuristic(). It is passed to a_star() as provide null_heuristic() as a baseline heuristic to test against when calling a_star tests.
Notes:
You need to include start and goal in the path.
2 If your start and goal are the same then just return [].
The above are just to keep your results consistent with our test cases.
You can access all the neighbors of a given node by calling graphinode), or graph.neighbors(node) ONLY.
You can access the weight of an edge using: graph.get_edge_weight(node_1, node_2). Not using this method will result in your explored nodes count being hig
You can access the (x,y) position of a node using: graph.nodes[n]['pos']. You will need this for calculating the heuristic distance.
Bidirectional A** search
implement bidirectional A** search. Remember that you need to calculate a heuristic for both the start-to-goal search and the goal-to-start search. bidirectional_a_star0 should return the path from the start node to the goal node, as a list of nodes.
submission.py file:
import heapq
import os
image text in transcribed

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

Database Processing Fundamentals, Design, and Implementation

Authors: David M. Kroenke, David J. Auer

14th edition

133876705, 9781292107639, 1292107634, 978-0133876703

More Books

Students also viewed these Databases questions