Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In Python please :) #Provided with this lab you will find 2 csv files: #* **cities.csv** - This file contains a list of coordinates for

In Python please :)

#Provided with this lab you will find 2 csv files:

#* **cities.csv** - This file contains a list of coordinates for selected cities in Texas, in the following format:

#San Antonio,29.4685,-98.5254

#The above line means that San Antonio is located at the latitude and longitude of 29.4685 N and 98.5254 W respectively.

#Note that the 've' sign denotes 'S' for latitude and 'W' for longitude. While performing calculations you will need to ignore the sign.

#* **distances.csv** - This file contains distance values between two cities of Texas, if a path exists, in the following format:

#San Antonio, New Braunfels,30.80876734

#The above line denotes that there should be an edge between *San Antonio* and *New Braunfels* and the weight on that edge,

#i.e. the distance, is *30.80876734*.

# Add only your imports here

# Assume that the data files are in the following folder -- THIS WILL BE USED BY THE TA

#basePath = "/content/drive/My Drive/Colab Notebooks/Artificial Intelligence/Data/"

# Load the graph data from the files

# Display a 2D graph of the given data, with labeled nodes and edges.

#Extra Credit (4 points)

#Overlay the 2D graph on an image of the Texas state map.

#Virus Spread - Uninformed Search Agent

#(40 points)

#In this section, use the graph created in the previous section and create an *uninformed search* agent that

#will print the path how the virus will spread to all the provided Texas cities.

#The first confirmed case of the virus was in **Three Rivers** and starts spreading from there.

#The virus does not discriminate and it needs to spread to all the cities of Texas.

#In the following code block, write code to implement **any** uninformed search strategy.

#As the output, print

#* The path or sequence of cities that will be infected by the spread of Coronavirus.

#* The distance travelled by the selected virus spreading strategy.

#Extra Credit (3 points)

#On the 2D graph and the Texas state map, overlay the selected path along with the cities visited.

# Implement ANY uninformed search strategy for the spread of coronavirus from the starting city of 'Three Rivers'

#Vaccine Transportation - Informed Search Agent

#(40 points)

#In this section, create an *informed search* agent that will be used to transport the vaccine.

#The city of **San Antonio** has more supply of vaccine than the demand.

#The goal is to create an **optimal strategy** to transport the vaccine and make it available at the highly affected city of

#**College Station**, where there is a shortage of vaccines

#In the following code block, write code to implement an **optimal** informed search strategy.

#As the output, print

#* The path / sequence of cities that will be visited in the optimal vaccine transportation strategy.

#* The total distance travelled in the optimal vaccine transportation strategy.

#Extra Credit (3 points)

#On the 2D graph and the Texas state map, overlay the selected path along with the cities visited.

# Implement an OPTIMAL informed search strategy for distributing the vaccine from 'San Antonio' to 'College Station'

Cities.csv

image text in transcribed

Distances.csv

image text in transcribed

\begin{tabular}{|r|l|r|r|} \hline 1 & Abilene & 32.4543 & 99.7384 \\ \hline 2 & Alice & 27.7556 & 98.0653 \\ \hline 3 & Amarillo & 35.1989 & 101.831 \\ \hline 4 & Austin & 30.3006 & 97.7517 \\ \hline 5 & Beaumont & 30.085 & 94.1451 \\ \hline 6 & Brownsvil & 25.998 & 97.4565 \\ \hline 7 & College St & 30.5852 & 96.296 \\ \hline 8 & Columbus & 29.7055 & 96.5563 \\ \hline 9 & Corpus Ch & 27.7261 & 97.3755 \\ \hline 10 & Dalhart & 36.0579 & 102.512 \\ \hline 11 & Dallas & 32.7936 & 96.7662 \\ \hline 12 & Del Rio & 29.3708 & 100.88 \\ \hline 13 & El Paso & 31.8479 & 106.431 \\ \hline 14 & Fort Wortl & 32.7812 & 97.3472 \\ \hline 15 & Galveston & 29.5112 & 95.1979 \\ \hline 16 & Gonzalez & 29.5126 & 97.4472 \\ \hline 17 & Houston & 29.7869 & 95.3905 \\ \hline 18 & Jamaica Bi & 29.1905 & 94.9801 \\ \hline 19 & Kenedy & 28.8176 & 97.8518 \\ \hline 20 & Laredo & 27.5617 & 99.4874 \\ \hline 21 & Lubbock & 33.5642 & 101.887 \\ \hline 22 & McAllen & 26.2273 & 98.2471 \\ \hline 23 & Midland & 32.0249 & 102.114 \\ \hline 24 & Victoria & 28.8285 & 96.985 \\ \hline 25 & Waco & 31.5597 & 97.1882 \\ \hline 26 & Odessa & 29.6997 & 98.1148 \\ \hline 27 & Palestine & 31.8831 & 102.341 \\ \hline 28 & Round Ror & 30.5254 & 95.6471 \\ \hline 29 & San Angel & 31.9426 & 97.6659 \\ \hline 30 & San Anton & 29.4658 & 98.5254 \\ \hline 31 & San Marcc & 29.8736 & 98.529 \\ \hline 32 & Suguin & 29.5891 & 97.9661 \\ \hline 33 & Temple & 31.1076 & 97.3894 \\ \hline \end{tabular}

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

SQL Antipatterns Avoiding The Pitfalls Of Database Programming

Authors: Bill Karwin

1st Edition

1680508989, 978-1680508987

More Books

Students also viewed these Databases questions

Question

What is the transaction code to pay rent?

Answered: 1 week ago

Question

Why do HCMSs exist? Do they change over time?

Answered: 1 week ago