Skip to content

axelegkor/TDT4136-Assignment2

Repository files navigation

This is an assignment in the NTNU course TDT4136 - Introduction to Artificial Intelligence

Running the code

The code is run by simply running either the Part1.py or Part2.py. The code will return a list of the optimal path to the console, and open a PNG file, visualizing the best path. Make sure the file you're running is in the same folder as Map.py, Samfundet_map_1.csv Samfundet_map_2.csv, Samfundet_map_Edgar_full.csv. The csv files are the same as provided by the problem, while the Map.py file has been modified, so make sure to use the one handed in along this file.

The two python files are the solutions to the two parts of the problem. They are written in python 3.7.4. The code is thouroughly commented, so look at that to understand what has been done. The Map.py file has been edited to better fit the implementation of the problems, but the main parts are the same as the original file provided by the problem.

Part2 uses most of it's logic exactly like part1, with the import addition of logic for cell values. The path shortest path is found by running find_path() function in the corresponding python file. This is already done for you, so all you have to do to get a visualization of the path is running the file. A visualization each path is also provided below.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages