P vs NP Challenge by @Sirajology on Youtube
This is the code for the 'Why is P vs NP Important?' challenge, given by @Sirajology on Youtube. The file 'main.py' holds several algorithms:
- Nearest neighbor: Checks which city is closest to current city and appends it to the list.
- Simulated annealing (info): Generates random paths and checks if the total distance is higher than the current best path.
- Python 3+
- Random
To run the demo code just run the following in terminal
python3 main.py
The challenge for this function was to add one or several functions that determine the best path the 'traveling salesman' should/could take.
Credit for the vast majority of code here goes to westphal. I've merely created a wrapper around all of the important functions to get people started.
The credits for making the video (and for being awesome) go to @Sirajology on YouTube.