Question
I. The Game of Nodes Task Winter is coming, and a war is on. You will help two sides in their missions: the White Walkers
I. The Game of Nodes Task Winter is coming, and a war is on.
You will help two sides in their missions: the White Walkers and Jon Snow.
Details Your python program will consist of three files: one to handle a graph of nodes and two to handle two search agents. The search agents will be independent - that is, only one agent will run at a time. Both agents will use the graph of nodes, which is a map of cities. Provided with this lab description is data.csv, which contains node coordinates in the following format: Winterfell,10,10
where the node for Winterfell is located at (x,y) coordinate (10,10). Additionally, the file contains node mappings in the following format: Winterfell,White Harbor,65 where an edge exists between nodes Winterfell and White Harbor, and the weight on that edge is 65. The above two examples are format examples only.
game-of-nodes.py
This python file will handle the logic for the graph, including loading of graph data from the file. Running this file should display a map (graph) of the given data, with labeled nodes and edges.
white-walker-search.py
The goal of the White Walkers in their search is to reach every city on the map (..generally bringing death & destruction, but we arent worried about that part). They begin at The Wall and move together.
Running this search program should print the sequence of cities to the optimal solution.
jon-snow-search.py The goal of Jon Snow in his search is to reach The Wall, as efficiently as possible. He begins in Trader Town. Running this search program should print the sequence of cities to the optimal solution.
data.csv
The Wall | 145 | 570 | |
Winterfell | 95 | 525 | |
White Harbor | 140 | 480 | |
Gulltown | 190 | 408 | |
Braavos | 228 | 445 | |
Lorath | 260 | 430 | |
Lannisport | 60 | 375 | |
Kings Landing | 140 | 355 | |
Oldtown | 60 | 290 | |
Pentos | 230 | 360 | |
Norvos | 280 | 390 | |
Qohor | 320 | 370 | |
Lotus Port | 210 | 165 | |
Lys | 240 | 260 | |
Tyrosh | 210 | 310 | |
Myr | 250 | 315 | |
Volantis | 310 | 265 | |
Mantarys | 375 | 275 | |
Elyria | 385 | 260 | |
Saath | 375 | 420 | |
Morosh | 390 | 435 | |
New Ghis | 455 | 190 | |
Astapor | 440 | 250 | |
Yunkai | 445 | 280 | |
Meereen | 453 | 290 | |
Hesh | 490 | 290 | |
Lhazosh | 500 | 275 | |
Kosrak | 520 | 290 | |
Port Yhos | 517 | 220 | |
Vahar | 580 | 165 | |
Faros | 580 | 190 | |
Qarkash | 555 | 225 | |
Qarth | 590 | 220 | |
Asabhad | 625 | 225 | |
Yin | 680 | 190 | |
Port Moraq | 608 | 130 | |
Zabhad | 625 | 110 | |
Asshai | 775 | 105 | |
Turrani | 725 | 150 | |
Leng Ma | 725 | 170 | |
Leng Yi | 725 | 195 | |
Jinqi | 745 | 200 | |
Carcosa | 850 | 220 | |
City of the Winged Men | 830 | 250 | |
KDath | 802 | 325 | |
Nefer | 755 | 385 | |
Trader Town | 685 | 305 | |
Tiqui | 675 | 275 | |
Bayasabhad | 625 | 270 | |
Samyriana | 610 | 310 | |
Kayakayanaya | 625 | 380 | |
Vaes Dothrak | 545 | 390 | |
Ib Sar | 590 | 460 | |
New Ibbish | 550 | 450 | |
Port of Ibben | 550 | 490 | |
Ib Nor | 555 | 525 | |
The Wall | Winterfell | 259 | |
Winterfell | White Harbor | 247 | |
The Wall | White Harbor | 265 | |
White Harbor | Gulltown | 280 |
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