Question: Python project AI: A person wanted to navigate between cities according to the map in the image and the heuristic in the image. Project requirements:

Python project AI:

A person wanted to navigate between cities according to the map in the image and the heuristic in the image.

Project requirements:

Create a class named Cities containing:

1- A function to create a dictionary named createCities

2 - function to create a heuristic named createH

3- A function for calculating A* algorithm within the class

4- A function for calculating greeay algorithmin within the class

The main menu of the project consists of:

1- Add city and heuristic

2- A* algorithm

3- Greedy algorithm

Where if the user enters the number 1, it adds the cities to the existing dictionary

If the number 2 is entered by the user, it adds a heuristic

If the number 3 is entered, we calculate the algorithm A * based on the dictionary and heuristics and output the result

If the number 4 is entered, we calculate the greedy algorithm based on the heuristic and output the result

If 5 is entered, the program will be terminated. As long as user No. 5 does not enter, we display the project main menu again.

The program should be free from errors and give the correct output

 Python project AI: A person wanted to navigate between cities according
to the map in the image and the heuristic in the image.

\begin{tabular}{|c|r|} \hline \multicolumn{2}{|c|}{ heuristic } \\ \hline Gaza & 75 \\ \hline Cairo & 60 \\ \hline Amman & 45 \\ \hline Makkah & 45 \\ \hline Dubai & 25 \\ \hline Damascus & 40 \\ \hline Yafa & 30 \\ \hline Morocco & 0 \\ \hline \end{tabular}

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!