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
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