Question: Hi, I would like to ask about this specific problem for the Artificial Intelligence subject. Can you explain to me the solution as well as

 Hi, I would like to ask about this specific problem forthe Artificial Intelligence subject. Can you explain to me the solution as

Hi, I would like to ask about this specific problem for the Artificial Intelligence subject. Can you explain to me the solution as well as explaining the code for especially when running this in Spyder Python. I have a code for GraphData, Node, QueueBFS, and State.py if it helps?

For this, write a script that would use Breadth First Search to allow for the students introductions to each other with the least number of intermediate students for the introduction, i.e find the shortest path. Must consider the following: 1.) Store the relationships in a dictionary structure, For example: grap={'Adam':['Bob', 'You', 'Ema'), 'Bob':{'Adam','Dolly','Ema'l, 2.) Use any of the python data structures queues, stacks, priority queues or create your own using python native data structures such as list, dictionaries,etc. connect, (end/goal) student name of target person). For example, if you store the relationships under graph and "Ema" wishes to get introduced to "Bob" then you would call the function from the main as follows: BFS_firstname (graph, "Ema", "Bob") 6.) If a relationship cannot be established then the code should give an appropriate apology message. 7.)If any of the passed arguments do not exist then an appropriate message should be returned. 8.) If any names passed as arguments do not exist on the graph then it should display an appropriate message. 9.) As output print the final path and the tree traversed, use Graphviz to illustrate the result or print out. Run the script on the basis that Dolly needs to get introduced to 'You'. Then rerun on the basis that George needs to get introduced to Bob. Will run the script on Spyder Python (3.8) Undirected Graph that illustrates relationships among students in class Adam mdd am Ema You Bob George Frank nk Dolly For this, write a script that would use Breadth First Search to allow for the students introductions to each other with the least number of intermediate students for the introduction, i.e find the shortest path. Must consider the following: 1.) Store the relationships in a dictionary structure, For example: grap={'Adam':['Bob', 'You', 'Ema'), 'Bob':{'Adam','Dolly','Ema'l, 2.) Use any of the python data structures queues, stacks, priority queues or create your own using python native data structures such as list, dictionaries,etc. connect, (end/goal) student name of target person). For example, if you store the relationships under graph and "Ema" wishes to get introduced to "Bob" then you would call the function from the main as follows: BFS_firstname (graph, "Ema", "Bob") 6.) If a relationship cannot be established then the code should give an appropriate apology message. 7.)If any of the passed arguments do not exist then an appropriate message should be returned. 8.) If any names passed as arguments do not exist on the graph then it should display an appropriate message. 9.) As output print the final path and the tree traversed, use Graphviz to illustrate the result or print out. Run the script on the basis that Dolly needs to get introduced to 'You'. Then rerun on the basis that George needs to get introduced to Bob. Will run the script on Spyder Python (3.8) Undirected Graph that illustrates relationships among students in class Adam mdd am Ema You Bob George Frank nk Dolly

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!